iText 8.0.5 API
iText.Signatures.OcspClientBouncyCastle Class Reference

OcspClient implementation using BouncyCastle. More...

Inheritance diagram for iText.Signatures.OcspClientBouncyCastle:
iText.Signatures.IOcspClient

Public Member Functions

  OcspClientBouncyCastle (OCSPVerifier verifier)
  Creates OcspClient. More...
 
  OcspClientBouncyCastle ()
  Creates new OcspClientBouncyCastle instance. More...
 
virtual IBasicOcspResponse  GetBasicOCSPResp (IX509Certificate checkCert, IX509Certificate rootCert, String url)
  Gets OCSP response. More...
 
virtual byte[]  GetEncoded (IX509Certificate checkCert, IX509Certificate rootCert, String url)
  Fetch a DER-encoded BasicOCSPResponse from an OCSP responder. More...
 

Package Functions

virtual Stream  CreateRequestAndResponse (IX509Certificate checkCert, IX509Certificate rootCert, String url)
  Create OCSP request and get the response for this request, represented as System.IO.Stream. More...
 

Static Package Functions

static IOcspRequest  GenerateOCSPRequest (IX509Certificate issuerCert, IBigInteger serialNumber)
  Generates an OCSP request using BouncyCastle. More...
 
static ICertStatus  GetCertificateStatus (byte[] basicOcspRespBytes)
  Retrieves certificate status from the OCSP response. More...
 

Detailed Description

OcspClient implementation using BouncyCastle.

Constructor & Destructor Documentation

◆ OcspClientBouncyCastle() [1/2]

iText.Signatures.OcspClientBouncyCastle.OcspClientBouncyCastle ( OCSPVerifier  verifier )
inline

Creates OcspClient.

Parameters
verifier will be used for response verification.

◆ OcspClientBouncyCastle() [2/2]

iText.Signatures.OcspClientBouncyCastle.OcspClientBouncyCastle ( )
inline

Creates new OcspClientBouncyCastle instance.

Member Function Documentation

◆ CreateRequestAndResponse()

virtual Stream iText.Signatures.OcspClientBouncyCastle.CreateRequestAndResponse ( IX509Certificate  checkCert,
IX509Certificate  rootCert,
String  url 
)
inlinepackagevirtual

Create OCSP request and get the response for this request, represented as System.IO.Stream.

Parameters
checkCert

iText.Commons.Bouncycastle.Cert.IX509Certificate certificate to get OCSP response for

Parameters
rootCert

iText.Commons.Bouncycastle.Cert.IX509Certificate root certificate from which OCSP request will be built

Parameters
url

System.Uri link, which is expected to be used to get OCSP response from

Returns
OCSP response bytes, represented as System.IO.Stream

◆ GenerateOCSPRequest()

static IOcspRequest iText.Signatures.OcspClientBouncyCastle.GenerateOCSPRequest ( IX509Certificate  issuerCert,
IBigInteger  serialNumber 
)
inlinestaticpackage

Generates an OCSP request using BouncyCastle.

Parameters
issuerCert certificate of the issues
serialNumber serial number
Returns

iText.Commons.Bouncycastle.Cert.Ocsp.IOcspRequest an OCSP request wrapper

◆ GetBasicOCSPResp()

virtual IBasicOcspResponse iText.Signatures.OcspClientBouncyCastle.GetBasicOCSPResp ( IX509Certificate  checkCert,
IX509Certificate  rootCert,
String  url 
)
inlinevirtual

Gets OCSP response.

Gets OCSP response. If OCSPVerifier was set, the response will be checked.

Parameters
checkCert the certificate to check
rootCert parent certificate
url to get the verification
Returns

iText.Commons.Bouncycastle.Asn1.Ocsp.IBasicOcspResponse an OCSP response wrapper

◆ GetCertificateStatus()

static ICertStatus iText.Signatures.OcspClientBouncyCastle.GetCertificateStatus ( byte[]  basicOcspRespBytes )
inlinestaticpackage

Retrieves certificate status from the OCSP response.

Parameters
basicOcspRespBytes encoded basic OCSP response
Returns
good, revoked or unknown certificate status retrieved from the OCSP response, or null if an error occurs.

◆ GetEncoded()

virtual byte [] iText.Signatures.OcspClientBouncyCastle.GetEncoded ( IX509Certificate  checkCert,
IX509Certificate  rootCert,
String  url 
)
inlinevirtual

Fetch a DER-encoded BasicOCSPResponse from an OCSP responder.

Implements iText.Signatures.IOcspClient.