mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-14 16:32:06 +01:00
Fix faulty bit-strength policy check for signing subkeys
This commit is contained in:
parent
d65a26fbf5
commit
03dbd2f03f
1 changed files with 1 additions and 1 deletions
|
@ -379,7 +379,7 @@ public final class SigningOptions {
|
||||||
SubkeyIdentifier signingKeyIdentifier = new SubkeyIdentifier(secretKey, signingSubkey.getKeyID());
|
SubkeyIdentifier signingKeyIdentifier = new SubkeyIdentifier(secretKey, signingSubkey.getKeyID());
|
||||||
PGPSecretKey signingSecretKey = secretKey.getSecretKey(signingSubkey.getKeyID());
|
PGPSecretKey signingSecretKey = secretKey.getSecretKey(signingSubkey.getKeyID());
|
||||||
PublicKeyAlgorithm publicKeyAlgorithm = PublicKeyAlgorithm.requireFromId(signingSecretKey.getPublicKey().getAlgorithm());
|
PublicKeyAlgorithm publicKeyAlgorithm = PublicKeyAlgorithm.requireFromId(signingSecretKey.getPublicKey().getAlgorithm());
|
||||||
int bitStrength = secretKey.getPublicKey().getBitStrength();
|
int bitStrength = signingSecretKey.getPublicKey().getBitStrength();
|
||||||
if (!PGPainless.getPolicy().getPublicKeyAlgorithmPolicy().isAcceptable(publicKeyAlgorithm, bitStrength)) {
|
if (!PGPainless.getPolicy().getPublicKeyAlgorithmPolicy().isAcceptable(publicKeyAlgorithm, bitStrength)) {
|
||||||
throw new KeyException.UnacceptableSigningKeyException(
|
throw new KeyException.UnacceptableSigningKeyException(
|
||||||
new KeyException.PublicKeyAlgorithmPolicyException(
|
new KeyException.PublicKeyAlgorithmPolicyException(
|
||||||
|
|
Loading…
Reference in a new issue