mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 20:08:22 +00:00
Document code silently discarding invalid records
This commit is contained in:
parent
f569f701c2
commit
01692531c6
1 changed files with 2 additions and 0 deletions
|
@ -3495,6 +3495,8 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "unknown record type" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "unknown record type" ) );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
|
/* Silently ignore invalid DTLS records as recommended by RFC 6347
|
||||||
|
* Section 4.1.2.7 */
|
||||||
if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||||
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
||||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||||
|
|
Loading…
Reference in a new issue