From 6c0da64094f5118db8e006301ca67bfde1c8f9fc Mon Sep 17 00:00:00 2001 From: irwir Date: Thu, 26 Sep 2019 21:07:41 +0300 Subject: [PATCH] Shorter version of mbedtls_ssl_send_fatal_handshake_failure --- ChangeLog | 10 ++++++++++ library/ssl_tls.c | 13 +++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 973f21300..0ba2adbee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ mbed TLS ChangeLog (Sorted per branch, date) += mbed TLS 2.19.2 branch released xxxx-xx-xx + +Bugfix + * Fix an incorrect size in a debugging message. Reported and fix + submitted by irwir. Fixes #2717. + * Fix an unused variable warning when compiling without DTLS. + Reported and fix submitted by irwir. Fixes #2800. + * Remove a useless assignment. Reported and fix submitted by irwir. + Fixes #2801. + = mbed TLS 2.19.1 branch released 2019-09-16 Features diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 48c433e67..cf5b1cbf1 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6568,16 +6568,9 @@ int mbedtls_ssl_handle_message_type( mbedtls_ssl_context *ssl ) int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl ) { - int ret; - - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); + return( mbedtls_ssl_send_alert_message( ssl, + MBEDTLS_SSL_ALERT_LEVEL_FATAL, + MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE ) ); } int mbedtls_ssl_send_alert_message( mbedtls_ssl_context *ssl,