From 58afdba88727babbd9ebea002d60cc1fda7a72fd Mon Sep 17 00:00:00 2001 From: Xiaofei Bai Date: Tue, 9 Nov 2021 03:10:05 +0000 Subject: [PATCH] Fix typo and remove wrapper Signed-off-by: Xiaofei Bai --- library/ssl_cli.c | 17 ++++------------- library/ssl_tls13_client.c | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index f070b0fad..d871dba66 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -89,10 +89,10 @@ static int ssl_conf_has_static_raw_psk( mbedtls_ssl_config const *conf ) #endif /* MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */ #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -static int ssl_write_hostname_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - const unsigned char *end, - size_t *olen ) +int mbedtls_ssl_write_hostname_ext( mbedtls_ssl_context *ssl, + unsigned char *buf, + const unsigned char *end, + size_t *olen ) { unsigned char *p = buf; size_t hostname_len; @@ -156,15 +156,6 @@ static int ssl_write_hostname_ext( mbedtls_ssl_context *ssl, return( 0 ); } - -int mbedtls_ssl_write_hostname_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - const unsigned char *end, - size_t *olen ) -{ - return ssl_write_hostname_ext( ssl, buf, end, olen ); -} - #endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ #if defined(MBEDTLS_SSL_RENEGOTIATION) diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 511f4cd28..5abb18c6c 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -799,7 +799,7 @@ static int ssl_tls13_write_client_hello_body( mbedtls_ssl_context *ssl, #endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */ #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - /* Write server name extention */ + /* Write server name extension */ ret = mbedtls_ssl_write_hostname_ext( ssl, p, end, &output_len ); if( ret != 0 ) return( ret );