Package com.lowagie.text.pdf
Class OcspClientBouncyCastle
- java.lang.Object
-
- com.lowagie.text.pdf.OcspClientBouncyCastle
-
- All Implemented Interfaces:
OcspClient
public class OcspClientBouncyCastle extends java.lang.Object implements OcspClient
OcspClient implementation using BouncyCastle.- Since:
- 2.1.6
-
-
Field Summary
Fields Modifier and Type Field Description private java.security.cert.X509Certificate
checkCert
check certificateprivate java.net.Proxy
proxy
HTTP proxy used to access the OCSP URLprivate java.security.cert.X509Certificate
rootCert
root certificateprivate java.lang.String
url
OCSP URL
-
Constructor Summary
Constructors Constructor Description OcspClientBouncyCastle(java.security.cert.X509Certificate checkCert, java.security.cert.X509Certificate rootCert, java.lang.String url)
Creates an instance of an OcspClient that will be using BouncyCastle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static org.bouncycastle.cert.ocsp.OCSPReq
generateOCSPRequest(java.security.cert.X509Certificate issuerCert, java.math.BigInteger serialNumber)
Generates an OCSP request using BouncyCastle.byte[]
getEncoded()
Gets an encoded byte array.java.net.Proxy
getProxy()
Returns Proxy object used for URL connections.void
setProxy(java.net.Proxy aProxy)
Sets Proxy which will be used for URL connection.
-
-
-
Field Detail
-
rootCert
private final java.security.cert.X509Certificate rootCert
root certificate
-
checkCert
private final java.security.cert.X509Certificate checkCert
check certificate
-
url
private final java.lang.String url
OCSP URL
-
proxy
private java.net.Proxy proxy
HTTP proxy used to access the OCSP URL
-
-
Constructor Detail
-
OcspClientBouncyCastle
public OcspClientBouncyCastle(java.security.cert.X509Certificate checkCert, java.security.cert.X509Certificate rootCert, java.lang.String url)
Creates an instance of an OcspClient that will be using BouncyCastle.- Parameters:
checkCert
- the check certificaterootCert
- the root certificateurl
- the OCSP URL
-
-
Method Detail
-
generateOCSPRequest
private static org.bouncycastle.cert.ocsp.OCSPReq generateOCSPRequest(java.security.cert.X509Certificate issuerCert, java.math.BigInteger serialNumber) throws org.bouncycastle.cert.ocsp.OCSPException, java.io.IOException, org.bouncycastle.operator.OperatorCreationException, java.security.cert.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
java.io.IOException
org.bouncycastle.operator.OperatorCreationException
java.security.cert.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:
OcspClient
-
getProxy
public java.net.Proxy getProxy()
Returns Proxy object used for URL connections.- Returns:
- configured proxy
-
setProxy
public void setProxy(java.net.Proxy aProxy)
Sets Proxy which will be used for URL connection.- Parameters:
aProxy
- Proxy to set
-
-