mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-06 03:40:04 +00:00
Add unit test for max_early_data_size of ticket
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
33bf240e53
commit
34e9516cb6
@ -1638,6 +1638,10 @@ int mbedtls_test_ssl_tls13_populate_session(mbedtls_ssl_session *session,
|
||||
session->resumption_key_len = 32;
|
||||
memset(session->resumption_key, 0x99, sizeof(session->resumption_key));
|
||||
|
||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||
session->max_early_data_size = 0x87654321;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
if (session->endpoint == MBEDTLS_SSL_IS_SERVER) {
|
||||
session->start = mbedtls_time(NULL) - 42;
|
||||
|
@ -2042,6 +2042,12 @@ void ssl_serialize_session_save_load(int ticket_len, char *crt_file,
|
||||
restored.resumption_key,
|
||||
original.resumption_key_len) == 0);
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||
TEST_ASSERT(
|
||||
original.max_early_data_size == restored.max_early_data_size);
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_SSL_SRV_C)
|
||||
if (endpoint_type == MBEDTLS_SSL_IS_SERVER) {
|
||||
TEST_ASSERT(original.start == restored.start);
|
||||
|
Loading…
x
Reference in New Issue
Block a user