Class OpenPGPCertificate.OpenPGPPrimaryKey
java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPCertificate.OpenPGPCertificateComponent
org.bouncycastle.openpgp.api.OpenPGPCertificate.OpenPGPComponentKey
org.bouncycastle.openpgp.api.OpenPGPCertificate.OpenPGPPrimaryKey
- Enclosing class:
OpenPGPCertificate
public static class OpenPGPCertificate.OpenPGPPrimaryKey
extends OpenPGPCertificate.OpenPGPComponentKey
The primary key of a
OpenPGPCertificate.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<OpenPGPCertificate.OpenPGPIdentityComponent> Fields inherited from class OpenPGPCertificate.OpenPGPComponentKey
rawPubkey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExplicitOrImplicitPrimaryUserId(Date evaluationTime) Return theOpenPGPCertificate.OpenPGPUserId, which is - at evaluation time - considered primary, either because it is explicitly marked as primary userid, or because it is implicitly primary (e.g.getExplicitPrimaryUserId(Date evaluationTime) Return theOpenPGPCertificate.OpenPGPUserId, which is - at evaluation time - explicitly marked as primary.protected List<OpenPGPCertificate.OpenPGPComponentSignature> Return all direct-key and key-revocation signatures on the primary key.Return the latest DirectKey self-signature on this primary key.getLatestDirectKeySelfSignature(Date evaluationTime) Return the (at evaluation time) latest DirectKey self-signature on this primary key.Return the latest KeyRevocation self-signature on this primary key.getLatestKeyRevocationSelfSignature(Date evaluationTime) Return the (at evaluation time) latest KeyRevocation self-signature on this primary key.getLatestSelfSignature(Date evaluationTime) Return the (at evaluation time) latest self-signature on the component.Return allOpenPGPUserAttributeson this key.protected List<OpenPGPCertificate.OpenPGPComponentSignature> Return all signatures on the givenOpenPGPCertificate.OpenPGPUserAttribute.Return allOpenPGPUserIdson this key.protected List<OpenPGPCertificate.OpenPGPComponentSignature> Return all signatures on the givenOpenPGPCertificate.OpenPGPUserId.Return aListcontaining all currently validOpenPGPUserIdson this primary key.getValidUserIDs(Date evaluationTime) Return aListcontaining all valid (at evaluation time)OpenPGPUserIdson this primary key.booleanReturn true, if thisOpenPGPCertificate.OpenPGPComponentKeyrepresents the primary key of anOpenPGPCertificate.Return a detailed String representation of this component.toString()Methods inherited from class OpenPGPCertificate.OpenPGPComponentKey
equals, getAlgorithm, getCreationTime, getKeyComponent, getKeyIdentifier, getPGPPublicKey, getVersion, hashCode, isCertificationKey, isCertificationKey, isEncryptionKey, isEncryptionKey, isSigningKey, isSigningKeyMethods inherited from class OpenPGPCertificate.OpenPGPCertificateComponent
getAEADCipherSuitePreferences, getAEADCipherSuitePreferences, getApplyingSubpacket, getCertificate, getCertification, getCompressionAlgorithmPreferences, getCompressionAlgorithmPreferences, getFeatures, getFeatures, getHashAlgorithmPreferences, getHashAlgorithmPreferences, getKeyExpirationDate, getKeyExpirationDateAt, getKeyFlags, getKeyFlags, getLatestSelfSignature, getMergedDanglingExternalSignatureChainEndsFrom, getPublicComponent, getRevocation, getSignatureChains, getSymmetricCipherPreferences, getSymmetricCipherPreferences, hasKeyFlags, isBound, isBoundAt
-
Field Details
-
identityComponents
-
-
Constructor Details
-
OpenPGPPrimaryKey
-
-
Method Details
-
toString
-
toDetailString
Description copied from class:OpenPGPCertificate.OpenPGPCertificateComponentReturn a detailed String representation of this component.- Specified by:
toDetailStringin classOpenPGPCertificate.OpenPGPCertificateComponent- Returns:
- detailed String representation
-
isPrimaryKey
public boolean isPrimaryKey()Description copied from class:OpenPGPCertificate.OpenPGPComponentKeyReturn true, if thisOpenPGPCertificate.OpenPGPComponentKeyrepresents the primary key of anOpenPGPCertificate.- Specified by:
isPrimaryKeyin classOpenPGPCertificate.OpenPGPComponentKey- Returns:
- true if primary, false if subkey
-
getLatestDirectKeySelfSignature
Return the latest DirectKey self-signature on this primary key.- Returns:
- latest direct key self-signature.
-
getLatestDirectKeySelfSignature
public OpenPGPCertificate.OpenPGPComponentSignature getLatestDirectKeySelfSignature(Date evaluationTime) Return the (at evaluation time) latest DirectKey self-signature on this primary key.- Parameters:
evaluationTime- reference time- Returns:
- latest (at evaluation time) direct key self-signature
-
getLatestKeyRevocationSelfSignature
Return the latest KeyRevocation self-signature on this primary key.- Returns:
- latest key revocation self-signature
-
getLatestKeyRevocationSelfSignature
public OpenPGPCertificate.OpenPGPComponentSignature getLatestKeyRevocationSelfSignature(Date evaluationTime) Return the (at evaluation time) latest KeyRevocation self-signature on this primary key.- Parameters:
evaluationTime- reference time- Returns:
- latest (at evaluation time) key revocation self-signature
-
getLatestSelfSignature
Description copied from class:OpenPGPCertificate.OpenPGPCertificateComponentReturn the (at evaluation time) latest self-signature on the component. That might either be a certification signature, or a revocation.- Overrides:
getLatestSelfSignaturein classOpenPGPCertificate.OpenPGPComponentKey- Parameters:
evaluationTime- reference time- Returns:
- latest self signature
-
getUserIDs
Return allOpenPGPUserIdson this key.- Returns:
- user ids
-
getValidUserIds
Return aListcontaining all currently validOpenPGPUserIdson this primary key.- Returns:
- valid userids
-
getValidUserIDs
Return aListcontaining all valid (at evaluation time)OpenPGPUserIdson this primary key.- Parameters:
evaluationTime- reference time- Returns:
- valid (at evaluation time) userids
-
getExplicitPrimaryUserId
Return theOpenPGPCertificate.OpenPGPUserId, which is - at evaluation time - explicitly marked as primary.- Parameters:
evaluationTime- evaluation time- Returns:
- explicit primary userid
-
getExplicitOrImplicitPrimaryUserId
Return theOpenPGPCertificate.OpenPGPUserId, which is - at evaluation time - considered primary, either because it is explicitly marked as primary userid, or because it is implicitly primary (e.g. because it is the sole user-id on the key).- Parameters:
evaluationTime- evaluation time- Returns:
- primary user-id
-
getUserAttributes
Return allOpenPGPUserAttributeson this key.- Returns:
- user attributes
-
getKeySignatures
Return all direct-key and key-revocation signatures on the primary key.- Returns:
- key signatures
-
getUserIdSignatures
protected List<OpenPGPCertificate.OpenPGPComponentSignature> getUserIdSignatures(OpenPGPCertificate.OpenPGPUserId identity) Return all signatures on the givenOpenPGPCertificate.OpenPGPUserId.- Parameters:
identity- user-id- Returns:
- list of user-id signatures
-
getUserAttributeSignatures
protected List<OpenPGPCertificate.OpenPGPComponentSignature> getUserAttributeSignatures(OpenPGPCertificate.OpenPGPUserAttribute identity) Return all signatures on the givenOpenPGPCertificate.OpenPGPUserAttribute.- Parameters:
identity- user-attribute- Returns:
- list of user-attribute signatures
-