diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 75f2256522..1a5a25f9bc 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -2385,7 +2385,12 @@ static int ssl_parse_server_ecdh_params_psa( mbedtls_ssl_context *ssl, /* Check it's a curve we offered */ if( mbedtls_ssl_check_curve_tls_id( ssl, tls_id ) != 0 ) + { + MBEDTLS_SSL_DEBUG_MSG( 2, + ( "bad server key exchange message (ECDHE curve): %u", + (unsigned) tls_id ) ); return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE ); + } /* Convert EC group to PSA key type. */ if( ( handshake->ecdh_psa_type =