Add debug message for wrong curve
The non-PSA path has a debug message here, so let's have a similar one
in the PSA case - just add the curve ID to be a bit more informative.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 75f2256..1a5a25f 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -2385,7 +2385,12 @@
/* 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 =