public static class OpenPGPCertificate.OpenPGPComponentSignature extends OpenPGPSignature
OpenPGPCertificate.OpenPGPCertificateComponent
on a OpenPGPCertificate
.OpenPGPSignature.OpenPGPDocumentSignature, OpenPGPSignature.OpenPGPSignatureSubpacket
isCorrect, issuer, isTested, signature
Constructor and Description |
---|
OpenPGPComponentSignature(PGPSignature signature,
OpenPGPCertificate.OpenPGPComponentKey issuer,
OpenPGPCertificate.OpenPGPCertificateComponent target)
Component signature.
|
getCreationTime, getExpirationTime, getIssuer, getIssuerCertificate, getIssuerDisplay, getKeyIdentifier, getKeyIdentifiers, getMostExpressiveIdentifier, getSignature, getType, isCertification, isEffectiveAt, isHardRevocation, isRevocation, isTestedCorrect, toAsciiArmoredString, toString
public OpenPGPComponentSignature(PGPSignature signature, OpenPGPCertificate.OpenPGPComponentKey issuer, OpenPGPCertificate.OpenPGPCertificateComponent target)
signature
- signatureissuer
- key that issued the signature.
Is nullable (e.g. for 3rd party sigs where the certificate is not available).target
- signed certificate componentpublic OpenPGPCertificate.OpenPGPComponentKey getIssuerComponent()
OpenPGPCertificate.OpenPGPComponentKey
that issued this signature.public OpenPGPCertificate.OpenPGPCertificateComponent getTargetComponent()
OpenPGPCertificate.OpenPGPCertificateComponent
that this signature was calculated over.public OpenPGPCertificate.OpenPGPComponentKey getTargetKeyComponent()
OpenPGPCertificate.OpenPGPComponentKey
that this signature is calculated over.
Contrary to getTargetComponent()
, which returns the actual target, this method returns the
OpenPGPCertificate.OpenPGPComponentKey
"closest" to the target.
For a subkey-binding signature, this is the target subkey, while for an identity-binding signature
(binding for a user-id or attribute) the return value is the OpenPGPCertificate.OpenPGPComponentKey
which
carries the identity.public java.util.Date getKeyExpirationTime()
public void verify(OpenPGPImplementation implementation) throws PGPSignatureException
implementation
- OpenPGP implementationPGPSignatureException
- if the signature cannot be verified successfullypublic void verify(PGPContentVerifierBuilderProvider contentVerifierBuilderProvider, OpenPGPPolicy policy) throws PGPSignatureException
contentVerifierBuilderProvider
- provider for verifierspolicy
- algorithm policyPGPSignatureException
- if the signature cannot be verified successfullyprotected void verifyKeySignature(OpenPGPCertificate.OpenPGPComponentKey issuer, OpenPGPCertificate.OpenPGPComponentKey target, PGPContentVerifierBuilderProvider contentVerifierBuilderProvider) throws PGPSignatureException
PGPSignature.DIRECT_KEY
, PGPSignature.KEY_REVOCATION
,
PGPSignature.SUBKEY_BINDING
or PGPSignature.SUBKEY_REVOCATION
.issuer
- issuing component keytarget
- targeted component keycontentVerifierBuilderProvider
- provider for content verifier buildersPGPSignatureException
- if an exception happens during signature verificationprotected void verifyUserIdSignature(OpenPGPCertificate.OpenPGPComponentKey issuer, OpenPGPCertificate.OpenPGPUserId target, PGPContentVerifierBuilderProvider contentVerifierBuilderProvider) throws PGPSignatureException
OpenPGPCertificate.OpenPGPUserId
.
The signature is of type PGPSignature.DEFAULT_CERTIFICATION
, PGPSignature.NO_CERTIFICATION
,
PGPSignature.CASUAL_CERTIFICATION
, PGPSignature.POSITIVE_CERTIFICATION
or
PGPSignature.CERTIFICATION_REVOCATION
.issuer
- issuing component keytarget
- targeted useridcontentVerifierBuilderProvider
- provider for content verifier buildersPGPSignatureException
- if an exception happens during signature verificationprotected void verifyUserAttributeSignature(OpenPGPCertificate.OpenPGPComponentKey issuer, OpenPGPCertificate.OpenPGPUserAttribute target, PGPContentVerifierBuilderProvider contentVerifierBuilderProvider) throws PGPSignatureException
OpenPGPCertificate.OpenPGPUserAttribute
.
The signature is of type PGPSignature.DEFAULT_CERTIFICATION
, PGPSignature.NO_CERTIFICATION
,
PGPSignature.CASUAL_CERTIFICATION
, PGPSignature.POSITIVE_CERTIFICATION
or
PGPSignature.CERTIFICATION_REVOCATION
.issuer
- issuing component keytarget
- targeted useridcontentVerifierBuilderProvider
- provider for content verifier buildersPGPSignatureException
- if an exception happens during signature verificationprotected java.lang.String getTargetDisplay()
getTargetDisplay
in class OpenPGPSignature