1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

skip some extensions if ephemeral not enabled

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu
2022-01-11 16:28:00 +08:00
parent 63282b4321
commit f46b016058
3 changed files with 33 additions and 46 deletions

View File

@ -7239,11 +7239,7 @@ int mbedtls_ssl_write_supported_groups_ext( mbedtls_ssl_context *ssl,
const uint16_t *group_list = mbedtls_ssl_get_groups( ssl );
*out_len = 0;
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
if( mbedtls_ssl_conf_is_tls13_only( ssl->conf )
&& !mbedtls_ssl_conf_tls13_some_ephemeral_enabled( ssl ) )
return( 0 );
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding supported_groups extension" ) );
/* Check if we have space for header and length fields: