Skip to content

Commit 909e716

Browse files
Remove obselete checks due to the introduction of handhsake defragmentation
Signed-off-by: Waleed Elmelegy <[email protected]>
1 parent cc8badd commit 909e716

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

library/ssl_tls12_server.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,23 +1019,6 @@ static int ssl_parse_client_hello(mbedtls_ssl_context *ssl)
10191019
size_t handshake_len = MBEDTLS_GET_UINT24_BE(buf, 1);
10201020
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello v3, handshake len.: %u",
10211021
(unsigned) handshake_len));
1022-
1023-
/* The record layer has a record size limit of 2^14 - 1 and
1024-
* fragmentation is not supported, so buf[1] should be zero. */
1025-
if (buf[1] != 0) {
1026-
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != 0",
1027-
(unsigned) buf[1]));
1028-
return MBEDTLS_ERR_SSL_DECODE_ERROR;
1029-
}
1030-
1031-
/* We don't support fragmentation of ClientHello (yet?) */
1032-
if (msg_len != mbedtls_ssl_hs_hdr_len(ssl) + handshake_len) {
1033-
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != %u + %u",
1034-
(unsigned) msg_len,
1035-
(unsigned) mbedtls_ssl_hs_hdr_len(ssl),
1036-
(unsigned) handshake_len));
1037-
return MBEDTLS_ERR_SSL_DECODE_ERROR;
1038-
}
10391022
}
10401023

10411024
#if defined(MBEDTLS_SSL_PROTO_DTLS)

0 commit comments

Comments
 (0)