mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Remove obselete checks due to the introduction of handhsake defragmen...
tation. h/t @waleed-elmelegy-arm
909e71672f
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
This commit is contained in:
committed by
Gilles Peskine
parent
c52273d017
commit
2878a0559e
@@ -1061,23 +1061,6 @@ read_record_header:
|
|||||||
size_t handshake_len = MBEDTLS_GET_UINT24_BE(buf, 1);
|
size_t handshake_len = MBEDTLS_GET_UINT24_BE(buf, 1);
|
||||||
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello v3, handshake len.: %u",
|
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello v3, handshake len.: %u",
|
||||||
(unsigned) handshake_len));
|
(unsigned) handshake_len));
|
||||||
|
|
||||||
/* The record layer has a record size limit of 2^14 - 1 and
|
|
||||||
* fragmentation is not supported, so buf[1] should be zero. */
|
|
||||||
if (buf[1] != 0) {
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != 0",
|
|
||||||
(unsigned) buf[1]));
|
|
||||||
return MBEDTLS_ERR_SSL_DECODE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We don't support fragmentation of ClientHello (yet?) */
|
|
||||||
if (msg_len != mbedtls_ssl_hs_hdr_len(ssl) + handshake_len) {
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG(1, ("bad client hello message: %u != %u + %u",
|
|
||||||
(unsigned) msg_len,
|
|
||||||
(unsigned) mbedtls_ssl_hs_hdr_len(ssl),
|
|
||||||
(unsigned) handshake_len));
|
|
||||||
return MBEDTLS_ERR_SSL_DECODE_ERROR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
|
Reference in New Issue
Block a user