mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Fix NPE when signing key is not found during signature verification
This commit is contained in:
parent
4870bda4f2
commit
ff8c6d8b6d
1 changed files with 3 additions and 0 deletions
|
@ -95,6 +95,9 @@ public final class DecryptionStreamFactory {
|
||||||
pgpInputStream = inputStream;
|
pgpInputStream = inputStream;
|
||||||
for (PGPSignature signature : detachedSignatures) {
|
for (PGPSignature signature : detachedSignatures) {
|
||||||
PGPPublicKey signingKey = factory.findSignatureVerificationKey(signature.getKeyID());
|
PGPPublicKey signingKey = factory.findSignatureVerificationKey(signature.getKeyID());
|
||||||
|
if (signingKey == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
signature.init(new BcPGPContentVerifierBuilderProvider(), signingKey);
|
signature.init(new BcPGPContentVerifierBuilderProvider(), signingKey);
|
||||||
factory.resultBuilder.addDetachedSignature(
|
factory.resultBuilder.addDetachedSignature(
|
||||||
new DetachedSignature(signature, new OpenPgpV4Fingerprint(signingKey)));
|
new DetachedSignature(signature, new OpenPgpV4Fingerprint(signingKey)));
|
||||||
|
|
Loading…
Reference in a new issue