mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-16 08:42:50 +00:00
Improve comments explaining legacy_methods_compression handling
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
parent
3918598e52
commit
a1c4f4cab6
@ -1355,17 +1355,16 @@ static int ssl_tls13_parse_client_hello(mbedtls_ssl_context *ssl,
|
|||||||
* compression methods and the length of the extensions.
|
* compression methods and the length of the extensions.
|
||||||
*
|
*
|
||||||
* cipher_suites cipher_suites_len bytes
|
* cipher_suites cipher_suites_len bytes
|
||||||
* legacy_compression_methods 2 bytes
|
* legacy_compression_methods length 1 byte
|
||||||
* extensions_len 2 bytes
|
|
||||||
*/
|
*/
|
||||||
MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cipher_suites_len + 2 + 2);
|
MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cipher_suites_len + 1);
|
||||||
p += cipher_suites_len;
|
p += cipher_suites_len;
|
||||||
cipher_suites_end = p;
|
cipher_suites_end = p;
|
||||||
|
|
||||||
/* Check if we have enough data for legacy_compression_methods
|
/* Check if we have enough data for legacy_compression_methods
|
||||||
* and a length byte.
|
* and the length of the extensions (2 bytes).
|
||||||
*/
|
*/
|
||||||
MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1 + p[0]);
|
MBEDTLS_SSL_CHK_BUF_READ_PTR(p + 1, end, p[0] + 2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search for the supported versions extension and parse it to determine
|
* Search for the supported versions extension and parse it to determine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user