diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index eb9885a17..bfc3a5a42 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -515,7 +515,10 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl ); * of the logic of (D)TLS from the implementation * of the secure transport. * - * \param ssl SSL context to use + * \param ssl The SSL context to use. + * \param update_hs_digest This indicates if the handshake digest + * should be automatically updated in case + * a handshake message is found. * * \return 0 or non-zero error code. * @@ -581,7 +584,8 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl ); * following the above definition. * */ -int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, unsigned update_digest ); +int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, + unsigned update_hs_digest ); int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want ); int mbedtls_ssl_write_handshake_msg( mbedtls_ssl_context *ssl ); diff --git a/library/ssl_tls.c b/library/ssl_tls.c index b8ca1545f..19523bac9 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4275,7 +4275,7 @@ static int ssl_another_record_in_datagram( mbedtls_ssl_context *ssl ); #endif /* MBEDTLS_SSL_PROTO_DTLS */ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, - unsigned update_digest ) + unsigned update_hs_digest ) { int ret; @@ -4342,7 +4342,7 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, } if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - update_digest == 1 ) + update_hs_digest == 1 ) { mbedtls_ssl_update_handshake_status( ssl ); }