summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-10-20 08:45:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-10-20 08:45:57 -0400
commitd74cfe3263fa0a35cb962570697f422775cd12d6 (patch)
treed36d2e3dab99a15c1c27105d9814da30760d0004
parent762faf702c6f7292bd02705553078700d92c15f1 (diff)
Fix thinko in commit 7d129ba54.
The revised logic in 001_ssltests.pl would fail if openssl doesn't work or if Perl is a 32-bit build, because it had already overwritten $serialno with something inappropriate to use in the eventual match. We could go back to the previous code layout, but it seems best to introduce a separate variable for the output of openssl. Per failure on buildfarm member mamba, which has a 32-bit Perl.
-rw-r--r--src/test/ssl/t/001_ssltests.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl
index eaee88d027e..310d70a4c08 100644
--- a/src/test/ssl/t/001_ssltests.pl
+++ b/src/test/ssl/t/001_ssltests.pl
@@ -754,7 +754,7 @@ my $serialno = '\d+';
if ($ENV{OPENSSL} ne '')
{
- $serialno = `$ENV{OPENSSL} x509 -serial -noout -in ssl/client.crt`;
+ my $serialstr = `$ENV{OPENSSL} x509 -serial -noout -in ssl/client.crt`;
if ($? == 0)
{
# OpenSSL prints serial numbers in hexadecimal and converting the serial
@@ -765,9 +765,9 @@ if ($ENV{OPENSSL} ne '')
{
no warnings qw(portable);
- $serialno =~ s/^serial=//;
- $serialno =~ s/\s+//g;
- $serialno = hex($serialno);
+ $serialstr =~ s/^serial=//;
+ $serialstr =~ s/\s+//g;
+ $serialno = hex($serialstr);
}
}
}