From 9d87a38976cb0b9f8df8228c47acb0ebefe0c00f Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Tue, 11 Jul 2023 10:15:16 +0800 Subject: [PATCH 1/2] test_suite_ssl: improve variable naming in ssl_set_hostname_twice Signed-off-by: Pengyu Lv --- tests/suites/test_suite_ssl.function | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 29bc1c496ff6..a4473cae80c9 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -1146,21 +1146,21 @@ exit: /* END_CASE */ /* BEGIN_CASE depends_on:MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ -void ssl_set_hostname_twice(char *hostname0, char *hostname1) +void ssl_set_hostname_twice(char *input_hostname0, char *input_hostname1) { - const char *hostname; + const char *output_hostname; mbedtls_ssl_context ssl; mbedtls_ssl_init(&ssl); USE_PSA_INIT(); - TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, hostname0) == 0); - hostname = mbedtls_ssl_get_hostname(&ssl); - TEST_ASSERT(strcmp(hostname0, hostname) == 0); + TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, input_hostname0) == 0); + output_hostname = mbedtls_ssl_get_hostname(&ssl); + TEST_ASSERT(strcmp(input_hostname0, output_hostname) == 0); - TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, hostname1) == 0); - hostname = mbedtls_ssl_get_hostname(&ssl); - TEST_ASSERT(strcmp(hostname1, hostname) == 0); + TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, input_hostname1) == 0); + output_hostname = mbedtls_ssl_get_hostname(&ssl); + TEST_ASSERT(strcmp(input_hostname1, output_hostname) == 0); exit: mbedtls_ssl_free(&ssl); From 6f0259e6da4d7677b48701a68adb529ea02b4473 Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Thu, 21 Sep 2023 10:34:32 +0800 Subject: [PATCH 2/2] AESNI: improve comments on some guards in aesni.h Signed-off-by: Pengyu Lv --- library/aesni.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/aesni.h b/library/aesni.h index ba14290298a4..5c5a0266bae8 100644 --- a/library/aesni.h +++ b/library/aesni.h @@ -165,6 +165,6 @@ int mbedtls_aesni_setkey_enc(unsigned char *rk, #endif #endif /* MBEDTLS_AESNI_HAVE_CODE */ -#endif /* MBEDTLS_AESNI_C */ +#endif /* MBEDTLS_AESNI_C && (MBEDTLS_ARCH_IS_X64 || MBEDTLS_ARCH_IS_X86) */ #endif /* MBEDTLS_AESNI_H */