mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
perlPackages.MojoSAML: select padding to accommodate new CryptOpenSSLRSA
(cherry picked from commit f2e1035aa5)
This commit is contained in:
committed by
github-actions[bot]
parent
e0ee4840b4
commit
41c647ad3b
@@ -0,0 +1,44 @@
|
||||
From 7dcb837f5f953206eead3d28144c3d0e2af85c2c Mon Sep 17 00:00:00 2001
|
||||
From: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
|
||||
Date: Mon, 20 Jul 2026 22:48:38 -0400
|
||||
Subject: [PATCH] Select PKCS#1 padding for XML signatures
|
||||
|
||||
The rsa-sha* XML Signature algorithms require RSASSA-PKCS1-v1_5.
|
||||
Select that padding explicitly instead of relying on the RSA module's
|
||||
signing default, which is PSS in recent releases.
|
||||
|
||||
Require Crypt::OpenSSL::RSA 0.38, the first release whose signing path
|
||||
honors the explicit padding choice.
|
||||
|
||||
Assisted-by: Codex
|
||||
---
|
||||
cpanfile | 2 +-
|
||||
lib/Mojo/XMLSig.pm | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cpanfile b/cpanfile
|
||||
index 6c56caf..149f4a6 100644
|
||||
--- a/cpanfile
|
||||
+++ b/cpanfile
|
||||
@@ -1,5 +1,5 @@
|
||||
requires 'Mojolicious', '7.78'; # tag_to_html
|
||||
-requires 'Crypt::OpenSSL::RSA';
|
||||
+requires 'Crypt::OpenSSL::RSA', '0.38';
|
||||
requires 'Crypt::OpenSSL::X509';
|
||||
requires 'Data::GUID';
|
||||
requires 'Digest::SHA';
|
||||
diff --git a/lib/Mojo/XMLSig.pm b/lib/Mojo/XMLSig.pm
|
||||
index 3ee9db3..2498bbe 100644
|
||||
--- a/lib/Mojo/XMLSig.pm
|
||||
+++ b/lib/Mojo/XMLSig.pm
|
||||
@@ -91,6 +91,7 @@ my $set_algo = sub {
|
||||
unless $key->$isa('Crypt::OpenSSL::RSA');
|
||||
Carp::croak 'Unsupported RSA algorithm'
|
||||
unless my $method = $key->can("use_${algo}_hash");
|
||||
+ $key->use_pkcs1_padding;
|
||||
$key->$method;
|
||||
return $key;
|
||||
};
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -22945,6 +22945,9 @@ with self;
|
||||
url = "mirror://cpan/authors/id/J/JB/JBERGER/Mojo-SAML-0.07.tar.gz";
|
||||
hash = "sha256-csJMrNtvHXp14uqgBDfHFKv1eafSENSqTT8g8e/0cQ0=";
|
||||
};
|
||||
patches = [
|
||||
../development/perl-modules/MojoSAML-select-PKCS-1-padding.patch
|
||||
];
|
||||
buildInputs = [ ModuleBuildTiny ];
|
||||
propagatedBuildInputs = [
|
||||
CryptOpenSSLRSA
|
||||
|
||||
Reference in New Issue
Block a user