Skip to content

Commit 2878a05

Browse files
rojergilles-peskine-arm
authored andcommitted
Remove obselete checks due to the introduction of handhsake defragmen...
tation. h/t @waleed-elmelegy-arm 909e716 Signed-off-by: Waleed Elmelegy <[email protected]> Signed-off-by: Deomid rojer Ryabkov <[email protected]>
1 parent c52273d commit 2878a05

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
@@ -1061,23 +1061,6 @@ static int ssl_parse_client_hello(mbedtls_ssl_context *ssl)
10611061
size_t handshake_len = MBEDTLS_GET_UINT24_BE(buf, 1);
10621062
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello v3, handshake len.: %u",
10631063
(unsigned) handshake_len));
1064-
1065-
/* The record layer has a record size limit of 2^14 - 1 and
1066-
* fragmentation is not supported, so buf[1] should be zero. */
1067-
if (buf[1] != 0) {
1068-
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != 0",
1069-
(unsigned) buf[1]));
1070-
return MBEDTLS_ERR_SSL_DECODE_ERROR;
1071-
}
1072-
1073-
/* We don't support fragmentation of ClientHello (yet?) */
1074-
if (msg_len != mbedtls_ssl_hs_hdr_len(ssl) + handshake_len) {
1075-
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != %u + %u",
1076-
(unsigned) msg_len,
1077-
(unsigned) mbedtls_ssl_hs_hdr_len(ssl),
1078-
(unsigned) handshake_len));
1079-
return MBEDTLS_ERR_SSL_DECODE_ERROR;
1080-
}
10811064
}
10821065

10831066
#if defined(MBEDTLS_SSL_PROTO_DTLS)

0 commit comments

Comments
 (0)