mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-25 02:02:03 +03:00
Merge pull request #8854 from ronald-cron-arm/tls13-srv-max-early-data-size
TLS 1.3: Enforce max_early_data_size on server
This commit is contained in:
@ -67,6 +67,7 @@ void mbedtls_test_init_handshake_options(
|
||||
opts->legacy_renegotiation = MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION;
|
||||
opts->resize_buffers = 1;
|
||||
opts->early_data = MBEDTLS_SSL_EARLY_DATA_DISABLED;
|
||||
opts->max_early_data_size = -1;
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
TEST_CALLOC(opts->cache, 1);
|
||||
mbedtls_ssl_cache_init(opts->cache);
|
||||
@ -825,6 +826,13 @@ int mbedtls_test_ssl_endpoint_init(
|
||||
|
||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||
mbedtls_ssl_conf_early_data(&(ep->conf), options->early_data);
|
||||
#if defined(MBEDTLS_SSL_SRV_C)
|
||||
if (endpoint_type == MBEDTLS_SSL_IS_SERVER &&
|
||||
(options->max_early_data_size >= 0)) {
|
||||
mbedtls_ssl_conf_max_early_data_size(&(ep->conf),
|
||||
options->max_early_data_size);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_CACHE_C) && defined(MBEDTLS_SSL_SRV_C)
|
||||
|
Reference in New Issue
Block a user