summaryrefslogtreecommitdiffstats
path: root/meta-perl/recipes-perl/libnet/libnet-ssleay-perl
diff options
context:
space:
mode:
Diffstat (limited to 'meta-perl/recipes-perl/libnet/libnet-ssleay-perl')
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-test-32_x509_get_cert_info-allow-single-colon.patch29
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-tests-Address-another-formatting-difference-in-OpenSSL-3.4.1.patch32
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-ssleay-perl/no-exec-on-configure.patch37
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-ssleay-perl/run-ptest27
4 files changed, 88 insertions, 37 deletions
diff --git a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-test-32_x509_get_cert_info-allow-single-colon.patch b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-test-32_x509_get_cert_info-allow-single-colon.patch
new file mode 100644
index 0000000000..805a16d6c9
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-test-32_x509_get_cert_info-allow-single-colon.patch
@@ -0,0 +1,29 @@
1From 4068d585875d3ba99da2cbe41f60d0dd4f4290d1 Mon Sep 17 00:00:00 2001
2From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
3Date: Wed, 16 Oct 2024 21:48:51 +0200
4Subject: [PATCH] test: 32_x509_get_cert_info allow single colon.
5
6Starting with 3.4.0 the double colon in emailAddress has been removed.
7Adapt the test to allow a single colon in 3.4.0 and later.
8
9Upstream-Status: Backport [https://github.com/radiator-software/p5-net-ssleay/commit/4068d585875d3ba99da2cbe41f60d0dd4f4290d1]
10Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
11---
12 t/local/32_x509_get_cert_info.t | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/t/local/32_x509_get_cert_info.t b/t/local/32_x509_get_cert_info.t
16index 0f7e2d5a..0fd1b689 100644
17--- a/t/local/32_x509_get_cert_info.t
18+++ b/t/local/32_x509_get_cert_info.t
19@@ -188,6 +188,10 @@ for my $f (keys (%$dump)) {
20 ) {
21 $ext_data =~ s{(othername:) [^, ]+}{$1<unsupported>}g;
22 }
23+ # Starting with 3.4.0 the double colon in emailAddress has been removed.
24+ if (Net::SSLeay::SSLeay >= 0x30400000) {
25+ $ext_data =~ s{emailAddress::}{emailAddress:};
26+ }
27 }
28 elsif ( $nid == 89 ) {
29 # The output formatting for certificate policies has a
diff --git a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-tests-Address-another-formatting-difference-in-OpenSSL-3.4.1.patch b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-tests-Address-another-formatting-difference-in-OpenSSL-3.4.1.patch
new file mode 100644
index 0000000000..17310908c1
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0001-tests-Address-another-formatting-difference-in-OpenSSL-3.4.1.patch
@@ -0,0 +1,32 @@
1From eac7ac502b02f44a84a67920e9f634cce71ff335 Mon Sep 17 00:00:00 2001
2From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
3Date: Tue, 18 Feb 2025 18:57:15 +0100
4Subject: [PATCH] tests: Address another formatting difference in OpenSSL 3.4.1
5
6Since OpenSSL 3.4.1, commit 8a28bca8ee08 ("x509: add a newline after
7printing Full Name") to be exact, there is another new line change.
8
9Adapt the testsuite.
10
11Fixes: #513
12
13Upstream-Status: Backport [https://github.com/radiator-software/p5-net-ssleay/commit/eac7ac502b02f44a84a67920e9f634cce71ff335]
14Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
15---
16 t/local/32_x509_get_cert_info.t | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/t/local/32_x509_get_cert_info.t b/t/local/32_x509_get_cert_info.t
20index 0fd1b68..08316bf 100644
21--- a/t/local/32_x509_get_cert_info.t
22+++ b/t/local/32_x509_get_cert_info.t
23@@ -218,6 +218,9 @@ for my $f (keys (%$dump)) {
24 # OpenSSL 1.0.0 to 1.1.1:
25 $ext_data =~ s{(Full Name:\n )}{\n$1}g;
26 $ext_data .= "\n";
27+ } elsif ( Net::SSLeay::SSLeay > 0x3040000f ) {
28+ $ext_data =~ s{(\nFull Name:)}{\n$1}g;
29+ $ext_data .= "\n";
30 }
31 }
32 elsif ( $nid == 126 ) {
diff --git a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/no-exec-on-configure.patch b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/no-exec-on-configure.patch
deleted file mode 100644
index 9620df5ece..0000000000
--- a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/no-exec-on-configure.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Avoid running target binaries during in cross build
2
3Upstream-Status: Inappropriate [Cross-compile specific]
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5--- a/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2018-08-27 14:56:24.788544991 +0200
6+++ b/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2018-08-27 15:00:12.847266331 +0200
7@@ -24,20 +24,7 @@
8 $self->requires_external_cc;
9
10 my $prefix = $self->find_openssl_prefix;
11- my $exec = $self->find_openssl_exec($prefix);
12-
13- unless (-x $exec) {
14- print <<EOM;
15-*** Could not find OpenSSL
16- If it's already installed, please set the OPENSSL_PREFIX environment
17- variable accordingly. If it isn't installed yet, get the latest version
18- from http://www.openssl.org/.
19-EOM
20- exit 0; # according http://wiki.cpantesters.org/wiki/CPANAuthorNotes this is best-practice when "missing library"
21- }
22-
23- $self->check_openssl_version($prefix, $exec);
24- my $opts = $self->ssleay_get_build_opts($prefix, $exec);
25+ my $opts = $self->ssleay_get_build_opts($prefix);
26
27 $self->makemaker_args(
28 CCCDLFLAGS => $opts->{cccdlflags},
29@@ -58,7 +45,7 @@
30 }
31
32 sub ssleay_get_build_opts {
33- my ($self, $prefix, $exec) = @_;
34+ my ($self, $prefix) = @_;
35
36 my $opts = {
37 lib_links => [],
diff --git a/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/run-ptest b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/run-ptest
new file mode 100644
index 0000000000..03e3172e3b
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-ssleay-perl/run-ptest
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3result=0
4
5if ! nslookup example.com; then
6 mv /etc/resolv.conf /etc/resolv.conf.bak
7 echo "nameserver 8.8.8.8" > /etc/resolv.conf
8 trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT
9fi
10
11for case in `find t -type f -name '*.t'`; do
12 perl -I . $case >$case.output 2>&1
13 ret=$?
14 cat $case.output
15 if [ $ret -ne 0 ]; then
16 result=1
17 echo "FAIL: ${case%.t}"
18 elif grep -i 'SKIP' $case.output; then
19 echo "SKIP: ${case%.t}"
20 else
21 echo "PASS: ${case%.t}"
22 fi
23
24 rm -f $case.output
25done
26
27exit $result