public class OcspClientBouncyCastle extends Object implements IOcspClient
Constructor and Description |
---|
OcspClientBouncyCastle(OCSPVerifier verifier)
Creates OcspClient .
|
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.cert.ocsp.BasicOCSPResp |
getBasicOCSPResp(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.
|
public OcspClientBouncyCastle(OCSPVerifier verifier)
OcspClient
.
verifier
- will be used for response verification.
OCSPVerifier
public org.bouncycastle.cert.ocsp.BasicOCSPResp getBasicOCSPResp(X509Certificate checkCert, X509Certificate rootCert, String url)
OCSPVerifier
was set, the response will be checked.
checkCert
- to certificate to check
rootCert
- the parent certificate
url
- to get the verification
public byte[] getEncoded(X509Certificate checkCert, X509Certificate rootCert, String url)
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.
getEncoded
in interface IOcspClient
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.
Copyright © 1998–2022 iText Group NV. All rights reserved.