Class CertificateChainValidator
java.lang.Object
com.itextpdf.signatures.validation.v1.CertificateChainValidator
Validator class, which is expected to be used for certificates chain validation.
-
Method Summary
Modifier and TypeMethodDescriptionaddCrlClient
(ICrlClient crlClient) AddICrlClient
to be used for CRL responses receiving.addOcspClient
(IOcspClient ocpsClient) AddIOcspClient
to be used for OCSP responses receiving.validate
(ValidationReport result, ValidationContext context, X509Certificate certificate, Date validationDate) Validate given certificate using provided validation date and required extensions.validateCertificate
(ValidationContext context, X509Certificate certificate, Date validationDate) Validate given certificate using provided validation date and required extensions.
-
Method Details
-
addCrlClient
AddICrlClient
to be used for CRL responses receiving.- Parameters:
-
crlClient
-ICrlClient
to be used for CRL responses receiving - Returns:
-
same instance of
CertificateChainValidator
-
addOcspClient
AddIOcspClient
to be used for OCSP responses receiving.- Parameters:
-
ocpsClient
-IOcspClient
to be used for OCSP responses receiving - Returns:
-
same instance of
CertificateChainValidator
-
validateCertificate
public ValidationReport validateCertificate(ValidationContext context, X509Certificate certificate, Date validationDate) Validate given certificate using provided validation date and required extensions.- Parameters:
-
context
- the validation context in which to validate the certificate chain -
certificate
-X509Certificate
to be validated -
validationDate
-Date
against which certificate is expected to be validated. Usually signing date - Returns:
-
ValidationReport
which contains detailed validation results
-
validate
public ValidationReport validate(ValidationReport result, ValidationContext context, X509Certificate certificate, Date validationDate) Validate given certificate using provided validation date and required extensions. Result is added into provided report.- Parameters:
-
result
-ValidationReport
which is populated with detailed validation results -
context
- the context in which to perform the validation -
certificate
-X509Certificate
to be validated -
validationDate
-Date
against which certificate is expected to be validated. Usually signing date - Returns:
-
ValidationReport
which contains both provided and new validation results
-