fix several typos and extra blank spaces
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
diff --git a/library/ssl_misc.h b/library/ssl_misc.h
index 37ff223..2c95afe 100644
--- a/library/ssl_misc.h
+++ b/library/ssl_misc.h
@@ -1620,7 +1620,7 @@
*
* \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 4ddb187..a7a1fc1 100644
--- a/library/ssl_tls12_client.c
+++ b/library/ssl_tls12_client.c
@@ -2125,8 +2125,8 @@
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 2d7e572..a28cd67 100644
--- a/library/ssl_tls12_server.c
+++ b/library/ssl_tls12_server.c
@@ -2712,7 +2712,7 @@
}
/* 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 9dcee84..73e2298 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -2598,22 +2598,22 @@
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 */