Skip to content

Commit c8993e0

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

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

library/ssl_tls12_server.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,28 +1015,6 @@ static int ssl_parse_client_hello(mbedtls_ssl_context *ssl)
10151015
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message"));
10161016
return MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
10171017
}
1018-
{
1019-
size_t handshake_len = MBEDTLS_GET_UINT24_BE(buf, 1);
1020-
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello v3, handshake len.: %u",
1021-
(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-
}
1039-
}
10401018

10411019
#if defined(MBEDTLS_SSL_PROTO_DTLS)
10421020
if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) {

0 commit comments

Comments
 (0)