Commit 1bc4ad1be9 for openssl.org
commit 1bc4ad1be9663009a7c956cc2dc14f71555bbcf0
Author: Igor Ustinov <igus68@gmail.com>
Date: Wed Mar 4 10:24:47 2026 +0100
Proxy.pm: Redirect s_server’s output to stderr
Under some circumstances, the test script's output was mixed with
s_server's, resulting in a false negative. To avoid this,
redirect s_server’s output to stderr.
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Mar 5 14:03:32 2026
(Merged from https://github.com/openssl/openssl/pull/30230)
diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index aa6c9ff9a8..aabcf21b73 100644
--- a/util/perl/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
@@ -369,7 +369,7 @@ sub start
# Process the output from s_server until we find the ACCEPT line, which
# tells us what the accepting address and port are.
while (<>) {
- print;
+ print STDERR $_;
s/\R$//; # Better chomp
next unless (/^ACCEPT\s.*:(\d+)$/);
$self->{server_port} = $1;
@@ -390,7 +390,7 @@ sub start
my $error;
$pid = undef;
if (eval { require Win32::Process; 1; }) {
- if (Win32::Process::Create(my $h, $^X, "perl -ne print", 0, 0, ".")) {
+ if (Win32::Process::Create(my $h, $^X, 'perl -ne "print STDERR $_"', 0, 0, ".")) {
$pid = $h->GetProcessID();
$self->{proc_handle} = $h; # hold handle till next round [or exit]
} else {
@@ -398,7 +398,7 @@ sub start
}
} else {
if (defined($pid = fork)) {
- $pid or exec("$^X -ne print") or exit($!);
+ $pid or exec($^X, '-ne', 'print STDERR $_') or exit($!);
} else {
$error = $!;
}