mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
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.
This commit is contained in:
parent
762faf702c
commit
d74cfe3263
|
|
@ -754,7 +754,7 @@ my $serialno = '\d+';
|
||||||
|
|
||||||
if ($ENV{OPENSSL} ne '')
|
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)
|
if ($? == 0)
|
||||||
{
|
{
|
||||||
# OpenSSL prints serial numbers in hexadecimal and converting the serial
|
# OpenSSL prints serial numbers in hexadecimal and converting the serial
|
||||||
|
|
@ -765,9 +765,9 @@ if ($ENV{OPENSSL} ne '')
|
||||||
{
|
{
|
||||||
no warnings qw(portable);
|
no warnings qw(portable);
|
||||||
|
|
||||||
$serialno =~ s/^serial=//;
|
$serialstr =~ s/^serial=//;
|
||||||
$serialno =~ s/\s+//g;
|
$serialstr =~ s/\s+//g;
|
||||||
$serialno = hex($serialno);
|
$serialno = hex($serialstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user