mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-07-31 16:27:46 +00:00
tests: ssl: Add hostname checks in session serialization tests
Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
@@ -1831,6 +1831,14 @@ int mbedtls_test_ssl_tls13_populate_session(mbedtls_ssl_session *session,
|
||||
}
|
||||
memset(session->ticket, 33, ticket_len);
|
||||
}
|
||||
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
||||
char hostname[] = "hostname example";
|
||||
session->hostname = mbedtls_calloc(1, sizeof(hostname));
|
||||
if (session->hostname == NULL) {
|
||||
return -1;
|
||||
}
|
||||
memcpy(session->hostname, hostname, sizeof(hostname));
|
||||
#endif
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_CLI_C */
|
||||
|
||||
Reference in New Issue
Block a user