[packages/perl-Crypt-OpenSSL-RSA] Rel 3. Accept PEM private keys preceded by text.
arekm
arekm at pld-linux.org
Thu Oct 29 08:56:36 CET 2026
commit c2e468f287f877172e6e56591cbd402ad2239f71
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 29 01:54:06 2026 +0100
Rel 3. Accept PEM private keys preceded by text.
perl-Crypt-OpenSSL-RSA-pem-leading-text.patch | 14 ++++++++++++++
perl-Crypt-OpenSSL-RSA.spec | 4 +++-
2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/perl-Crypt-OpenSSL-RSA.spec b/perl-Crypt-OpenSSL-RSA.spec
index 2fa0ec1..c67da27 100644
--- a/perl-Crypt-OpenSSL-RSA.spec
+++ b/perl-Crypt-OpenSSL-RSA.spec
@@ -8,12 +8,13 @@ Summary: Crypt::OpenSSL::RSA - RSA encoding and decoding, using the OpenSSL libr
Summary(pl.UTF-8): Crypt::OpenSSL::RSA - kodowanie i dekodowanie RSA przy użyciu OpenSSL
Name: perl-Crypt-OpenSSL-RSA
Version: 0.41
-Release: 2
+Release: 3
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: https://www.cpan.org/modules/by-module/Crypt/TIMLEGGE/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5: 477e40637f2f22ad30bad0d319c0701e
+Patch0: %{name}-pem-leading-text.patch
URL: https://metacpan.org/dist/Crypt-OpenSSL-RSA
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: perl-Crypt-OpenSSL-Guess >= 0.11
@@ -40,6 +41,7 @@ także na odszyfrowywanie oraz weryfikację podpisów.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch -P0 -p1
%build
%{__perl} Makefile.PL \
diff --git a/perl-Crypt-OpenSSL-RSA-pem-leading-text.patch b/perl-Crypt-OpenSSL-RSA-pem-leading-text.patch
new file mode 100644
index 0000000..3e6a4b4
--- /dev/null
+++ b/perl-Crypt-OpenSSL-RSA-pem-leading-text.patch
@@ -0,0 +1,14 @@
+new_private_key() rejects PEM keys preceded by text (openssl rsa -text output).
+https://github.com/cpan-authors/Crypt-OpenSSL-RSA/pull/208, anchored to a line start.
+
+--- Crypt-OpenSSL-RSA-0.41/RSA.pm.orig
++++ Crypt-OpenSSL-RSA-0.41/RSA.pm
+@@ -58,7 +58,7 @@
+ croak "unrecognized key format: expected PEM-encoded key (starting with '-----BEGIN') "
+ . "or DER-encoded key (binary ASN.1 data)"
+ unless defined $p_key_string && length($p_key_string) > 0;
+- if ( $p_key_string =~ /^-----/ ) {
++ if ( $p_key_string =~ /^-----/m ) {
+ return $proto->_new_private_key_pem($p_key_string, @rest);
+ }
+ elsif ( substr($p_key_string, 0, 1) eq "\x30" ) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Crypt-OpenSSL-RSA.git/commitdiff/c2e468f287f877172e6e56591cbd402ad2239f71
More information about the pld-cvs-commit
mailing list