Package eu.europa.esig.dss.spi.x509
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 eu.europa.esig.dss.spi.x509.CommonCertificateSource
certificateMatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCertificate
(CertificateToken certificate, CertificateOrigin origin) Adds aCertificateToken
with itsCertificateOrigin
protected void
addCertificateIdentifier
(SignerIdentifier signerIdentifier, CertificateOrigin origin) Adds aCertificateIdentifier
with its originprotected void
addCertificateRef
(CertificateRef certificateRef, CertificateRefOrigin origin) Adds aCertificateRef
with itsCertificateRefOrigin
findTokensFromRefs
(List<CertificateRef> certificateRefs) Returns Set ofCertificateToken
s for the providedCertificateRef
sReturns a Set of allSignerIdentifier
For CAdES/PAdES/TimestampReturns a Set of all certificate referencesgetCertificateRefOrigins
(CertificateRef certificateRef) Extracts origins for a given certificateRefprotected List
<CertificateRef> Gets a list ofCertificateRef
s by the givenCertificateRefOrigin
protected CertificateToken
getCertificateToken
(SignerIdentifier signerIdentifier) Gets aCertificateToken
by the givenSignerIdentifier
protected List
<CertificateToken> Gets a list ofCertificateToken
s by the givenCertificateOrigin
Returns the currentSignerIdentifier
For CAdES/PAdES/TimestampReturns a list of orphan certificate refsgetReferencesForCertificateToken
(CertificateToken certificateToken) Returns list ofCertificateRef
s found for the givencertificateToken
protected boolean
isOrphan
(CertificateRef certificateRef) Verifies whether theCertificateRef
is orphan (does not have related certificates embedded to the certificate source)Methods inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
addCertificate, doesCertificateReferenceMatch, findTokensFromCertRef, getByCertificateDigest, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getCertificateSourceType, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, isTrusted, removeCertificate, reset
-
Constructor Details
-
TokenCertificateSource
protected TokenCertificateSource()Default constructor
-
-
Method Details
-
addCertificateIdentifier
protected void addCertificateIdentifier(SignerIdentifier signerIdentifier, CertificateOrigin origin) Adds aCertificateIdentifier
with its origin- Parameters:
signerIdentifier
- the certificate identifier to be addedorigin
- the origin of the certificate identifier
-
addCertificate
Adds aCertificateToken
with itsCertificateOrigin
- Parameters:
certificate
- the certificate to be addedorigin
- the origin of the certificate
-
addCertificateRef
Adds aCertificateRef
with itsCertificateRefOrigin
- Parameters:
certificateRef
- the certificate reference to be addedorigin
- the origin of the certificate reference
-
getReferencesForCertificateToken
Returns list ofCertificateRef
s found for the givencertificateToken
- Parameters:
certificateToken
-CertificateToken
to find references for- Returns:
- list of
CertificateRef
s
-
findTokensFromRefs
Returns Set ofCertificateToken
s for the providedCertificateRef
s- Parameters:
certificateRefs
- list ofCertificateRef
s- Returns:
- Set of
CertificateToken
s
-
getAllCertificateIdentifiers
Returns a Set of allSignerIdentifier
For CAdES/PAdES/Timestamp- Returns:
- a set of
SignerIdentifier
-
getCurrentCertificateIdentifier
Returns the currentSignerIdentifier
For CAdES/PAdES/Timestamp- Returns:
- the current
SignerIdentifier
or null
-
getAllCertificateRefs
Returns a Set of all certificate references- Returns:
- a Set of
CertificateRef
s
-
getOrphanCertificateRefs
Returns a list of orphan certificate refs- Returns:
- list of
CertificateRef
s
-
isOrphan
Verifies whether theCertificateRef
is orphan (does not have related certificates embedded to the certificate source)- Parameters:
certificateRef
-CertificateRef
to check- Returns:
- TRUE if the certificate reference is orphan, FALSE otherwise
-
getCertificateToken
Gets aCertificateToken
by the givenSignerIdentifier
- Parameters:
signerIdentifier
-SignerIdentifier
- Returns:
CertificateToken
-
getCertificateTokensByOrigin
Gets a list ofCertificateToken
s by the givenCertificateOrigin
- Parameters:
origin
-CertificateOrigin
- Returns:
- a list of
CertificateToken
s
-
getCertificateRefsByOrigin
Gets a list ofCertificateRef
s by the givenCertificateRefOrigin
- Parameters:
origin
-CertificateRefOrigin
- Returns:
- a list of
CertificateRef
s
-
getCertificateRefOrigins
Extracts origins for a given certificateRef- Parameters:
certificateRef
-CertificateRef
to get origins for- Returns:
- a list of
CertificateRefOrigin
s
-