Package eu.europa.esig.dss.validation
Interface CertificateVerifier
- All Known Implementing Classes:
CommonCertificateVerifier
public interface CertificateVerifier
Provides information on the sources to be used in the validation process in
the context of a signature.
-
Method Summary
Modifier and Type Method Description voidaddAdjunctCertSources(CertificateSource... certSources)Adds adjunct certificate sources to an existing list of adjunct certificate sourcesvoidaddTrustedCertSources(CertificateSource... certSources)Adds trusted certificate sources to an existing list of trusted certificate sourcesListCertificateSourcegetAdjunctCertSources()Returns the list of adjunct certificate sources assigned to this verifier.StatusAlertgetAlertOnInvalidTimestamp()This method returns true if an exception needs to be thrown on invalid timestamp.StatusAlertgetAlertOnMissingRevocationData()This method returns true if an exception needs to be thrown on missing revocation data.StatusAlertgetAlertOnNoRevocationAfterBestSignatureTime()This method returns true if an exception needs to be thrown in case if no revocation data obtained with an issuance time after the bestSignatureTimeStatusAlertgetAlertOnRevokedCertificate()This method returns true if an exception needs to be thrown on revoked certificate.StatusAlertgetAlertOnUncoveredPOE()This method returns true if an exception needs to be thrown on uncovered POE(timestamp).RevocationSource<CRL>getCrlSource()Returns the CRL source associated with this verifier.DataLoadergetDataLoader()The data loader used to access AIA certificate source.DigestAlgorithmgetDefaultDigestAlgorithm()This method returns a default Digest Algorithm what will be used for digest calculationRevocationSource<OCSP>getOcspSource()Returns the OCSP source associated with this verifier.ListCertificateSourcegetSignatureCertificateSource()This method returns the Certificate Source (information extracted from signatures)ListRevocationSource<CRL>getSignatureCRLSource()This method returns the CRL source (information extracted from signatures).ListRevocationSource<OCSP>getSignatureOCSPSource()This method returns the OCSP source (information extracted from signatures).ListCertificateSourcegetTrustedCertSources()Returns the trusted certificate sources associated with this verifier.booleanisCheckRevocationForUntrustedChains()This method returns true if revocation check is enabled for untrusted certificate chains.voidsetAdjunctCertSource(CertificateSource adjunctCertSource)Deprecated.since 5.7.voidsetAdjunctCertSources(CertificateSource... certSources)Sets multiple adjunct certificate sources.voidsetAdjunctCertSources(ListCertificateSource adjunctListCertificateSource)Sets a list of adjunct certificate sourcesvoidsetAlertOnInvalidTimestamp(StatusAlert alertOnInvalidTimestamp)This method allows to change the behavior on invalid timestamp (LT/LTA augmentation).voidsetAlertOnMissingRevocationData(StatusAlert alertOnMissingRevocationData)This method allows to change the behavior on missing revocation data (LT/LTA augmentation).voidsetAlertOnNoRevocationAfterBestSignatureTime(StatusAlert alertOnNoRevocationAfterBestSignatureTime)This method allows to change the behavior on revocation data issued after a control time.voidsetAlertOnRevokedCertificate(StatusAlert alertOnRevokedCertificate)This method allows to change the behavior on revoked certificates (LT/LTA augmentation).voidsetAlertOnUncoveredPOE(StatusAlert alertOnUncoveredPOE)This method allows to change the behavior on uncovered POE (timestamp).voidsetCheckRevocationForUntrustedChains(boolean enable)This method allows to enable revocation checking for untrusted certificate chains (default : false)voidsetCrlSource(RevocationSource<CRL> crlSource)Defines the source of CRL used by this classvoidsetDataLoader(DataLoader dataLoader)The data loader used to access AIA certificate source.voidsetDefaultDigestAlgorithm(DigestAlgorithm digestAlgorithm)This method allows to change the Digest Algorithm that will be used for tokens' digest calculationvoidsetOcspSource(RevocationSource<OCSP> ocspSource)Defines the source of OCSP used by this classvoidsetSignatureCertificateSource(ListCertificateSource signatureCertificateSource)This method allows to set the Certificate source (information extracted from signatures).voidsetSignatureCRLSource(ListRevocationSource<CRL> signatureCRLSource)This method allows to set the CRL source (information extracted from signatures).voidsetSignatureOCSPSource(ListRevocationSource<OCSP> signatureOCSPSource)This method allows to set the OCSP source (information extracted from signatures).voidsetTrustedCertSource(CertificateSource certSource)Deprecated.since 5.7.voidsetTrustedCertSources(CertificateSource... certSources)Sets multiple trusted certificate sources.voidsetTrustedCertSources(ListCertificateSource trustedListCertificateSource)Sets a list of trusted certificate sources
-
Method Details
-
getOcspSource
RevocationSource<OCSP> getOcspSource()Returns the OCSP source associated with this verifier.- Returns:
- the used OCSP source for external access (web, filesystem, cached,...)
-
getCrlSource
RevocationSource<CRL> getCrlSource()Returns the CRL source associated with this verifier.- Returns:
- the used CRL source for external access (web, filesystem, cached,...)
-
setCrlSource
Defines the source of CRL used by this class- Parameters:
crlSource- the CRL source to set for external access (web, filesystem, cached,...)
-
setOcspSource
Defines the source of OCSP used by this class- Parameters:
ocspSource- the OCSP source to set for external access (web, filesystem, cached,...)
-
getTrustedCertSources
ListCertificateSource getTrustedCertSources()Returns the trusted certificate sources associated with this verifier. These sources are used to identify the trusted anchors.- Returns:
- the certificate sources which contain trusted certificates
-
setTrustedCertSource
Deprecated.since 5.7. Will be removed in 5.8. UsesetTrustedCertSources(CertificateSource... certSources)insteadSets the trusted certificate source.- Parameters:
certSource- The certificates source with known trusted certificates
-
setTrustedCertSources
Sets multiple trusted certificate sources.- Parameters:
certSources- The certificate sources with known trusted certificates
-
addTrustedCertSources
Adds trusted certificate sources to an existing list of trusted certificate sources- Parameters:
certSources- The certificate sources with known trusted certificates
-
setTrustedCertSources
Sets a list of trusted certificate sources- Parameters:
trustedListCertificateSource-ListCertificateSourceof trusted cert sources
-
getAdjunctCertSources
ListCertificateSource getAdjunctCertSources()Returns the list of adjunct certificate sources assigned to this verifier.- Returns:
- the certificate source which contains additional certificate (missing CA,...)
-
setAdjunctCertSource
Deprecated.since 5.7. Will be removed in 5.8. UsesetAdjunctCertSource(CertificateSource... certSources)insteadSets an adjunct certificate source to this verifier.- Parameters:
adjunctCertSource- the certificate source with additional and missing certificates
-
setAdjunctCertSources
Sets multiple adjunct certificate sources.- Parameters:
certSources- the certificate sources with additional and/or missing certificates
-
addAdjunctCertSources
Adds adjunct certificate sources to an existing list of adjunct certificate sources- Parameters:
certSources- The certificate sources with additional certificates
-
setAdjunctCertSources
Sets a list of adjunct certificate sources- Parameters:
adjunctListCertificateSource-ListCertificateSourceof adjunct cert sources
-
getDataLoader
DataLoader getDataLoader()The data loader used to access AIA certificate source.- Returns:
- the used data loaded to load AIA resources and policy files
-
setDataLoader
The data loader used to access AIA certificate source. If this property is not set the defaultCommonsHttpDataLoaderis created.- Parameters:
dataLoader- the used data loaded to load AIA resources and policy files
-
getSignatureCRLSource
ListRevocationSource<CRL> getSignatureCRLSource()This method returns the CRL source (information extracted from signatures).- Returns:
- the CRL sources from the signature
-
setSignatureCRLSource
This method allows to set the CRL source (information extracted from signatures).- Parameters:
signatureCRLSource- the CRL sources from the signature
-
getSignatureOCSPSource
ListRevocationSource<OCSP> getSignatureOCSPSource()This method returns the OCSP source (information extracted from signatures).- Returns:
- the OCSP sources from the signatures
-
setSignatureOCSPSource
This method allows to set the OCSP source (information extracted from signatures).- Parameters:
signatureOCSPSource- the OCSP sources from the signature
-
getSignatureCertificateSource
ListCertificateSource getSignatureCertificateSource()This method returns the Certificate Source (information extracted from signatures)- Returns:
- the certificate sources from the signatures
-
setSignatureCertificateSource
This method allows to set the Certificate source (information extracted from signatures).- Parameters:
signatureCertificateSource- the Certificate sources from the signatures
-
setDefaultDigestAlgorithm
This method allows to change the Digest Algorithm that will be used for tokens' digest calculation- Parameters:
digestAlgorithm-DigestAlgorithmto use
-
getDefaultDigestAlgorithm
DigestAlgorithm getDefaultDigestAlgorithm()This method returns a default Digest Algorithm what will be used for digest calculation- Returns:
DigestAlgorithm
-
setAlertOnInvalidTimestamp
This method allows to change the behavior on invalid timestamp (LT/LTA augmentation). Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnInvalidTimestamp- defines a behaviour in case of invalid timestamp
-
getAlertOnInvalidTimestamp
StatusAlert getAlertOnInvalidTimestamp()This method returns true if an exception needs to be thrown on invalid timestamp.- Returns:
StatusAlertto be processed in case of an invalid timestamp
-
setAlertOnMissingRevocationData
This method allows to change the behavior on missing revocation data (LT/LTA augmentation). Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnMissingRevocationData- defines a behaviour in case of missing revocation data
-
getAlertOnMissingRevocationData
StatusAlert getAlertOnMissingRevocationData()This method returns true if an exception needs to be thrown on missing revocation data.- Returns:
StatusAlertto be processed in case of missing revocation data
-
setAlertOnRevokedCertificate
This method allows to change the behavior on revoked certificates (LT/LTA augmentation). Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnRevokedCertificate- defines a behaviour in case of revoked certificate
-
getAlertOnRevokedCertificate
StatusAlert getAlertOnRevokedCertificate()This method returns true if an exception needs to be thrown on revoked certificate.- Returns:
StatusAlertto be processed in case of revoked certificate
-
setAlertOnNoRevocationAfterBestSignatureTime
void setAlertOnNoRevocationAfterBestSignatureTime(StatusAlert alertOnNoRevocationAfterBestSignatureTime)This method allows to change the behavior on revocation data issued after a control time. Default :LogOnStatusAlert- log a warning.- Parameters:
alertOnNoRevocationAfterBestSignatureTime- defines a behaviour in case of no revocation data issued after the bestSignatureTime
-
getAlertOnNoRevocationAfterBestSignatureTime
StatusAlert getAlertOnNoRevocationAfterBestSignatureTime()This method returns true if an exception needs to be thrown in case if no revocation data obtained with an issuance time after the bestSignatureTime- Returns:
StatusAlertto be processed in case of no revocation data after best signature time
-
setAlertOnUncoveredPOE
This method allows to change the behavior on uncovered POE (timestamp). Default :LogOnStatusAlert- log a warning.- Parameters:
alertOnUncoveredPOE- defines a behaviour in case of uncovered POE
-
getAlertOnUncoveredPOE
StatusAlert getAlertOnUncoveredPOE()This method returns true if an exception needs to be thrown on uncovered POE(timestamp).- Returns:
StatusAlertto be processed in case of uncovered POE
-
setCheckRevocationForUntrustedChains
void setCheckRevocationForUntrustedChains(boolean enable)This method allows to enable revocation checking for untrusted certificate chains (default : false)- Parameters:
enable- true if revocation checking is allowed for untrusted certificate chains
-
isCheckRevocationForUntrustedChains
boolean isCheckRevocationForUntrustedChains()This method returns true if revocation check is enabled for untrusted certificate chains.- Returns:
- true if external revocation check is done for untrusted certificate chains
-