Class OcspClientBouncyCastle
- Namespace
- iText.Signatures
- Assembly
- itext.sign.dll
OcspClient implementation using BouncyCastle.
public class OcspClientBouncyCastle : IOcspClient
- Inheritance
-
OcspClientBouncyCastle
- Implements
- Inherited Members
Constructors
OcspClientBouncyCastle()
Creates new OcspClientBouncyCastle instance.
public OcspClientBouncyCastle()
OcspClientBouncyCastle(OCSPVerifier)
Creates
OcspClient
.
[Obsolete("starting from 8.0.5. OcspClientBouncyCastle() should be used instead. If required, iText.Commons.Bouncycastle.Asn1.Ocsp.IBasicOcspResponse can be checked using iText.Signatures.Validation.V1.OCSPValidator class.")]
public OcspClientBouncyCastle(OCSPVerifier verifier)
Parameters
verifier
OCSPVerifierwill be used for response verification.
Methods
CreateRequestAndResponse(IX509Certificate, IX509Certificate, string)
Create OCSP request and get the response for this request, represented as Stream.
protected virtual Stream CreateRequestAndResponse(IX509Certificate checkCert, IX509Certificate rootCert, string url)
Parameters
checkCert
IX509CertificateiText.Commons.Bouncycastle.Cert.IX509Certificate certificate to get OCSP response for
rootCert
IX509CertificateiText.Commons.Bouncycastle.Cert.IX509Certificate root certificate from which OCSP request will be built
url
stringSystem.Uri link, which is expected to be used to get OCSP response from
Returns
GenerateOCSPRequest(IX509Certificate, IBigInteger)
Generates an OCSP request using BouncyCastle.
protected static IOcspRequest GenerateOCSPRequest(IX509Certificate issuerCert, IBigInteger serialNumber)
Parameters
issuerCert
IX509Certificatecertificate of the issues
serialNumber
IBigIntegerserial number
Returns
- IOcspRequest
iText.Commons.Bouncycastle.Cert.Ocsp.IOcspRequest an OCSP request wrapper
GetBasicOCSPResp(IX509Certificate, IX509Certificate, string)
Gets OCSP response.
public virtual IBasicOcspResponse GetBasicOCSPResp(IX509Certificate checkCert, IX509Certificate rootCert, string url)
Parameters
checkCert
IX509Certificatethe certificate to check
rootCert
IX509Certificateparent certificate
url
stringto get the verification
Returns
- IBasicOcspResponse
iText.Commons.Bouncycastle.Asn1.Ocsp.IBasicOcspResponse an OCSP response wrapper
Remarks
Gets OCSP response. If OCSPVerifier was set, the response will be checked.
GetCertificateStatus(byte[])
Retrieves certificate status from the OCSP response.
protected static ICertStatus GetCertificateStatus(byte[] basicOcspRespBytes)
Parameters
basicOcspRespBytes
byte[]encoded basic OCSP response
Returns
- ICertStatus
good, revoked or unknown certificate status retrieved from the OCSP response, or null if an error occurs.
GetEncoded(IX509Certificate, IX509Certificate, string)
public virtual byte[] GetEncoded(IX509Certificate checkCert, IX509Certificate rootCert, string url)
Parameters
checkCert
IX509CertificaterootCert
IX509Certificateurl
string
Returns
- byte[]