Skip to content

Commit 639b1af

Browse files
dcooper16David Cooper
authored andcommitted
TLS 1.3 clients in update_client_sim_data.pl
https://api.dev.ssllabs.com/api/v3/getClients incorrectly indicates a highestProtocol of 771 (TLS 1.2) for clients that support TLS 1.3, which leads run_client_simulation() to incorrectly report "no connection" if the client would have actually connected using TLS 1.3. This has been addressed by manually editing etc/client-simulation.txt to set the highest_protocol to 0x0304 for the clients that support TLS 1.3. This PR modifies update_client_sim_data.pl to automatically apply the fix for clients that support TLS 1.3 in order to avoid a possible regression when etc/client-simulation.txt is updated.
1 parent ea4fb55 commit 639b1af

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
@@ -184,7 +184,17 @@
184184
$sim->{protos} = "protos+=(\"" . (join " ", reverse @proto_flags) . "\")";
185185
$sim->{tlsvers} = "tlsvers+=(\"" . (join " ", reverse @tls_flags) . "\")";
186186
$sim->{lowestProtocol} = sprintf("lowest_protocol+=(\"0x%04x\")", $client->{lowestProtocol});
187-
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x%04x\")", $client->{highestProtocol});
187+
# https://api.dev.ssllabs.com/api/v3/getClients incorrectly indicates
188+
# a highestProtocol of TLS 1.2 for clients that support TLS 1.3, which
189+
# can lead to client simulation reporting "no connection" if the connection
190+
# is made using TLS 1.3. In order to avoid this problem, assume that any
191+
# client with a highestProtocol of TLS 1.2 that supports any TLS 1.3
192+
# ciphers really supports TLS 1.3.
193+
if ( $client->{highestProtocol} != 771 || scalar(@ciphersuites) == 0 ) {
194+
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x%04x\")", $client->{highestProtocol});
195+
} else {
196+
$sim->{highestProtocol} = sprintf("highest_protocol+=(\"0x0304\")", $client->{highestProtocol});
197+
}
188198

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

0 commit comments

Comments
 (0)