Class TokenCertificateSource
java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.spi.x509.TokenCertificateSource
- All Implemented Interfaces:
CertificateSource, Serializable
- Direct Known Subclasses:
EvidenceRecordCertificateSource, PdfCompositeDssDictCertificateSource, PdfDssDictCertificateSource, RevocationCertificateSource, SignatureCertificateSource
Represents a source of certificates embedded in a token (signature, timestamp, ocsp response)
- See Also:
-
Field Summary
Fields inherited from class CommonCertificateSource
certificateMatcher -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCertificate(CertificateToken certificate, CertificateOrigin origin) Adds aCertificateTokenwith itsCertificateOriginprotected voidaddCertificateIdentifier(SignerIdentifier signerIdentifier, CertificateOrigin origin) Adds aCertificateIdentifierwith its originprotected voidaddCertificateRef(CertificateRef certificateRef, CertificateRefOrigin origin) Adds aCertificateRefwith itsCertificateRefOriginfindTokensFromRefs(List<CertificateRef> certificateRefs) Returns Set ofCertificateTokens for the providedCertificateRefsReturns a Set of allSignerIdentifierFor CAdES/PAdES/TimestampReturns a Set of all certificate referencesgetCertificateRefOrigins(CertificateRef certificateRef) Extracts origins for a given certificateRefprotected List<CertificateRef> Gets a list ofCertificateRefs by the givenCertificateRefOriginprotected CertificateTokengetCertificateToken(SignerIdentifier signerIdentifier) Gets aCertificateTokenby the givenSignerIdentifierprotected List<CertificateToken> Gets a list ofCertificateTokens by the givenCertificateOriginReturns the currentSignerIdentifierFor CAdES/PAdES/TimestampReturns a list of orphan certificate refsgetReferencesForCertificateToken(CertificateToken certificateToken) Returns list ofCertificateRefs found for the givencertificateTokenprotected booleanisOrphan(CertificateRef certificateRef) Verifies whether theCertificateRefis orphan (does not have related certificates embedded to the certificate source)Methods inherited from class CommonCertificateSource
addCertificate, doesCertificateReferenceMatch, findTokensFromCertRef, getByCertificateDigest, getByEntityKey, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getCertificateSourceType, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted, isTrustedAtTime, removeCertificate, reset
-
Constructor Details
-
TokenCertificateSource
protected TokenCertificateSource()Default constructor
-
-
Method Details
-
addCertificateIdentifier
protected void addCertificateIdentifier(SignerIdentifier signerIdentifier, CertificateOrigin origin) Adds aCertificateIdentifierwith its origin- Parameters:
signerIdentifier- the certificate identifier to be addedorigin- the origin of the certificate identifier
-
addCertificate
Adds aCertificateTokenwith itsCertificateOrigin- Parameters:
certificate- the certificate to be addedorigin- the origin of the certificate
-
addCertificateRef
Adds aCertificateRefwith itsCertificateRefOrigin- Parameters:
certificateRef- the certificate reference to be addedorigin- the origin of the certificate reference
-
getReferencesForCertificateToken
Returns list ofCertificateRefs found for the givencertificateToken- Parameters:
certificateToken-CertificateTokento find references for- Returns:
- list of
CertificateRefs
-
findTokensFromRefs
Returns Set ofCertificateTokens for the providedCertificateRefs- Parameters:
certificateRefs- list ofCertificateRefs- Returns:
- Set of
CertificateTokens
-
getAllCertificateIdentifiers
Returns a Set of allSignerIdentifierFor CAdES/PAdES/Timestamp- Returns:
- a set of
SignerIdentifier
-
getCurrentCertificateIdentifier
Returns the currentSignerIdentifierFor CAdES/PAdES/Timestamp- Returns:
- the current
SignerIdentifieror null
-
getAllCertificateRefs
Returns a Set of all certificate references- Returns:
- a Set of
CertificateRefs
-
getOrphanCertificateRefs
Returns a list of orphan certificate refs- Returns:
- list of
CertificateRefs
-
isOrphan
Verifies whether theCertificateRefis orphan (does not have related certificates embedded to the certificate source)- Parameters:
certificateRef-CertificateRefto check- Returns:
- TRUE if the certificate reference is orphan, FALSE otherwise
-
getCertificateToken
Gets aCertificateTokenby the givenSignerIdentifier- Parameters:
signerIdentifier-SignerIdentifier- Returns:
CertificateToken
-
getCertificateTokensByOrigin
Gets a list ofCertificateTokens by the givenCertificateOrigin- Parameters:
origin-CertificateOrigin- Returns:
- a list of
CertificateTokens
-
getCertificateRefsByOrigin
Gets a list ofCertificateRefs by the givenCertificateRefOrigin- Parameters:
origin-CertificateRefOrigin- Returns:
- a list of
CertificateRefs
-
getCertificateRefOrigins
Extracts origins for a given certificateRef- Parameters:
certificateRef-CertificateRefto get origins for- Returns:
- a list of
CertificateRefOrigins
-