Package com.lowagie.text.pdf
Class OcspClientBouncyCastle
java.lang.Object
com.lowagie.text.pdf.OcspClientBouncyCastle
- All Implemented Interfaces:
OcspClient
OcspClient implementation using BouncyCastle.
- Since:
- 2.1.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final X509Certificate
check certificateprivate Proxy
HTTP proxy used to access the OCSP URLprivate final X509Certificate
root certificateprivate final String
OCSP URL -
Constructor Summary
ConstructorsConstructorDescriptionOcspClientBouncyCastle
(X509Certificate checkCert, X509Certificate rootCert, String url) Creates an instance of an OcspClient that will be using BouncyCastle. -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.bouncycastle.cert.ocsp.OCSPReq
generateOCSPRequest
(X509Certificate issuerCert, BigInteger serialNumber) Generates an OCSP request using BouncyCastle.byte[]
Gets an encoded byte array.getProxy()
Returns Proxy object used for URL connections.void
Sets Proxy which will be used for URL connection.
-
Field Details
-
rootCert
root certificate -
checkCert
check certificate -
url
OCSP URL -
proxy
HTTP proxy used to access the OCSP URL
-
-
Constructor Details
-
OcspClientBouncyCastle
Creates an instance of an OcspClient that will be using BouncyCastle.- Parameters:
checkCert
- the check certificaterootCert
- the root certificateurl
- the OCSP URL
-
-
Method Details
-
generateOCSPRequest
private static org.bouncycastle.cert.ocsp.OCSPReq generateOCSPRequest(X509Certificate issuerCert, BigInteger serialNumber) throws org.bouncycastle.cert.ocsp.OCSPException, IOException, org.bouncycastle.operator.OperatorCreationException, CertificateEncodingException Generates an OCSP request using BouncyCastle.- Parameters:
issuerCert
- certificate of the issuesserialNumber
- serial number- Returns:
- an OCSP request
- Throws:
org.bouncycastle.cert.ocsp.OCSPException
IOException
org.bouncycastle.operator.OperatorCreationException
CertificateEncodingException
-
getEncoded
public byte[] getEncoded()Description copied from interface:OcspClient
Gets an encoded byte array.- Specified by:
getEncoded
in interfaceOcspClient
- Returns:
- a byte array
- See Also:
-
getProxy
Returns Proxy object used for URL connections.- Returns:
- configured proxy
-
setProxy
Sets Proxy which will be used for URL connection.- Parameters:
aProxy
- Proxy to set
-