🌐 AI搜索 & 代理 主页
Skip to content

Commit d74cfe3

Browse files
committed
Fix thinko in commit 7d129ba.
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.
1 parent 762faf7 commit d74cfe3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/ssl/t/001_ssltests.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ sub switch_server_cert
754754

755755
if ($ENV{OPENSSL} ne '')
756756
{
757-
$serialno = `$ENV{OPENSSL} x509 -serial -noout -in ssl/client.crt`;
757+
my $serialstr = `$ENV{OPENSSL} x509 -serial -noout -in ssl/client.crt`;
758758
if ($? == 0)
759759
{
760760
# OpenSSL prints serial numbers in hexadecimal and converting the serial
@@ -765,9 +765,9 @@ sub switch_server_cert
765765
{
766766
no warnings qw(portable);
767767

768-
$serialno =~ s/^serial=//;
769-
$serialno =~ s/\s+//g;
770-
$serialno = hex($serialno);
768+
$serialstr =~ s/^serial=//;
769+
$serialstr =~ s/\s+//g;
770+
$serialno = hex($serialstr);
771771
}
772772
}
773773
}

0 commit comments

Comments
 (0)