oc_dtls: Revert recent change
@@ -547,10 +547,6 @@ oc_sec_dtls_send_message(oc_message_t *message)
mbedtls_strerror(ret, buf, 256);
OC_ERR("oc_dtls: mbedtls_error: %s\n", buf);
#endif /* OC_DEBUG */
- mbedtls_ssl_session_reset(&peer->ssl_ctx);
- mbedtls_ssl_send_alert_message(&peer->ssl_ctx,
- MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY);
oc_sec_dtls_remove_peer(&peer->endpoint, false);
} else {
length = message->length;
@@ -580,10 +576,6 @@ write_application_data(void *ctx)
mbedtls_strerror(ret, buf, 256);
OC_ERR("oc_dtls: mbedtls_error: %s\n", buf);
#endif /* OC_DEBUG */
- mbedtls_ssl_session_reset(&peer->ssl_ctx);
- mbedtls_ssl_send_alert_message(&peer->ssl_ctx,
- MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY);
oc_sec_dtls_remove_peer(&peer->endpoint, false);
break;
}
@@ -689,9 +681,6 @@ read_application_data(void *ctx)
mbedtls_ssl_set_client_transport_id(
&peer->ssl_ctx, (const unsigned char *)&peer->endpoint.addr,
sizeof(peer->endpoint.addr)) != 0) {
- mbedtls_ssl_send_alert_message(&peer->ssl_ctx,
- MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY);
oc_sec_dtls_remove_peer(&peer->endpoint, false);
return DONE;
}
@@ -703,10 +692,6 @@ read_application_data(void *ctx)
mbedtls_strerror(ret, buf, 256);
OC_ERR("oc_dtls: mbedtls_error: %s\n", buf);
#endif /* OC_DEBUG */
- mbedtls_ssl_session_reset(&peer->ssl_ctx);
- mbedtls_ssl_send_alert_message(&peer->ssl_ctx,
- MBEDTLS_SSL_ALERT_LEVEL_FATAL,
- MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY);
oc_sec_dtls_remove_peer(&peer->endpoint, false);
return DONE;
}
