mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 10:20:45 +00:00
Check for TLS 1.3 version first
Check for TLS 1.3 version first when parsing the supported versions extension as it is the most likely version. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
b828c7d3de
commit
3bd2b02486
@ -751,13 +751,13 @@ static int ssl_tls13_parse_supported_versions_ext(mbedtls_ssl_context *ssl,
|
|||||||
tls_version = mbedtls_ssl_read_version(p, ssl->conf->transport);
|
tls_version = mbedtls_ssl_read_version(p, ssl->conf->transport);
|
||||||
p += 2;
|
p += 2;
|
||||||
|
|
||||||
if ((MBEDTLS_SSL_VERSION_TLS1_2 == tls_version) &&
|
if (MBEDTLS_SSL_VERSION_TLS1_3 == tls_version) {
|
||||||
mbedtls_ssl_conf_is_tls12_enabled(ssl->conf)) {
|
|
||||||
found_supported_version = 1;
|
found_supported_version = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MBEDTLS_SSL_VERSION_TLS1_3 == tls_version) {
|
if ((MBEDTLS_SSL_VERSION_TLS1_2 == tls_version) &&
|
||||||
|
mbedtls_ssl_conf_is_tls12_enabled(ssl->conf)) {
|
||||||
found_supported_version = 1;
|
found_supported_version = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user