aboutsummaryrefslogtreecommitdiffstats
path: root/lacme-accountd
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2026-07-20 19:05:50 +0200
committerGuilhem Moulin <guilhem@fripost.org>2026-07-20 19:24:58 +0200
commitfc52c4f391dd6cae1f20ebfc9aefd9f6bc78cfd8 (patch)
treeeabfa5c46ea19108f46b9f1d7fd647297ab2579f /lacme-accountd
parentda63d5b6ca409b46161ceecab1b3dd3f831491df (diff)
accountd: Use PKCS#1 v1.5 signatures.
It's what JWT RS256 uses. Nedded for compatibility with Crypt::OpenSSL 0.38 and later.
Diffstat (limited to 'lacme-accountd')
-rwxr-xr-xlacme-accountd1
1 files changed, 1 insertions, 0 deletions
diff --git a/lacme-accountd b/lacme-accountd
index 5bc8b5f..a0cc15f 100755
--- a/lacme-accountd
+++ b/lacme-accountd
@@ -174,6 +174,7 @@ if ($OPTS{privkey} =~ /\A(file|gpg):(\p{Print}+)\z/) {
error("$filename: Not a private key") unless $rsa->is_private();
error("$filename: Invalid key") unless $rsa->check_key();
$rsa->use_sha256_hash();
+ $rsa->use_pkcs1_padding(); # JWT RS256 uses PKCS#1 v1.5 signatures
require 'Crypt/OpenSSL/Bignum.pm';
my ($n, $e) = $rsa->get_key_parameters(); # don't include private params!