mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-18 02:12:06 +01:00
Fix faulty bit-strength policy check for signing subkeys
This commit is contained in:
parent
490cbd58fd
commit
5aabd1ced4
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,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