Class ConsumerOptions.CertificateSource
java.lang.Object
org.pgpainless.decryption_verification.ConsumerOptions.CertificateSource
- Enclosing class:
ConsumerOptions
Source for OpenPGP certificates.
When verifying signatures on a message, this object holds available signer certificates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCertificate
(org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Add a certificate as verification cert explicitly.org.bouncycastle.openpgp.PGPPublicKeyRing
getCertificate
(long keyId) Return a certificate which contains a subkey with the given keyId.Set
<org.bouncycastle.openpgp.PGPPublicKeyRing> Return the set of explicitly set verification certificates.
-
Constructor Details
-
CertificateSource
public CertificateSource()
-
-
Method Details
-
addCertificate
public void addCertificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Add a certificate as verification cert explicitly.- Parameters:
certificate
- certificate
-
getExplicitCertificates
Return the set of explicitly set verification certificates.- Returns:
- explicitly set verification certs
-
getCertificate
public org.bouncycastle.openpgp.PGPPublicKeyRing getCertificate(long keyId) Return a certificate which contains a subkey with the given keyId. This method first checks all explicitly set verification certs and if no cert is found it consults the certificate stores.- Parameters:
keyId
- key id- Returns:
- certificate
-