mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Rename badmac_seen to badmac_seen_or_in_hsfraglen
Prepare to unify two fields of the `mbedtls_ssl_context` structure: `badmac_seen` (always present but only used in DTLS) and `in_hsfraglen` (always present but only used in non-DTLS TLS). Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -5033,8 +5033,8 @@ static int ssl_get_next_record(mbedtls_ssl_context *ssl)
|
||||
}
|
||||
|
||||
if (ssl->conf->badmac_limit != 0) {
|
||||
++ssl->badmac_seen;
|
||||
if (ssl->badmac_seen >= ssl->conf->badmac_limit) {
|
||||
++ssl->badmac_seen_or_in_hsfraglen;
|
||||
if (ssl->badmac_seen_or_in_hsfraglen >= ssl->conf->badmac_limit) {
|
||||
MBEDTLS_SSL_DEBUG_MSG(1, ("too many records with bad MAC"));
|
||||
return MBEDTLS_ERR_SSL_INVALID_MAC;
|
||||
}
|
||||
|
Reference in New Issue
Block a user