Package eu.europa.esig.dss.validation
Class CertificateValidator
java.lang.Object
eu.europa.esig.dss.validation.CertificateValidator
- All Implemented Interfaces:
ProcessExecutorProvider<CertificateProcessExecutor>
public class CertificateValidator extends Object implements ProcessExecutorProvider<CertificateProcessExecutor>
Validates a CertificateToken
-
Method Summary
Modifier and Type Method Description static CertificateValidator
fromCertificate(CertificateToken token)
Creates a CertificateValidator from a certificateTokenCertificateProcessExecutor
getDefaultProcessExecutor()
Returns a default for a validator process executorCertificateProcessExecutor
provideProcessExecutorInstance()
Gets theCertificateProcessExecutor
void
setCertificateVerifier(CertificateVerifier certificateVerifier)
Sets the CertificateVerifiervoid
setLocale(Locale locale)
Sets the Locale to use for messages in reportsvoid
setProcessExecutor(CertificateProcessExecutor processExecutor)
This method provides the possibility to set the specificCustomProcessExecutor
void
setTokenExtractionStrategy(TokenExtractionStrategy tokenExtractionStrategy)
Sets the TokenExtractionStrategyvoid
setValidationTime(Date validationTime)
Sets the validationTimeCertificateReports
validate()
Validates the certificate with a default validation policyCertificateReports
validate(ValidationPolicy validationPolicy)
Validated the certificate with a custom validation policy
-
Method Details
-
fromCertificate
Creates a CertificateValidator from a certificateToken- Parameters:
token
-CertificateToken
- Returns:
CertificateValidator
-
setCertificateVerifier
Sets the CertificateVerifier- Parameters:
certificateVerifier
-CertificateVerifier
-
setTokenExtractionStrategy
Sets the TokenExtractionStrategy- Parameters:
tokenExtractionStrategy
-TokenExtractionStrategy
-
setValidationTime
Sets the validationTime- Parameters:
validationTime
-Date
-
setLocale
Sets the Locale to use for messages in reports- Parameters:
locale
-Locale
-
validate
Validates the certificate with a default validation policy- Returns:
CertificateReports
-
validate
Validated the certificate with a custom validation policy- Parameters:
validationPolicy
-ValidationPolicy
- Returns:
CertificateReports
-
setProcessExecutor
Description copied from interface:ProcessExecutorProvider
This method provides the possibility to set the specificCustomProcessExecutor
- Specified by:
setProcessExecutor
in interfaceProcessExecutorProvider<CertificateProcessExecutor>
- Parameters:
processExecutor
-ProcessExecutor
-
provideProcessExecutorInstance
Gets theCertificateProcessExecutor
- Returns:
CertificateProcessExecutor
-
getDefaultProcessExecutor
Description copied from interface:ProcessExecutorProvider
Returns a default for a validator process executor- Specified by:
getDefaultProcessExecutor
in interfaceProcessExecutorProvider<CertificateProcessExecutor>
- Returns:
- Process Executor
-