Merge pull request #7905 from lpy4105/issue/misc-improvement

misc improvements
This commit is contained in:
Dave Rodgman 2023-11-23 16:20:58 +00:00 committed by GitHub
commit c44042ddbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -155,6 +155,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 */

View File

@ -1145,21 +1145,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);