mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
ssl_tls12_server.c: Document replay check and update in ssl_parse_client_hello()
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -938,6 +938,9 @@ read_record_header:
|
||||
memcpy(&ssl->cur_out_ctr[2], ssl->in_ctr + 2,
|
||||
sizeof(ssl->cur_out_ctr) - 2);
|
||||
|
||||
/* Check for record replay and then update the window. This replicates what
|
||||
* is done in `ssl_get_next_record()` when the record is not fetched through
|
||||
* `mbedtls_ssl_read_record()`. */
|
||||
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
|
||||
if (mbedtls_ssl_dtls_replay_check(ssl) != 0) {
|
||||
MBEDTLS_SSL_DEBUG_MSG(1, ("replayed record, discarding"));
|
||||
|
||||
Reference in New Issue
Block a user