Class OcspClientBouncyCastle

java.lang.Object
com.lowagie.text.pdf.OcspClientBouncyCastle
All Implemented Interfaces:
OcspClient

public class OcspClientBouncyCastle extends Object implements OcspClient
OcspClient implementation using BouncyCastle.
Since:
2.1.6
  • Field Details

    • rootCert

      private final X509Certificate rootCert
      root certificate
    • checkCert

      private final X509Certificate checkCert
      check certificate
    • url

      private final String url
      OCSP URL
    • proxy

      private Proxy proxy
      HTTP proxy used to access the OCSP URL
  • Constructor Details

    • 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 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 issues
      serialNumber - 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 interface OcspClient
      Returns:
      a byte array
      See Also:
    • getProxy

      public Proxy getProxy()
      Returns Proxy object used for URL connections.
      Returns:
      configured proxy
    • setProxy

      public void setProxy(Proxy aProxy)
      Sets Proxy which will be used for URL connection.
      Parameters:
      aProxy - Proxy to set