Address review feedback
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
2e3ecda684
commit
2fc9a652bc
4 changed files with 7 additions and 9 deletions
|
@ -37,5 +37,3 @@ Migration paths:
|
|||
* `MBEDTLS_ERR_SSL_BAD_CERTIFICATE`
|
||||
* `MBEDTLS_ERR_SSL_UNRECOGNIZED_NAME`
|
||||
instead.
|
||||
|
||||
Users should check for the generic error codes instead.
|
||||
|
|
|
@ -2558,7 +2558,7 @@ static int ssl_parse_server_ecdh_params_psa( mbedtls_ssl_context *ssl,
|
|||
|
||||
/* First byte is curve_type; only named_curve is handled */
|
||||
if( *(*p)++ != MBEDTLS_ECP_TLS_NAMED_CURVE )
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
|
||||
/* Next two bytes are the namedcurve value */
|
||||
tls_id = *(*p)++;
|
||||
|
@ -2569,7 +2569,7 @@ static int ssl_parse_server_ecdh_params_psa( mbedtls_ssl_context *ssl,
|
|||
if( ( handshake->ecdh_psa_type =
|
||||
mbedtls_psa_parse_tls_ecc_group( tls_id, &ecdh_bits ) ) == 0 )
|
||||
{
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
}
|
||||
if( ecdh_bits > 0xffff )
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
|
@ -2631,7 +2631,7 @@ static int ssl_parse_server_ecdh_params( mbedtls_ssl_context *ssl,
|
|||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1,
|
||||
( "bad server key exchange message (ECDHE curve)" ) );
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
}
|
||||
|
||||
return( ret );
|
||||
|
@ -2801,7 +2801,7 @@ static int ssl_parse_signature_algorithm( mbedtls_ssl_context *ssl,
|
|||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1,
|
||||
( "Server used unsupported HashAlgorithm %d", *(p)[0] ) );
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1785,7 +1785,7 @@ read_record_header:
|
|||
"during renegotiation" ) );
|
||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
}
|
||||
#endif
|
||||
ssl->secure_renegotiation = MBEDTLS_SSL_SECURE_RENEGOTIATION;
|
||||
|
|
|
@ -1907,8 +1907,8 @@ static int ssl_parse_certificate_chain( mbedtls_ssl_context *ssl,
|
|||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) );
|
||||
mbedtls_ssl_send_alert_message( ssl,
|
||||
MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR );
|
||||
return( MBEDTLS_ERR_SSL_DECODE_ERROR );
|
||||
MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
}
|
||||
|
||||
/* Read length of the next CRT in the chain. */
|
||||
|
|
Loading…
Reference in a new issue