1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Improve comments

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard
2025-04-10 09:38:53 +02:00
parent 784041a28d
commit e38bc4c445
2 changed files with 4 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ exit:
return -1; return -1;
} }
/* Insert an empty record at the given offset. If offset is negative, /* Insert a (dummy) record at the given offset. If offset is negative,
* count from the end of the first record. */ * count from the end of the first record. */
static int recombine_insert_record(mbedtls_test_ssl_buffer *buf, static int recombine_insert_record(mbedtls_test_ssl_buffer *buf,
int offset, int offset,
@@ -3213,6 +3213,8 @@ void recombine_server_first_flight(int version,
} }
} }
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) #if defined(MBEDTLS_SSL_PROTO_TLS1_3)
/* A default TLS 1.3 handshake has only 1 flight from the server,
* while the default (non-resumption) 1.2 handshake has two. */
if (version >= MBEDTLS_SSL_VERSION_TLS1_3 && if (version >= MBEDTLS_SSL_VERSION_TLS1_3 &&
goal_state >= MBEDTLS_SSL_HANDSHAKE_OVER) { goal_state >= MBEDTLS_SSL_HANDSHAKE_OVER) {
TEST_EQUAL(ret, 0); TEST_EQUAL(ret, 0);

View File

@@ -150,7 +150,7 @@ recombine_server_first_flight:MBEDTLS_SSL_VERSION_TLS1_2:RECOMBINE_COALESCE_SPLI
# The last message of the first flight from the server is ServerHelloDone, # The last message of the first flight from the server is ServerHelloDone,
# which is an empty handshake message, i.e. of length 4. The library doesn't # which is an empty handshake message, i.e. of length 4. The library doesn't
# support fragmentation of a handshake message, so the last place where we # support fragmentation of a handshake header, so the last place where we
# can split the flight is 4+1 = 5 bytes before it ends, with 1 byte in the # can split the flight is 4+1 = 5 bytes before it ends, with 1 byte in the
# previous handshake message and 4 bytes of ServerHelloDone including header. # previous handshake message and 4 bytes of ServerHelloDone including header.
Recombine server flight 1: TLS 1.2, coalesce and split at end-5 Recombine server flight 1: TLS 1.2, coalesce and split at end-5