From c8f529995fbacad4a6d4d18912e2a77e769776b1 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 25 Jul 2019 11:15:08 +0100 Subject: [PATCH] Rename pend_alert_msg -> pending_fatal_alert_msg --- include/mbedtls/ssl.h | 2 +- include/mbedtls/ssl_internal.h | 6 +++--- library/ssl_tls.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index f613ff64d..5a774aafb 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1235,7 +1235,7 @@ struct mbedtls_ssl_context { const mbedtls_ssl_config *conf; /*!< configuration information */ - unsigned char pend_alert_msg; + unsigned char pending_fatal_alert_msg; /* * Miscellaneous diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 2f305e5ec..a86ec120b 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -1736,14 +1736,14 @@ static inline unsigned int mbedtls_ssl_conf_get_ems_enforced( * The check for pending alerts must be done manually. Currently, * it happens only during the handshake loop. * - * This function must not be called multiple times without manually - * inspecting and clearing ssl->pending_fatal_alert_msg in between. + * This function must not be called multiple times without + * manually inspecting and clearing ssl->pending_fatal_alert_msg in between. */ MBEDTLS_ALWAYS_INLINE static inline void mbedtls_ssl_pend_fatal_alert( mbedtls_ssl_context *ssl, unsigned char message ) { - ssl->pend_alert_msg = message; + ssl->pending_fatal_alert_msg = message; } #endif /* ssl_internal.h */ diff --git a/library/ssl_tls.c b/library/ssl_tls.c index e37122fa5..292797483 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -7974,7 +7974,7 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl, if( ( ret = ssl_handshake_init( ssl ) ) != 0 ) goto error; - ssl->pend_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE; + ssl->pending_fatal_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE; return( 0 ); @@ -9828,12 +9828,12 @@ int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl ) ret = mbedtls_ssl_handshake_server_step( ssl ); #endif - if( ssl->pend_alert_msg != MBEDTLS_SSL_ALERT_MSG_NONE ) + if( ssl->pending_fatal_alert_msg != MBEDTLS_SSL_ALERT_MSG_NONE ) { mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - ssl->pend_alert_msg ); - ssl->pend_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE; + ssl->pending_fatal_alert_msg ); + ssl->pending_fatal_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE; } return( ret ); }