1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

Fix NPE when attempting to decrypt GNU_DUMMY_S2K keys

This commit is contained in:
Paul Schaub 2021-12-06 15:01:37 +01:00
parent aef9ebfd7b
commit d54a40196b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
10 changed files with 45 additions and 48 deletions

View file

@ -11,7 +11,6 @@ import org.bouncycastle.openpgp.PGPSecretKey;
import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.junit.jupiter.api.Test;
import org.pgpainless.PGPainless;
import org.pgpainless.exception.WrongPassphraseException;
import org.pgpainless.key.OpenPgpV4Fingerprint;
import org.pgpainless.key.TestKeys;
import org.pgpainless.key.protection.CachingSecretKeyRingProtector;
@ -120,7 +119,7 @@ public class UnlockSecretKeys {
}
private void assertProtectorUnlocksAllSecretKeys(PGPSecretKeyRing secretKey, SecretKeyRingProtector protector)
throws WrongPassphraseException {
throws PGPException {
for (PGPSecretKey key : secretKey) {
UnlockSecretKey.unlockSecretKey(key, protector);
}