diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 062ff25dd8..c1436c5321 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -8233,7 +8233,7 @@ int mbedtls_psa_ecjpake_read_round( } if( input_offset != len ) - return PSA_ERROR_INVALID_ARGUMENT; + return MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE; return( 0 ); } diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index 8fcf5a4f5e..7c293ec9e4 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -2354,7 +2354,7 @@ start_processing: if( ( *p != MBEDTLS_ECP_TLS_NAMED_CURVE ) || ( read_tls_id != curve_info->tls_id ) ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); + return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER ); p += 3;