Commit 7065655125 for openssl.org
commit 7065655125e80d3026adcb66b1bc60894e4d4d7b
Author: Bob Beck <beck@openssl.org>
Date: Sun Aug 16 16:44:48 2026 -0700
Poll the TLSProxy test sockets ten times a second
The forwarding loop waited a second at a time for data and gave up
after ten idle iterations. A TLS connection leaves the loop when the
sockets close, so it never waits, but DTLS runs over UDP where there
is no EOF, and a DTLS test whose handshake is not expected to complete
can only leave by exhausting the whole ten second budget. Two tests in
70-test_sslrecords did exactly that.
Poll at a tenth of a second instead. The iteration limit is unchanged,
so a second of complete silence now ends the connection rather than ten,
and a run that is only waiting for its exit condition notices ten times
sooner.
70-test_sslrecords goes from 32.3 to 13.7 seconds. The other TLSProxy
recipes are unaffected, as their loops exit on socket close without ever
reaching the timeout.
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Tue Sep 1 14:17:21 2026
Merged-from: https://github.com/openssl/openssl/pull/32404
diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index 7db4039d8d..b223caabc6 100644
--- a/util/perl/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
@@ -474,7 +474,7 @@ sub clientstart
$self->{client_epoch} = 0;
$self->{client_sequence_number} = 0;
- while($fdset->count && $ctr < 10) {
+ while($fdset->count && $ctr < 50) {
if (defined($self->{sessionfile})) {
# s_client got -ign_eof and won't be exiting voluntarily, so we
# look for data *and* session ticket...
@@ -495,7 +495,7 @@ sub clientstart
}
}
- if (!(@ready = $fdset->can_read(1))) {
+ if (!(@ready = $fdset->can_read(0.1))) {
my $success_flag = TLSProxy::Message->success();
my $handshake_done = $self->handshake_complete();
my $msg_end = TLSProxy::Message->end();
@@ -563,7 +563,7 @@ sub clientstart
}
}
- if ($ctr >= 10) {
+ if ($ctr >= 50) {
kill(3, $self->{real_serverpid});
print "No progress made\n";
$success = 0;