From 1e868ccbace3d8ec592de2c1e7bca3b6e17fb0bf Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Mon, 9 Jan 2023 17:30:01 +0100 Subject: [PATCH] fix several typos and extra blank spaces Signed-off-by: Valerio Setti --- library/ssl_misc.h | 2 +- library/ssl_tls12_client.c | 4 ++-- library/ssl_tls12_server.c | 2 +- tests/suites/test_suite_ssl.function | 30 ++++++++++++++-------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/library/ssl_misc.h b/library/ssl_misc.h index 37ff223bce..2c95afeff2 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h @@ -1620,7 +1620,7 @@ uint16_t mbedtls_ssl_get_tls_id_from_ecp_group_id( mbedtls_ecp_group_id grp_id ) * * \param tls_id The TLS ID to look for * \return A pointer to a const string with the proper name. If TLS - * ID is not suppoted, a NULL pointer is returned instead. + * ID is not supported, a NULL pointer is returned instead. */ const char* mbedtls_ssl_get_curve_name_from_tls_id( uint16_t tls_id ); #endif diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index 4ddb1874f6..a7a1fc1c5d 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -2125,8 +2125,8 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl ) return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER ); } - /* If the above conversion to TLS ID was fine, then also this one will be, - so there is no need to check the retun value here */ + /* If the above conversion to TLS ID was fine, then also this one will be, + so there is no need to check the return value here */ mbedtls_ssl_get_psa_curve_info_from_tls_id( tls_id, &ecc_family, &ssl->handshake->ecdh_bits ); diff --git a/library/ssl_tls12_server.c b/library/ssl_tls12_server.c index 2d7e5722d8..a28cd67405 100644 --- a/library/ssl_tls12_server.c +++ b/library/ssl_tls12_server.c @@ -2712,7 +2712,7 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl ) } /* If the above conversion to TLS ID was fine, then also this one will - be, so there is no need to check the retun value here */ + be, so there is no need to check the return value here */ mbedtls_ssl_get_psa_curve_info_from_tls_id( tls_id, &ecc_family, &ssl->handshake->ecdh_bits ); diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 9dcee84d5c..73e22985c0 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -2598,22 +2598,22 @@ int tweak_tls13_certificate_msg_vector_len( TEST_EQUAL( ret, exp_ret_val ) #endif -#define TEST_AVAILABLE_ECC( _tls_id, _group_id, _psa_family, _psa_bits ) \ - TEST_EQUAL( mbedtls_ssl_get_ecp_group_id_from_tls_id( _tls_id ), \ - _group_id ); \ - TEST_EQUAL( mbedtls_ssl_get_tls_id_from_ecp_group_id( _group_id ), \ - _tls_id ); \ - TEST_EQUAL( mbedtls_ssl_get_psa_curve_info_from_tls_id( _tls_id, \ - &psa_family, &psa_bits), PSA_SUCCESS ); \ - TEST_EQUAL( _psa_family, psa_family ); \ - TEST_EQUAL( _psa_bits, psa_bits ); +#define TEST_AVAILABLE_ECC( tls_id_, group_id_, psa_family_, psa_bits_ ) \ + TEST_EQUAL( mbedtls_ssl_get_ecp_group_id_from_tls_id( tls_id_ ), \ + group_id_ ); \ + TEST_EQUAL( mbedtls_ssl_get_tls_id_from_ecp_group_id( group_id_ ), \ + tls_id_ ); \ + TEST_EQUAL( mbedtls_ssl_get_psa_curve_info_from_tls_id( tls_id_, \ + &psa_family, &psa_bits), PSA_SUCCESS ); \ + TEST_EQUAL( psa_family_, psa_family ); \ + TEST_EQUAL( psa_bits_, psa_bits ); -#define TEST_UNAVAILABLE_ECC( _tls_id, _group_id, _psa_family, _psa_bits ) \ - TEST_EQUAL( mbedtls_ssl_get_ecp_group_id_from_tls_id( _tls_id ), \ - MBEDTLS_ECP_DP_NONE ); \ - TEST_EQUAL( mbedtls_ssl_get_tls_id_from_ecp_group_id( _group_id ), \ - 0 ); \ - TEST_EQUAL( mbedtls_ssl_get_psa_curve_info_from_tls_id( _tls_id, \ +#define TEST_UNAVAILABLE_ECC( tls_id_, group_id_, psa_family_, psa_bits_ ) \ + TEST_EQUAL( mbedtls_ssl_get_ecp_group_id_from_tls_id( tls_id_ ), \ + MBEDTLS_ECP_DP_NONE ); \ + TEST_EQUAL( mbedtls_ssl_get_tls_id_from_ecp_group_id( group_id_ ), \ + 0 ); \ + TEST_EQUAL( mbedtls_ssl_get_psa_curve_info_from_tls_id( tls_id_, \ &psa_family, &psa_bits), PSA_ERROR_NOT_SUPPORTED ); /* END_HEADER */