Interface CertificateVerifier
- All Known Implementing Classes:
CommonCertificateVerifier
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdjunctCertSources(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 sourcesReturns the list of adjunct certificate sources assigned to this verifier.Gets the AIASource used to load aeu.europa.esig.dss.model.x509.CertificateToken's issuer by defined AIA URI(s) within the tokenThis method returns the defined behavior on signature creation or augmentation with an expired signing-certificate (notAfter is before the current time).This method returns the defined execution behaviour on invalid signature.This method returns the defined execution behaviour on invalid timestamp.This method returns the defined execution behaviour on missing revocation data.This method returns the defined execution behaviour if no revocation data obtained with an issuance time after the bestSignatureTimeThis method returns the defined behavior on signature creation with a not yet valid signing-certificateThis method returns the defined execution behaviour on revoked certificate.This method returns the defined execution behaviour on uncovered POE (timestamp).This method returns the defined augmentation behaviour for a signature of a higher level or a document containing a such signature.This method returns the defined augmentation behaviour for a signature containing only self-signed certificate chains.This method returns the defined augmentation behaviour for a signature without certificates.Returns the CRL source associated with this verifier.Returns the OCSP source associated with this verifier.Returns a factory used to create revocation data loading strategy associated with this verifier.Returns aRevocationDataVerifierassociated with this verifier.Returns aTimestampTokenVerifierassociated with this verifier.Returns aTrustAnchorVerifierassociated with this verifier.Returns the trusted certificate sources associated with this verifier.booleanThis method returns true if revocation check is enabled for untrusted certificate chains.booleanReturns whether revocation data still shall be returned if validation of requested revocation data failed (i.e. both for OCSP and CRL).voidsetAdjunctCertSources(CertificateSource... certSources) Sets multiple adjunct certificate sources.voidsetAdjunctCertSources(ListCertificateSource adjunctListCertificateSource) Sets a list of adjunct certificate sourcesvoidsetAIASource(AIASource aiaSource) Sets the AIASource used to load aeu.europa.esig.dss.model.x509.CertificateToken's issuer by defined AIA URI(s) within the tokenvoidsetAlertOnExpiredCertificate(StatusAlert alertOnExpiredCertificate) This method allows to change a behavior on signature creation or augmentation with an expired signing-certificate (notAfter is before the current time).voidsetAlertOnInvalidSignature(StatusAlert alertOnInvalidSignature) This method allows to change the behavior on invalid signature (T/LT/LTA augmentation).voidsetAlertOnInvalidTimestamp(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.voidsetAlertOnNotYetValidCertificate(StatusAlert alertOnNotYetValidCertificate) This method allows to change a behavior on signature creation with a not yet valid signing-certificate (notBefore is after the current time) NULL value provides a possibility to skip check execution.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).voidsetAugmentationAlertOnHigherSignatureLevel(StatusAlert augmentationAlertOnHigherSignatureLevel) This method allows to change the augmentation behaviour for a signature of a higher level or a document containing a such signature.voidsetAugmentationAlertOnSelfSignedCertificateChains(StatusAlert augmentationAlertOnSelfSignedCertificateChains) This method allows to change the augmentation behaviour for a signature containing only self-signed certificate chains.voidsetAugmentationAlertOnSignatureWithoutCertificates(StatusAlert augmentationAlertOnSignatureWithoutCertificates) This method allows to change the augmentation behaviour for a signature without certificates.voidsetCheckRevocationForUntrustedChains(boolean enable) This method allows enabling of revocation checking for untrusted certificate chains.voidsetCrlSource(RevocationSource<CRL> crlSource) Defines the source of CRL used by this classvoidsetOcspSource(RevocationSource<OCSP> ocspSource) Defines the source of OCSP used by this classvoidsetRevocationDataLoadingStrategyFactory(RevocationDataLoadingStrategyFactory revocationDataLoadingStrategyFactory) Creates a strategy used to fetch OCSP or CRL for certificate validation.voidsetRevocationDataVerifier(RevocationDataVerifier revocationDataVerifier) SetsRevocationDataVerifierused to validate acceptance of the retrieved (from offline or online sources) revocation data.voidsetRevocationFallback(boolean revocationFallback) Sets whether a revocation data still have to be returned to the validation process, in case validation of obtained revocation data has failed (i.e. both for OCSP and CRL).voidsetTimestampTokenVerifier(TimestampTokenVerifier timestampTokenVerifier) SetsTimestampTokenVerifierused to validate acceptance of the timestamp tokens encapsulated within the signature.voidsetTrustAnchorVerifier(TrustAnchorVerifier trustAnchorVerifier) SetsTrustAnchorVerifierused to validate acceptance of the trust anchorsvoidsetTrustedCertSources(CertificateSource... certSources) Sets multiple trusted certificate sources.voidsetTrustedCertSources(ListCertificateSource trustedListCertificateSource) Sets a list of trusted certificate sources
-
Method Details
-
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,...)
-
getOcspSource
RevocationSource<OCSP> getOcspSource()Returns the OCSP source associated with this verifier.- Returns:
- the used OCSP source 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,...)
-
getRevocationDataLoadingStrategyFactory
RevocationDataLoadingStrategyFactory getRevocationDataLoadingStrategyFactory()Returns a factory used to create revocation data loading strategy associated with this verifier.- Returns:
- creates the defined strategy to fetch OCSP or CRL for certificate validation
-
setRevocationDataLoadingStrategyFactory
void setRevocationDataLoadingStrategyFactory(RevocationDataLoadingStrategyFactory revocationDataLoadingStrategyFactory) Creates a strategy used to fetch OCSP or CRL for certificate validation. Default:OCSPFirstRevocationDataLoadingStrategyFactoryused to create a strategy to extract OCSP token first and CRL after- Parameters:
revocationDataLoadingStrategyFactory-RevocationDataLoadingStrategyFactory
-
getRevocationDataVerifier
RevocationDataVerifier getRevocationDataVerifier()Returns aRevocationDataVerifierassociated with this verifier.- Returns:
RevocationDataVerifier
-
setRevocationDataVerifier
SetsRevocationDataVerifierused to validate acceptance of the retrieved (from offline or online sources) revocation data. This class is used to verify revocation data extracted from the validating document itself, as well the revocation data retrieved from remote sources during the validation process.NOTE: It is not recommended to use the same instance of
RevocationDataVerifierwithin differentCertificateVerifiers, as it may lead to concurrency issues during the execution in multi-threaded environments. Please use a newRevocationDataVerifierper eachCertificateVerifier.- Parameters:
revocationDataVerifier-RevocationDataVerifier
-
isRevocationFallback
boolean isRevocationFallback()Returns whether revocation data still shall be returned if validation of requested revocation data failed (i.e. both for OCSP and CRL).- Returns:
- revocation fallback
-
setRevocationFallback
void setRevocationFallback(boolean revocationFallback) Sets whether a revocation data still have to be returned to the validation process, in case validation of obtained revocation data has failed (i.e. both for OCSP and CRL). Default: FALSE (invalid revocation data not returned)NOTE: Revocation fallback is enforced to TRUE (return even invalid revocation data, when no valid found) on signature validation
- Parameters:
revocationFallback- whether invalid revocation data shall be returned, when not valid revocation available
-
getTimestampTokenVerifier
TimestampTokenVerifier getTimestampTokenVerifier()Returns aTimestampTokenVerifierassociated with this verifier.- Returns:
TimestampTokenVerifier
-
setTimestampTokenVerifier
SetsTimestampTokenVerifierused to validate acceptance of the timestamp tokens encapsulated within the signature.NOTE: This object is not synchronized by default with the used XML Validation Policy. Please configure the object yourself in case a customized behavior is expected for acceptance of timestamp tokens.
- Parameters:
timestampTokenVerifier-TimestampTokenVerifier
-
getTrustAnchorVerifier
TrustAnchorVerifier getTrustAnchorVerifier()Returns aTrustAnchorVerifierassociated with this verifier.- Returns:
TrustAnchorVerifier
-
setTrustAnchorVerifier
SetsTrustAnchorVerifierused to validate acceptance of the trust anchorsNOTE: This object is not synchronized by default with the used XML Validation Policy. The trusted certificate source set within CertificateVerifier is synchronized automatically unless explicitly defined within TrustAnchorVerifier. Please configure the object yourself in case a customized behavior is expected for acceptance of trust anchors.
- Parameters:
trustAnchorVerifier-TrustAnchorVerifier
-
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
-
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,...)
-
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
-
getAIASource
AIASource getAIASource()Gets the AIASource used to load aeu.europa.esig.dss.model.x509.CertificateToken's issuer by defined AIA URI(s) within the token- Returns:
- aiaSource
AIASource
-
setAIASource
Sets the AIASource used to load aeu.europa.esig.dss.model.x509.CertificateToken's issuer by defined AIA URI(s) within the token- Parameters:
aiaSource-AIASource
-
setAlertOnInvalidSignature
This method allows to change the behavior on invalid signature (T/LT/LTA augmentation). NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnInvalidSignature- defines a behaviour in case of invalid signature
-
getAlertOnInvalidSignature
StatusAlert getAlertOnInvalidSignature()This method returns the defined execution behaviour on invalid signature.- Returns:
StatusAlertto be processed in case of an invalid signature
-
setAlertOnInvalidTimestamp
This method allows to change the behavior on invalid timestamp (LT/LTA augmentation). NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnInvalidTimestamp- defines a behaviour in case of invalid timestamp
-
getAlertOnInvalidTimestamp
StatusAlert getAlertOnInvalidTimestamp()This method returns the defined execution behaviour 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). NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnMissingRevocationData- defines a behaviour in case of missing revocation data
-
getAlertOnMissingRevocationData
StatusAlert getAlertOnMissingRevocationData()This method returns the defined execution behaviour 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). NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnRevokedCertificate- defines a behaviour in case of revoked certificate
-
getAlertOnRevokedCertificate
StatusAlert getAlertOnRevokedCertificate()This method returns the defined execution behaviour 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. NULL value provides a possibility to skip check execution. 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 the defined execution behaviour 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). NULL value provides a possibility to skip check execution. Default :LogOnStatusAlert- log a warning.- Parameters:
alertOnUncoveredPOE- defines a behaviour in case of uncovered POE
-
getAlertOnUncoveredPOE
StatusAlert getAlertOnUncoveredPOE()This method returns the defined execution behaviour on uncovered POE (timestamp).- Returns:
StatusAlertto be processed in case of uncovered POE
-
setAlertOnExpiredCertificate
This method allows to change a behavior on signature creation or augmentation with an expired signing-certificate (notAfter is before the current time). Validated the available POEs in case of existing signature augmentation. NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnExpiredCertificate- defines behavior in case of an expired signing-certificate
-
getAlertOnExpiredCertificate
StatusAlert getAlertOnExpiredCertificate()This method returns the defined behavior on signature creation or augmentation with an expired signing-certificate (notAfter is before the current time). Validated the available POEs in case of existing signature augmentation.- Returns:
StatusAlertto process in case of a signature with an expired certificate
-
setAlertOnNotYetValidCertificate
This method allows to change a behavior on signature creation with a not yet valid signing-certificate (notBefore is after the current time) NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
alertOnNotYetValidCertificate- defines behavior in case of a not yet valid signing-certificate
-
getAlertOnNotYetValidCertificate
StatusAlert getAlertOnNotYetValidCertificate()This method returns the defined behavior on signature creation with a not yet valid signing-certificate- Returns:
StatusAlertto process in case of a signature with a not yet valid signing-certificate
-
setAugmentationAlertOnHigherSignatureLevel
void setAugmentationAlertOnHigherSignatureLevel(StatusAlert augmentationAlertOnHigherSignatureLevel) This method allows to change the augmentation behaviour for a signature of a higher level or a document containing a such signature. NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
augmentationAlertOnHigherSignatureLevel- defines augmentation behaviour for a signature of a higher level or a document containing a such signature.
-
getAugmentationAlertOnHigherSignatureLevel
StatusAlert getAugmentationAlertOnHigherSignatureLevel()This method returns the defined augmentation behaviour for a signature of a higher level or a document containing a such signature.- Returns:
StatusAlertto be processed in case of a signature of a higher level or a document containing a such signature.
-
setAugmentationAlertOnSignatureWithoutCertificates
void setAugmentationAlertOnSignatureWithoutCertificates(StatusAlert augmentationAlertOnSignatureWithoutCertificates) This method allows to change the augmentation behaviour for a signature without certificates. The alert is triggered when no certificate is defined within the signature. NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
augmentationAlertOnSignatureWithoutCertificates- defines augmentation behaviour for a signature without certificates.
-
getAugmentationAlertOnSignatureWithoutCertificates
StatusAlert getAugmentationAlertOnSignatureWithoutCertificates()This method returns the defined augmentation behaviour for a signature without certificates.- Returns:
StatusAlertto be processed in case of a signature without certificates
-
setAugmentationAlertOnSelfSignedCertificateChains
void setAugmentationAlertOnSelfSignedCertificateChains(StatusAlert augmentationAlertOnSelfSignedCertificateChains) This method allows to change the augmentation behaviour for a signature containing only self-signed certificate chains. The alert is triggered when all used certificates are self-signed. NULL value provides a possibility to skip check execution. Default :ExceptionOnStatusAlert- throw an exception.- Parameters:
augmentationAlertOnSelfSignedCertificateChains- defines augmentation behaviour for a signature containing only self-signed certificate chains.
-
getAugmentationAlertOnSelfSignedCertificateChains
StatusAlert getAugmentationAlertOnSelfSignedCertificateChains()This method returns the defined augmentation behaviour for a signature containing only self-signed certificate chains.- Returns:
StatusAlertto be processed in case of a signature containing only self-signed certificate chains
-
setCheckRevocationForUntrustedChains
void setCheckRevocationForUntrustedChains(boolean enable) This method allows enabling of revocation checking for untrusted certificate chains. Default : FALSE (revocation data is not checked for untrusted certificate chains)- 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
-