Table of Contents

Class IssuingCertificateRetriever

Namespace
iText.Signatures
Assembly
itext.sign.dll

IIssuingCertificateRetriever default implementation.

public class IssuingCertificateRetriever : IIssuingCertificateRetriever
Inheritance
IssuingCertificateRetriever
Implements
Inherited Members

Constructors

IssuingCertificateRetriever()

Creates IssuingCertificateRetriever instance.

public IssuingCertificateRetriever()

Methods

AddKnownCertificates(ICollection<IX509Certificate>)

Add certificates collection to known certificates storage, which is used for issuer certificates retrieval.

public virtual void AddKnownCertificates(ICollection<IX509Certificate> certificates)

Parameters

certificates ICollection<IX509Certificate>

certificates to be added

AddTrustedCertificates(ICollection<IX509Certificate>)

Add trusted certificates collection to trusted certificates storage.

public virtual void AddTrustedCertificates(ICollection<IX509Certificate> certificates)

Parameters

certificates ICollection<IX509Certificate>

certificates to be added

GetCrlIssuerCertificates(IX509Crl)

public virtual IX509Certificate[] GetCrlIssuerCertificates(IX509Crl crl)

Parameters

crl IX509Crl

Returns

IX509Certificate[]

GetIssuerCertByURI(string)

Get CA issuers certificates represented as Stream.

protected virtual Stream GetIssuerCertByURI(string uri)

Parameters

uri string

System.Uri URI, which is expected to be used to get issuer certificates from. Usually CA Issuers value from Authority Information Access (AIA) certificate extension.

Returns

Stream

CA issuer certificate (or chain) bytes, represented as Stream.

GetTrustedCertificatesStore()

Gets TrustedCertificatesStore to be used to provide more complex trusted certificates configuration.

public virtual TrustedCertificatesStore GetTrustedCertificatesStore()

Returns

TrustedCertificatesStore

TrustedCertificatesStore storage

IsCertificateTrusted(IX509Certificate)

Check if provided certificate is present in trusted certificates storage.

public virtual bool IsCertificateTrusted(IX509Certificate certificate)

Parameters

certificate IX509Certificate

iText.Commons.Bouncycastle.Cert.IX509Certificate to be checked

Returns

bool

true if certificate is present in trusted certificates storage, false otherwise

ParseCertificates(Stream)

Parses certificates represented as byte array.

protected virtual ICollection<IX509Certificate> ParseCertificates(Stream certsData)

Parameters

certsData Stream

stream which contains one or more X509 certificates.

Returns

ICollection<IX509Certificate>

a (possibly empty) collection of the certificates read from the given byte array.

RetrieveIssuerCertificate(IX509Certificate)

Retrieve issuer certificate for the provided certificate.

public virtual IX509Certificate RetrieveIssuerCertificate(IX509Certificate certificate)

Parameters

certificate IX509Certificate

iText.Commons.Bouncycastle.Cert.IX509Certificate for which issuer certificate shall be retrieved

Returns

IX509Certificate

issuer certificate. null if there is no issuer certificate, or it cannot be retrieved.

RetrieveMissingCertificates(IX509Certificate[])

public virtual IX509Certificate[] RetrieveMissingCertificates(IX509Certificate[] chain)

Parameters

chain IX509Certificate[]

Returns

IX509Certificate[]

RetrieveOCSPResponderCertificate(IBasicOcspResponse)

Retrieves OCSP responder certificate either from the response certs or trusted store in case responder certificate isn't found in /Certs.

public virtual IX509Certificate RetrieveOCSPResponderCertificate(IBasicOcspResponse ocspResp)

Parameters

ocspResp IBasicOcspResponse

basic OCSP response to get responder certificate for

Returns

IX509Certificate

retrieved OCSP responder certificate or null in case it wasn't found.

SetTrustedCertificates(ICollection<IX509Certificate>)

Sets trusted certificate list to be used as certificates trusted for any possible usage.

public virtual void SetTrustedCertificates(ICollection<IX509Certificate> certificates)

Parameters

certificates ICollection<IX509Certificate>

certificate list to be used as certificates trusted for any possible usage.

Remarks

Sets trusted certificate list to be used as certificates trusted for any possible usage. In case more specific trusted is desired to be configured GetTrustedCertificatesStore() method is expected to be used.