Improve and align variable names for supported versions data Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/library/ssl_misc.h b/library/ssl_misc.h index e136c35..fccac85 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h
@@ -2055,11 +2055,12 @@ * \param[in] ssl SSL context * \param[in] buf Address of the first byte of the extensions vector. * \param[in] end End of the buffer containing the list of extensions. - * \param[out] extension_data If the extension is present, address of its first - * byte of data, NULL otherwise. - * \param[out] extension_data_end If the extension is present, address of the - * first byte immediately following the extension - * data, NULL otherwise. + * \param[out] supported_versions_data If the extension is present, address of + * its first byte of data, NULL otherwise. + * \param[out] supported_versions_data_end If the extension is present, address + * of the first byte immediately + * following the extension data, NULL + * otherwise. * \return 0 if the list of extensions does not contain a supported_versions * extension. * \return 1 if the list of extensions contains a supported_versions @@ -2071,8 +2072,8 @@ int mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts( mbedtls_ssl_context *ssl, const unsigned char *buf, const unsigned char *end, - const unsigned char **extension_data, - const unsigned char **extension_data_end); + const unsigned char **supported_versions_data, + const unsigned char **supported_versions_data_end); /* * Handler of TLS 1.3 server certificate message
diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 6cf47fe..58d66cd 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c
@@ -1324,8 +1324,8 @@ { const unsigned char *p = buf; size_t legacy_session_id_echo_len; - const unsigned char *supported_versions_ext; - const unsigned char *supported_versions_ext_end; + const unsigned char *supported_versions_data; + const unsigned char *supported_versions_data_end; /* * Check there is enough data to access the legacy_session_id_echo vector @@ -1349,7 +1349,7 @@ return mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts( ssl, p, end, - &supported_versions_ext, &supported_versions_ext_end); + &supported_versions_data, &supported_versions_data_end); } /* Returns a negative value on failure, and otherwise
diff --git a/library/ssl_tls13_generic.c b/library/ssl_tls13_generic.c index 1a10e75..d2082a7 100644 --- a/library/ssl_tls13_generic.c +++ b/library/ssl_tls13_generic.c
@@ -89,15 +89,15 @@ int mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts( mbedtls_ssl_context *ssl, const unsigned char *buf, const unsigned char *end, - const unsigned char **extension_data, - const unsigned char **extension_data_end) + const unsigned char **supported_versions_data, + const unsigned char **supported_versions_data_end) { const unsigned char *p = buf; size_t extensions_len; const unsigned char *extensions_end; - *extension_data = NULL; - *extension_data_end = NULL; + *supported_versions_data = NULL; + *supported_versions_data_end = NULL; /* Case of no extension */ if (p == end) { @@ -131,8 +131,8 @@ MBEDTLS_SSL_CHK_BUF_READ_PTR(p, extensions_end, extension_data_len); if (extension_type == MBEDTLS_TLS_EXT_SUPPORTED_VERSIONS) { - *extension_data = p; - *extension_data_end = p + extension_data_len; + *supported_versions_data = p; + *supported_versions_data_end = p + extension_data_len; return 1; } p += extension_data_len;
diff --git a/library/ssl_tls13_server.c b/library/ssl_tls13_server.c index dbd9a52..f59f379 100644 --- a/library/ssl_tls13_server.c +++ b/library/ssl_tls13_server.c
@@ -1255,8 +1255,8 @@ const unsigned char *cipher_suites_end; size_t extensions_len; const unsigned char *extensions_end; - const unsigned char *supported_versions_ext; - const unsigned char *supported_versions_ext_end; + const unsigned char *supported_versions_data; + const unsigned char *supported_versions_data_end; mbedtls_ssl_handshake_params *handshake = ssl->handshake; int hrr_required = 0; @@ -1360,7 +1360,7 @@ */ ret = mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts( ssl, p + 2, end, - &supported_versions_ext, &supported_versions_ext_end); + &supported_versions_data, &supported_versions_data_end); if (ret < 0) { MBEDTLS_SSL_DEBUG_RET(1, ("mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts"), ret); @@ -1373,8 +1373,8 @@ if (ret == 1) { ret = ssl_tls13_parse_supported_versions_ext(ssl, - supported_versions_ext, - supported_versions_ext_end); + supported_versions_data, + supported_versions_data_end); if (ret < 0) { MBEDTLS_SSL_DEBUG_RET(1, ("ssl_tls13_parse_supported_versions_ext"), ret);