Package eu.europa.esig.dss.spi.tsl
Class TrustedListsCertificateSource
java.lang.Object
eu.europa.esig.dss.spi.x509.CommonCertificateSource
eu.europa.esig.dss.spi.x509.CommonTrustedCertificateSource
eu.europa.esig.dss.spi.tsl.TrustedListsCertificateSource
- All Implemented Interfaces:
CertificateSource
,Serializable
This class allows injection of trusted certificates from Trusted Lists
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
certificateMatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCertificate
(CertificateToken certificate) This method is not applicable for this kind of certificate source.getAlternativeCRLUrls
(CertificateToken trustAnchor) Returns a list of alternative CRL access point Urls for the certificate tokengetAlternativeOCSPUrls
(CertificateToken trustAnchor) Returns a list of alternative OCSP access point Urls for the certificate tokenThis method returns the certificate source type associated to the implementation class.int
Gets the number of trusted public keysGets TL Validation job summarygetTrustServices
(CertificateToken token) Returns TrustProperties for the given certificatevoid
setSummary
(TLValidationJobSummary summary) Sets TL Validation job summaryvoid
setTrustPropertiesByCertificates
(Map<CertificateToken, List<TrustProperties>> trustPropertiesByCerts) The method allows to fill the CertificateSourceMethods inherited from class eu.europa.esig.dss.spi.x509.CommonTrustedCertificateSource
importAsTrusted, isTrusted
Methods inherited from class eu.europa.esig.dss.spi.x509.CommonCertificateSource
findTokensFromCertRef, getByCertificateDigest, getByPublicKey, getBySignerIdentifier, getBySki, getBySubject, getCertificates, getEntities, getNumberOfCertificates, getNumberOfEntities, isAllSelfSigned, isCertificateSourceEqual, isCertificateSourceEquivalent, isKnown, removeCertificate, reset
-
Constructor Details
-
TrustedListsCertificateSource
public TrustedListsCertificateSource()The default constructor.
-
-
Method Details
-
getSummary
Gets TL Validation job summary- Returns:
TLValidationJobSummary
-
setSummary
Sets TL Validation job summary- Parameters:
summary
-TLValidationJobSummary
-
getCertificateSourceType
Description copied from interface:CertificateSource
This method returns the certificate source type associated to the implementation class.- Specified by:
getCertificateSourceType
in interfaceCertificateSource
- Overrides:
getCertificateSourceType
in classCommonTrustedCertificateSource
- Returns:
- the certificate origin
-
addCertificate
This method is not applicable for this kind of certificate source. You should usesetTrustPropertiesByCertificates(java.util.Map<eu.europa.esig.dss.model.x509.CertificateToken, java.util.List<eu.europa.esig.dss.spi.tsl.TrustProperties>>)
- Specified by:
addCertificate
in interfaceCertificateSource
- Overrides:
addCertificate
in classCommonCertificateSource
- Parameters:
certificate
- the certificate you have to trust- Returns:
- the corresponding certificate token
-
setTrustPropertiesByCertificates
public void setTrustPropertiesByCertificates(Map<CertificateToken, List<TrustProperties>> trustPropertiesByCerts) The method allows to fill the CertificateSource- Parameters:
trustPropertiesByCerts
- map betweenCertificateToken
s and a list ofTrustProperties
-
getTrustServices
Description copied from class:CommonTrustedCertificateSource
Returns TrustProperties for the given certificate- Overrides:
getTrustServices
in classCommonTrustedCertificateSource
- Parameters:
token
-CertificateToken
- Returns:
- a list of
TrustProperties
-
getAlternativeOCSPUrls
Description copied from class:CommonTrustedCertificateSource
Returns a list of alternative OCSP access point Urls for the certificate token- Overrides:
getAlternativeOCSPUrls
in classCommonTrustedCertificateSource
- Parameters:
trustAnchor
-CertificateToken
- Returns:
- a list of
String
s
-
getAlternativeCRLUrls
Description copied from class:CommonTrustedCertificateSource
Returns a list of alternative CRL access point Urls for the certificate token- Overrides:
getAlternativeCRLUrls
in classCommonTrustedCertificateSource
- Parameters:
trustAnchor
-CertificateToken
- Returns:
- a list of
String
s
-
getNumberOfTrustedPublicKeys
public int getNumberOfTrustedPublicKeys()Gets the number of trusted public keys- Returns:
- the number of trusted public keys
-