You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* The Server Hello *record* passed into this function can have multiple handshake protocols inside. We need to find the Server Hello *handshake protocol*, specifically, since that contains the extensions we need to parse. */
4910
+
unsigned inthandshake_record_ptr=5;
4911
+
while (handshake_record_ptr<handshake_record_len) {
/* If we find TLS version 0x0304 in the supported_versions extension, then the server supports TLSv1.3! */
4949
+
if ((tls_high_byte==3) && (tls_low_byte==4))
4950
+
return1;
4951
+
}
4952
+
}
4953
+
4954
+
extensions_offset+= (4+extension_len);
4955
+
}
4956
+
4957
+
/* We already found the Server Hello protocol handshake and looked through all the extensions. If we reached here, then there's no point in continuing. */
@@ -4992,6 +5056,10 @@ unsigned int checkIfTLSVersionIsSupported(struct sslCheckOptions *options, unsig
4992
5056
if ((server_tls_version_high!=3) || (server_tls_version_low!=expected_tls_version_low))
4993
5057
goto done;
4994
5058
5059
+
/* TLSv1.3's ServerHello will be tagged as TLSv1.2 in the header, but will include v1.3 in the supported_versions extension. Some servers (like Windows Server 2019), when only supporting v1.2, will still respond with a ServerHello to our v1.3 Client Hello. So to eliminate false positives, we need to check the supported_versions extension and ensure v1.3 is listed there. */
5060
+
if ((tls_version==TLSv1_3) && (!checkSupportedVersionsExtensionForTLS13(server_hello)))
5061
+
goto done;
5062
+
4995
5063
/* A valid Server Hello was returned, so this TLS version is supported. */
4996
5064
ret= true;
4997
5065
@@ -5052,6 +5120,9 @@ bs *makeCiphersuiteListAll(unsigned int tls_version) {
0 commit comments