mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 11:40:39 +03:00
coap_gnutls.c: Handle another error in do_gnutls_handshake()
Treat GNUTLS_E_UNEXPECTED_PACKET as a reason for DTLS closure. To test, gnutls server and client with different PSK keys and coaps:// GNUTLS_E_UNEXPECTED_PACKET raised if alert sent by server in the middle of the setup handshaking.
This commit is contained in:
1 parent
801e5492f2
commit
c771767147
1 file changed
+1
@@ -2165,6 +2165,7 @@ do_gnutls_handshake(coap_session_t *c_session, coap_gnutls_env_t *g_env) {
|
||||
log_last_alert(c_session, g_env->g_session);
|
||||
/* Fall through */
|
||||
case GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET:
|
||||
case GNUTLS_E_UNEXPECTED_PACKET:
|
||||
c_session->dtls_event = COAP_EVENT_DTLS_CLOSED;
|
||||
ret = -1;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user