OpenPgpMessageInputStream: Source verification certs from ConsumerOptions.getCertificateSource()

This commit is contained in:
Paul Schaub 2022-11-11 14:20:17 +01:00
parent e8b44f7438
commit 7d48301071
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 3 additions and 5 deletions

View File

@ -1018,11 +1018,9 @@ public class OpenPgpMessageInputStream extends DecryptionStream {
}
private PGPPublicKeyRing findCertificate(long keyId) {
for (PGPPublicKeyRing cert : options.getCertificates()) {
PGPPublicKey verificationKey = cert.getPublicKey(keyId);
if (verificationKey != null) {
return cert;
}
PGPPublicKeyRing cert = options.getCertificateSource().getCertificate(keyId);
if (cert != null) {
return cert;
}
if (options.getMissingCertificateCallback() != null) {