Subject: [core-packages-team PATCH 1/2] gnu: perl-net-ssleay: Update to 1.94.

From: Greg Hogan <[email-masked]>
Date: Fri, 21 Mar 2025 18:03:45 +0000

* gnu/packages/patches/perl-net-ssleay-colon-parsing.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/base.scm (perl-net-ssleay): Update to 1.94.
[source](origin): Add patch.

Change-Id: Ie4b8bc713618fb72e86c07860fab30e47b96dc76
---
 gnu/local.mk                                  |  1 +
 .../perl-net-ssleay-colon-parsing.patch       | 28 +++++++++++++++++++
 gnu/packages/tls.scm                          |  5 ++--
 3 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/perl-net-ssleay-colon-parsing.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4d59992469..b156c57de7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2046,6 +2046,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/perl-image-exiftool-CVE-2021-22204.patch	\
   %D%/packages/patches/perl-net-amazon-s3-moose-warning.patch	\
   %D%/packages/patches/perl-net-dns-resolver-programmable-fix.patch	\
+  %D%/packages/patches/perl-net-ssleay-colon-parsing.patch	\
   %D%/packages/patches/perl-no-sys-dirs.patch			\
   %D%/packages/patches/perl-text-markdown-discount-unbundle.patch	\
   %D%/packages/patches/perl-module-pluggable-search.patch	\
diff --git a/gnu/packages/patches/perl-net-ssleay-colon-parsing.patch b/gnu/packages/patches/perl-net-ssleay-colon-parsing.patch
new file mode 100644
index 0000000000..532271cc3f
--- /dev/null
+++ b/gnu/packages/patches/perl-net-ssleay-colon-parsing.patch
@@ -0,0 +1,28 @@
+From e73cf1139a6651a968828d1634be8fec5beb50ba Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <[email-masked]>
+Date: Wed, 16 Oct 2024 21:48:51 +0200
+Subject: [PATCH] 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 <[email-masked]>
+---
+ 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<unsupported>}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
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 0c95e8e63f..01bca91aa3 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -817,14 +817,15 @@ (define-public letsencrypt
 (define-public perl-net-ssleay
   (package
     (name "perl-net-ssleay")
-    (version "1.92")
+    (version "1.94")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/C/CH/CHRISN/"
                                   "Net-SSLeay-" version ".tar.gz"))
               (sha256
                (base32
-                "1acnjd5180dca26dmjq0b9ib0dbavlrzd6fnf4nidrzj02rz5hj7"))))
+                "0pfrpi77964cg15dm6y0w03l64xs0k2nqc15qh2xmv8vdnjyhywx"))
+              (patches (search-patches "perl-net-ssleay-colon-parsing.patch"))))
     (build-system perl-build-system)
     (inputs (list openssl))
     (arguments
-- 
2.49.0