1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Fix NPE when signing key is not found during signature verification

This commit is contained in:
Paul Schaub 2020-12-16 17:29:12 +01:00
parent 4870bda4f2
commit ff8c6d8b6d

View file

@ -95,6 +95,9 @@ public final class DecryptionStreamFactory {
pgpInputStream = inputStream;
for (PGPSignature signature : detachedSignatures) {
PGPPublicKey signingKey = factory.findSignatureVerificationKey(signature.getKeyID());
if (signingKey == null) {
continue;
}
signature.init(new BcPGPContentVerifierBuilderProvider(), signingKey);
factory.resultBuilder.addDetachedSignature(
new DetachedSignature(signature, new OpenPgpV4Fingerprint(signingKey)));