Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c04342

Browse files
Fix SSL tests on 32-bit Perl
The certificate serial number generation was changed inb4c4a00 touse the current timestamp. The testharness must thus interrogate thecert for the serialnumber using "openssl x509" which emits the serialin hex format. Converting the serial to integer format to match whatsin pg_stat_ssl requires a 64-bit capable Perl. This adds a fallbackto checking for an integer when the tests with a 32-bit Perl.Per failure on buildfarm member prairiedog.Discussion:https://postgr.es/m/0D295F43-806D-4B3F-AB98-F941A19E0271@yesql.se
1 parent1607cd0 commit0c04342

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
use strict;
55
use warnings;
6+
use Configqw ( %Config);
67
use PostgresNode;
78
use TestLib;
89
use Test::More;
@@ -489,8 +490,19 @@
489490
my$serialno =`openssl x509 -serial -noout -in ssl/client.crt`;
490491
if ($? == 0)
491492
{
492-
$serialno =~s/^serial=//;
493-
$serialno =hex($serialno);# OpenSSL prints serial numbers in hexadecimal
493+
# OpenSSL prints serial numbers in hexadecimal and converting the serial
494+
# from hex requires a 64-bit capable Perl as the serialnumber is based on
495+
# the current timestamp. On 32-bit fall back to checking for it being an
496+
# integer like how we do when grabbing the serial fails.
497+
if ($Config{ivsize} == 8)
498+
{
499+
$serialno =~s/^serial=//;
500+
$serialno =hex($serialno);
501+
}
502+
else
503+
{
504+
$serialno ='\d+';
505+
}
494506
}
495507
else
496508
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp