Package com.itextpdf.signatures
Class OcspClientBouncyCastle
java.lang.Object
com.itextpdf.signatures.OcspClientBouncyCastle
- All Implemented Interfaces:
-
IOcspClient
OcspClient implementation using BouncyCastle.
- Author:
- Paulo Soarees
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBasicOCSPResp
(X509Certificate checkCert, X509Certificate rootCert, String url) Gets OCSP response.byte[]
getEncoded
(X509Certificate checkCert, X509Certificate rootCert, String url) Fetch a DER-encoded BasicOCSPResponse from an OCSP responder.
-
Constructor Details
-
OcspClientBouncyCastle
CreatesOcspClient
.- Parameters:
-
verifier
- will be used for response verification. - See Also:
-
-
Method Details
-
getBasicOCSPResp
public IBasicOCSPResp getBasicOCSPResp(X509Certificate checkCert, X509Certificate rootCert, String url) Gets OCSP response. IfOCSPVerifier
was set, the response will be checked.- Parameters:
-
checkCert
- to certificate to check -
rootCert
- the parent certificate -
url
- to get the verification - Returns:
-
IBasicOCSPResp
an OCSP response wrapper
-
getEncoded
Fetch a DER-encoded BasicOCSPResponse from an OCSP responder. The method should not throw an exception.Note: do not pass in the full DER-encoded OCSPResponse object obtained from the responder, only the DER-encoded BasicOCSPResponse value contained in the response data.
- Specified by:
-
getEncoded
in interfaceIOcspClient
- Parameters:
-
checkCert
- Certificate to check. -
rootCert
- The parent certificate. -
url
- The URL of the OCSP responder endpoint. If null, implementations can attempt to obtain a URL from the AuthorityInformationAccess extension of the certificate, or from another implementation-specific source. - Returns:
- a byte array containing a DER-encoded BasicOCSPResponse structure or null if one could not be obtained
- See Also:
-