mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 16:06:53 +00:00
Fix TLS alert codes
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
78c601b529
commit
dd5f624f32
6
ChangeLog.d/fix_tls_alert_codes.txt
Normal file
6
ChangeLog.d/fix_tls_alert_codes.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
Bugfix
|
||||
* Fix the alert raised when a client requests an invalid
|
||||
* fragment length, as per RFC6066 section 4. We now alert with
|
||||
* MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER. Similarly, raise
|
||||
* MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR for an invalid finished
|
||||
* message, as per RFC5247 section 7.2.2.
|
|
@ -1525,7 +1525,7 @@ static int ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl,
|
|||
mbedtls_ssl_send_alert_message(
|
||||
ssl,
|
||||
MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
|
||||
MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER );
|
||||
return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
|
||||
}
|
||||
|
||||
|
|
|
@ -3610,7 +3610,7 @@ int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
|
|||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad finished message" ) );
|
||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR );
|
||||
MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR );
|
||||
return( MBEDTLS_ERR_SSL_BAD_HS_FINISHED );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue