mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-06-16 16:44:50 +02:00
OpenPgpMessageInputStream: Source verification certs from ConsumerOptions.getCertificateSource()
This commit is contained in:
parent
e8b44f7438
commit
7d48301071
|
@ -1018,12 +1018,10 @@ public class OpenPgpMessageInputStream extends DecryptionStream {
|
|||
}
|
||||
|
||||
private PGPPublicKeyRing findCertificate(long keyId) {
|
||||
for (PGPPublicKeyRing cert : options.getCertificates()) {
|
||||
PGPPublicKey verificationKey = cert.getPublicKey(keyId);
|
||||
if (verificationKey != null) {
|
||||
PGPPublicKeyRing cert = options.getCertificateSource().getCertificate(keyId);
|
||||
if (cert != null) {
|
||||
return cert;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.getMissingCertificateCallback() != null) {
|
||||
return options.getMissingCertificateCallback().onMissingPublicKeyEncountered(keyId);
|
||||
|
|
Loading…
Reference in a new issue