Class RemoteCertificateValidationService
java.lang.Object
eu.europa.esig.dss.ws.cert.validation.common.RemoteCertificateValidationService
The webService for a Certificate validation
-
Constructor Summary
ConstructorsConstructorDescriptionDefault construction instantiating object with null CertificateVerifier -
Method Summary
Modifier and TypeMethodDescriptionprotected eu.europa.esig.dss.validation.policy.ValidationPolicyLoaderGets a default validation policy loader for a certificate validationprotected eu.europa.esig.dss.validation.CertificateValidatorinitValidator(eu.europa.esig.dss.ws.cert.validation.dto.CertificateToValidateDTO certificateToValidate) Instantiates aCertificateValidatorbased on the request data DTOvoidsetDefaultValidationPolicy(eu.europa.esig.dss.model.policy.ValidationPolicy validationPolicy) Sets the validation policy to be used by default, when no policy provided within the requestvoidsetDefaultValidationPolicy(InputStream validationPolicy) Sets the validation policy to be used by default, when no policy provided within the requestvoidsetDefaultValidationPolicy(InputStream validationPolicy, InputStream cryptographicSuite) Sets the validation policy with a custom cryptographic suite to be used by default, when no policy provided within the request.voidsetVerifier(eu.europa.esig.dss.spi.validation.CertificateVerifier verifier) Sets the CertificateVerifiereu.europa.esig.dss.ws.cert.validation.dto.CertificateReportsDTOvalidateCertificate(eu.europa.esig.dss.ws.cert.validation.dto.CertificateToValidateDTO certificateToValidate) Validates the certificate
-
Constructor Details
-
RemoteCertificateValidationService
public RemoteCertificateValidationService()Default construction instantiating object with null CertificateVerifier
-
-
Method Details
-
setVerifier
public void setVerifier(eu.europa.esig.dss.spi.validation.CertificateVerifier verifier) Sets the CertificateVerifier- Parameters:
verifier-CertificateVerifierto be used for validation
-
setDefaultValidationPolicy
Sets the validation policy to be used by default, when no policy provided within the request- Parameters:
validationPolicy-InputStream
-
setDefaultValidationPolicy
public void setDefaultValidationPolicy(InputStream validationPolicy, InputStream cryptographicSuite) Sets the validation policy with a custom cryptographic suite to be used by default, when no policy provided within the request. If cryptographic suite is set, the constraints from validation policy will be overwritten by the constraints retrieved from the cryptographic suite. When set, the cryptographic suite constraints are applied with the default behavior, using FAIL level. For a customizable cryptographic suite and its applicability context, please useeu.europa.esig.dss.validation.policy.ValidationPolicyLoader.The format of validation policy should correspond to the DSS XML Validation policy (please include 'dss-policy-jaxb' module in your classpath), unless a custom validation policy has been implemented. The format of cryptographic suite should correspond to XML or JSON schema as defined in ETSI TS 119 322 (please include 'dss-policy-crypto-xml' or 'dss-policy-crypto-json' to the classpath), unless a custom cryptographic suite has been implemented.
The
InputStreamparameters contains the constraint files. If null the default file is used.- Parameters:
validationPolicy-InputStreamcryptographicSuite-InputStream
-
setDefaultValidationPolicy
public void setDefaultValidationPolicy(eu.europa.esig.dss.model.policy.ValidationPolicy validationPolicy) Sets the validation policy to be used by default, when no policy provided within the request- Parameters:
validationPolicy-ValidationPolicy
-
validateCertificate
public eu.europa.esig.dss.ws.cert.validation.dto.CertificateReportsDTO validateCertificate(eu.europa.esig.dss.ws.cert.validation.dto.CertificateToValidateDTO certificateToValidate) Validates the certificate- Parameters:
certificateToValidate-CertificateToValidateDTOthe DTO containing the certificate to be validated and its corresponding data- Returns:
CertificateReportsDTOthe validation reports
-
fromDefaultCertificateValidationPolicyLoader
protected eu.europa.esig.dss.validation.policy.ValidationPolicyLoader fromDefaultCertificateValidationPolicyLoader()Gets a default validation policy loader for a certificate validation- Returns:
ValidationPolicyLoader
-
initValidator
protected eu.europa.esig.dss.validation.CertificateValidator initValidator(eu.europa.esig.dss.ws.cert.validation.dto.CertificateToValidateDTO certificateToValidate) Instantiates aCertificateValidatorbased on the request data DTO- Parameters:
certificateToValidate-CertificateToValidateDTOrepresenting the request data- Returns:
CertificateValidator
-