Class CertificateChainValidator
java.lang.Object
com.itextpdf.signatures.validation.v1.CertificateChainValidator
Validator class, which is expected to be used for certificates chain validation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCrlClient
(ICrlClient crlClient) Deprecated.addOcspClient
(IOcspClient ocpsClient) 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.
-
Constructor Details
-
CertificateChainValidator
Create new instance ofCertificateChainValidator
.- Parameters:
-
builder
- SeeValidatorChainBuilder
-
-
Method Details
-
addCrlClient
Deprecated.in favour of eitherSignatureValidationProperties.addCrlClient(com.itextpdf.signatures.ICrlClient)
orRevocationDataValidator.addCrlClient(com.itextpdf.signatures.ICrlClient)
. TODO DEVSIX-8398 To be removed.AddICrlClient
to be used for CRL responses receiving.- Parameters:
-
crlClient
-ICrlClient
to be used for CRL responses receiving - Returns:
-
same instance of
CertificateChainValidator
.
-
addOcspClient
Deprecated.in favour of eitherSignatureValidationProperties.addOcspClient(com.itextpdf.signatures.IOcspClient)
orRevocationDataValidator.addOcspClient(com.itextpdf.signatures.IOcspClient)
. TODO DEVSIX-8398 To be removed.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.
-
SignatureValidationProperties.addCrlClient(com.itextpdf.signatures.ICrlClient)
orRevocationDataValidator.addCrlClient(com.itextpdf.signatures.ICrlClient)
.