com.itextpdf.text.pdf
Class OcspClientBouncyCastle

java.lang.Object
  extended by com.itextpdf.text.pdf.OcspClientBouncyCastle
All Implemented Interfaces:
OcspClient

public class OcspClientBouncyCastle
extends Object
implements OcspClient

OcspClient implementation using BouncyCastle.

Since:
2.1.6
Author:
psoares

Field Summary
private  X509Certificate checkCert
          check certificate
private  X509Certificate rootCert
          root certificate
private  String url
          OCSP URL
 
Constructor Summary
OcspClientBouncyCastle(X509Certificate checkCert, X509Certificate rootCert, String url)
          Creates an instance of an OcspClient that will be using BouncyCastle.
 
Method Summary
private static OCSPReq generateOCSPRequest(X509Certificate issuerCert, BigInteger serialNumber)
          Generates an OCSP request using BouncyCastle.
 byte[] getEncoded()
          Gets an encoded byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootCert

private X509Certificate rootCert
root certificate


checkCert

private X509Certificate checkCert
check certificate


url

private String url
OCSP URL

Constructor Detail

OcspClientBouncyCastle

public OcspClientBouncyCastle(X509Certificate checkCert,
                              X509Certificate rootCert,
                              String url)
Creates an instance of an OcspClient that will be using BouncyCastle.

Parameters:
checkCert - the check certificate
rootCert - the root certificate
url - the OCSP URL
Method Detail

generateOCSPRequest

private static OCSPReq generateOCSPRequest(X509Certificate issuerCert,
                                           BigInteger serialNumber)
                                    throws OCSPException,
                                           IOException
Generates an OCSP request using BouncyCastle.

Parameters:
issuerCert - certificate of the issues
serialNumber - serial number
Returns:
an OCSP request
Throws:
OCSPException
IOException

getEncoded

public byte[] getEncoded()
Description copied from interface: OcspClient
Gets an encoded byte array.

Specified by:
getEncoded in interface OcspClient
Returns:
a byte array
See Also:
OcspClient.getEncoded()

Hosted by Hostbasket