mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 03:40:04 +00:00
Merge pull request #7905 from lpy4105/issue/misc-improvement
misc improvements
This commit is contained in:
commit
c44042ddbc
@ -155,6 +155,6 @@ int mbedtls_aesni_setkey_enc(unsigned char *rk,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_AESNI_HAVE_CODE */
|
#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 */
|
#endif /* MBEDTLS_AESNI_H */
|
||||||
|
@ -1145,21 +1145,21 @@ exit:
|
|||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */
|
/* 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_context ssl;
|
||||||
|
|
||||||
mbedtls_ssl_init(&ssl);
|
mbedtls_ssl_init(&ssl);
|
||||||
USE_PSA_INIT();
|
USE_PSA_INIT();
|
||||||
|
|
||||||
TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, hostname0) == 0);
|
TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, input_hostname0) == 0);
|
||||||
hostname = mbedtls_ssl_get_hostname(&ssl);
|
output_hostname = mbedtls_ssl_get_hostname(&ssl);
|
||||||
TEST_ASSERT(strcmp(hostname0, hostname) == 0);
|
TEST_ASSERT(strcmp(input_hostname0, output_hostname) == 0);
|
||||||
|
|
||||||
TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, hostname1) == 0);
|
TEST_ASSERT(mbedtls_ssl_set_hostname(&ssl, input_hostname1) == 0);
|
||||||
hostname = mbedtls_ssl_get_hostname(&ssl);
|
output_hostname = mbedtls_ssl_get_hostname(&ssl);
|
||||||
TEST_ASSERT(strcmp(hostname1, hostname) == 0);
|
TEST_ASSERT(strcmp(input_hostname1, output_hostname) == 0);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_ssl_free(&ssl);
|
mbedtls_ssl_free(&ssl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user