diff --git a/backport-Update-tests-to-pass-with-OpenSSL-3.4.patch b/backport-Update-tests-to-pass-with-OpenSSL-3.4.patch new file mode 100644 index 0000000000000000000000000000000000000000..d0cbd105520d7e8a096aa1d816cfe00bac6a20f1 --- /dev/null +++ b/backport-Update-tests-to-pass-with-OpenSSL-3.4.patch @@ -0,0 +1,62 @@ +From 4068d585875d3ba99da2cbe41f60d0dd4f4290d1 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 16 Oct 2024 21:48:51 +0200 +Subject: [PATCH 1/3] test: 32_x509_get_cert_info allow single colon. + +Starting with 3.4.0 the double colon in emailAddress has been removed. +Adapt the test to allow a single colon in 3.4.0 and later. + +Signed-off-by: Sebastian Andrzej Siewior +--- + t/local/32_x509_get_cert_info.t | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/t/local/32_x509_get_cert_info.t b/t/local/32_x509_get_cert_info.t +index 0f7e2d5a..0fd1b689 100644 +--- a/t/local/32_x509_get_cert_info.t ++++ b/t/local/32_x509_get_cert_info.t +@@ -188,6 +188,10 @@ for my $f (keys (%$dump)) { + ) { + $ext_data =~ s{(othername:) [^, ]+}{$1}g; + } ++ # Starting with 3.4.0 the double colon in emailAddress has been removed. ++ if (Net::SSLeay::SSLeay >= 0x30400000) { ++ $ext_data =~ s{emailAddress::}{emailAddress:}; ++ } + } + elsif ( $nid == 89 ) { + # The output formatting for certificate policies has a + +From eac7ac502b02f44a84a67920e9f634cce71ff335 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Tue, 18 Feb 2025 18:57:15 +0100 +Subject: [PATCH 2/3] tests: Address another formatting difference in OpenSSL + 3.4.1 + +Since OpenSSL 3.4.1, commit 8a28bca8ee08 ("x509: add a newline after +printing Full Name") to be exact, there is another new line change. + +Adapt the testsuite. + +Fixes: #513 + +Signed-off-by: Sebastian Andrzej Siewior +--- + t/local/32_x509_get_cert_info.t | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/t/local/32_x509_get_cert_info.t b/t/local/32_x509_get_cert_info.t +index 0fd1b689..08316bf9 100644 +--- a/t/local/32_x509_get_cert_info.t ++++ b/t/local/32_x509_get_cert_info.t +@@ -218,6 +218,9 @@ for my $f (keys (%$dump)) { + # OpenSSL 1.0.0 to 1.1.1: + $ext_data =~ s{(Full Name:\n )}{\n$1}g; + $ext_data .= "\n"; ++ } elsif ( Net::SSLeay::SSLeay > 0x3040000f ) { ++ $ext_data =~ s{(\nFull Name:)}{\n$1}g; ++ $ext_data .= "\n"; + } + } + elsif ( $nid == 126 ) { + diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec index 4efa34afe311c379e00fb7571ff5f926e6173dfe..aaaa8f618d260a6032f1739334fd068c1ed07488 100644 --- a/perl-Net-SSLeay.spec +++ b/perl-Net-SSLeay.spec @@ -1,10 +1,11 @@ Name: perl-Net-SSLeay Version: 1.94 -Release: 1 +Release: 2 Summary: Perl module for using OpenSSL License: Artistic 2.0 URL: https://metacpan.org/release/Net-SSLeay -Source0: https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-%{version}.tar.gz +Source0: %{cpan_source} +Patch6001: backport-Update-tests-to-pass-with-OpenSSL-3.4.patch # Build requires BuildRequires: openssl-devel perl-devel perl-generators gcc bc openssl zlib-devel @@ -35,7 +36,7 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 make test %files -%license LICENSE +%license LICENSE META.json %doc Changes Credits README CONTRIBUTING.md %{perl_vendorarch}/auto/Net/* %{perl_vendorarch}/Net/SSLeay* @@ -45,6 +46,9 @@ make test %doc QuickRef examples/ %changelog +* Fri Nov 07 2025 Funda Wang - 1.94-2 +- fix test with openssl 3.4 + * Wed Jan 31 2024 woody2918 - 1.94-1 - update version to 1.94 - supports all stable releases of OpenSSL 3.1 and 3.2, and LibreSSL 3.5 - 3.8.