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

@ -165,16 +165,6 @@ int mbedtls_ssl_tls13_write_sig_alg_ext( mbedtls_ssl_context *ssl,
*out_len = 0;
/* Skip the extension on the client if all allowed key exchanges
* are PSK-based. */
#if defined(MBEDTLS_SSL_CLI_C)
if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT &&
!mbedtls_ssl_conf_tls13_some_ephemeral_enabled( ssl ) )
{
return( 0 );
}
#endif /* MBEDTLS_SSL_CLI_C */
MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding signature_algorithms extension" ) );
/* Check if we have space for header and length field: