Class OpenPGPCertificate.OpenPGPSignatureChains
java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPCertificate.OpenPGPSignatureChains
- All Implemented Interfaces:
Iterable<OpenPGPCertificate.OpenPGPSignatureChain>
- Enclosing class:
OpenPGPCertificate
public static class OpenPGPCertificate.OpenPGPSignatureChains
extends Object
implements Iterable<OpenPGPCertificate.OpenPGPSignatureChain>
Collection of multiple
OpenPGPCertificate.OpenPGPSignatureChain objects.-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a single chain to the collection.voidaddAll(OpenPGPCertificate.OpenPGPSignatureChains otherChains) Add all chains to the collection.Return allOpenPGPCertificate.OpenPGPSignatureChainitems which originate from the rootOpenPGPCertificate.OpenPGPComponentKey.getCertificationAt(Date evaluationTime) Return the latest positive certification chain for the component which is effective at the given evaluationTime and cryptographically valid.Filter for certifications.getChainAt(Date evaluationDate) Return the latest chain, certification or revocation, which is effective at the given evaluation time and cryptographically valid.getChainsAt(Date evaluationTime) Return allOpenPGPCertificate.OpenPGPSignatureChainobjects, which are valid at the given evaluation time.getRevocationAt(Date evaluationTime) Return the latest negative certification chain for the component which is effective at the given evaluationTime and cryptographically valid.Filter for revocations.booleanisEmpty()Return true if the collection is empty.iterator()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
OpenPGPSignatureChains
-
-
Method Details
-
add
Add a single chain to the collection.- Parameters:
chain- chain
-
addAll
Add all chains to the collection.- Parameters:
otherChains- other chains
-
isEmpty
public boolean isEmpty()Return true if the collection is empty.- Returns:
- true if empty
-
getCertifications
Filter for certifications.- Returns:
- certification signature chains
-
getRevocations
Filter for revocations.- Returns:
- revocation signature chains
-
getCertificationAt
Return the latest positive certification chain for the component which is effective at the given evaluationTime and cryptographically valid.RFC 9580, section 5.2.3.10: "An implementation that encounters multiple self-signatures on the same object MUST select the most recent valid self-signature and ignore all other self-signatures." A chain which does not verify is therefore skipped rather than returned, so that an appended signature which does not verify can neither shadow nor displace an older one which does.
- Parameters:
evaluationTime- time for which validity of theOpenPGPCertificate.OpenPGPCertificateComponentis checked.- Returns:
- positive certification chain or null
-
getChainsAt
Return allOpenPGPCertificate.OpenPGPSignatureChainobjects, which are valid at the given evaluation time.- Parameters:
evaluationTime- reference time- Returns:
- valid chains at reference time
-
getRevocationAt
Return the latest negative certification chain for the component which is effective at the given evaluationTime and cryptographically valid. A revocation which does not verify is skipped.- Parameters:
evaluationTime- time for which revocation-ness of theOpenPGPCertificate.OpenPGPCertificateComponentis checked.- Returns:
- negative certification chain or null
-
toString
-
fromOrigin
public OpenPGPCertificate.OpenPGPSignatureChains fromOrigin(OpenPGPCertificate.OpenPGPComponentKey root) Return allOpenPGPCertificate.OpenPGPSignatureChainitems which originate from the rootOpenPGPCertificate.OpenPGPComponentKey.- Parameters:
root- root key- Returns:
- all chains with root key as origin
-
getChainAt
Return the latest chain, certification or revocation, which is effective at the given evaluation time and cryptographically valid. A chain which does not verify is skipped, so that an appended signature which does not verify - a revocation included - cannot displace one which does.- Parameters:
evaluationDate- reference time- Returns:
- latest valid chain
-
iterator
- Specified by:
iteratorin interfaceIterable<OpenPGPCertificate.OpenPGPSignatureChain>
-