Skip to content

Commit 55adbf9

Browse files
authored
Merge pull request #1033 from dcooper16/client_sim_data_tls13
TLS 1.3 clients in update_client_sim_data.pl
2 parents e38a30d + 639b1af commit 55adbf9

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

utils/update_client_sim_data.pl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,17 @@
189189
$sim->{protos} = "protos+=(\"" . (join " ", reverse @proto_flags) . "\")";
190190
$sim->{tlsvers} = "tlsvers+=(\"" . (join " ", reverse @tls_flags) . "\")";
191191
$sim->{lowestProtocol} = sprintf("lowest_protocol+=(\"0x%04x\")", $client->{lowestProtocol});
192-
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x%04x\")", $client->{highestProtocol});
192+
# https://api.dev.ssllabs.com/api/v3/getClients incorrectly indicates
193+
# a highestProtocol of TLS 1.2 for clients that support TLS 1.3, which
194+
# can lead to client simulation reporting "no connection" if the connection
195+
# is made using TLS 1.3. In order to avoid this problem, assume that any
196+
# client with a highestProtocol of TLS 1.2 that supports any TLS 1.3
197+
# ciphers really supports TLS 1.3.
198+
if ( $client->{highestProtocol} != 771 || scalar(@ciphersuites) == 0 ) {
199+
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x%04x\")", $client->{highestProtocol});
200+
} else {
201+
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x0304\")", $client->{highestProtocol});
202+
}
193203

194204
if ( lc($client->{name}) eq "java" || lc($client->{name}) eq "openssl" ) {
195205
# Java and OpenSSL are generic clients

0 commit comments

Comments
 (0)