1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-18 17:14:12 +03:00

Add ALPN checking when accepting early data

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
Waleed Elmelegy
2024-03-14 01:48:40 +00:00
parent 131b2ffd89
commit 4dfb0e7c90
6 changed files with 118 additions and 1 deletions

View File

@@ -833,6 +833,12 @@ int mbedtls_test_ssl_endpoint_init(
options->max_early_data_size);
}
#endif
#if defined(MBEDTLS_SSL_ALPN)
/* check that alpn_list contains at least one valid entry */
if (options->alpn_list[0] != NULL) {
mbedtls_ssl_conf_alpn_protocols(&(ep->conf), options->alpn_list);
}
#endif
#endif
#if defined(MBEDTLS_SSL_CACHE_C) && defined(MBEDTLS_SSL_SRV_C)