From 18cd43909b3173e5d7d7a01f519ea4ac31bad747 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Fri, 17 Dec 2021 17:44:24 +0800 Subject: [PATCH] Align signature_algorithms extension name Signed-off-by: Jerry Yu --- library/ssl_cli.c | 12 +++++------- library/ssl_srv.c | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 888523f18..a78254cd1 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -204,10 +204,8 @@ static int ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl, */ #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) -static int ssl_write_signature_algorithms_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - const unsigned char *end, - size_t *olen ) +static int ssl_write_sig_alg_ext( mbedtls_ssl_context *ssl, unsigned char *buf, + const unsigned char *end, size_t *olen ) { unsigned char *p = buf; size_t sig_alg_len = 0; @@ -1131,10 +1129,10 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) - if( ( ret = ssl_write_signature_algorithms_ext( ssl, p + 2 + ext_len, - end, &olen ) ) != 0 ) + if( ( ret = ssl_write_sig_alg_ext( ssl, p + 2 + ext_len, + end, &olen ) ) != 0 ) { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_write_signature_algorithms_ext", ret ); + MBEDTLS_SSL_DEBUG_RET( 1, "ssl_write_sig_algs_ext", ret ); return( ret ); } ext_len += olen; diff --git a/library/ssl_srv.c b/library/ssl_srv.c index a8b1e7de6..a137e439c 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -239,9 +239,9 @@ static int ssl_parse_renegotiation_info( mbedtls_ssl_context *ssl, * This needs to be done at a later stage. * */ -static int ssl_parse_signature_algorithms_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) +static int ssl_parse_sig_alg_ext( mbedtls_ssl_context *ssl, + const unsigned char *buf, + size_t len ) { size_t sig_alg_list_size; @@ -1674,7 +1674,7 @@ read_record_header: case MBEDTLS_TLS_EXT_SIG_ALG: MBEDTLS_SSL_DEBUG_MSG( 3, ( "found signature_algorithms extension" ) ); - ret = ssl_parse_signature_algorithms_ext( ssl, ext + 4, ext_size ); + ret = ssl_parse_sig_alg_ext( ssl, ext + 4, ext_size ); if( ret != 0 ) return( ret );