ssl_tls12_server.c: Document replay check and update in ssl_parse_client_hello()

Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
Ronald Cron
2026-02-23 12:12:36 +01:00
parent 2e9b9681e6
commit 516e74ca5c
+3
View File
@@ -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"));