Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

CertificateRevocationFetcher

OfficeIMO.Security

Namespace
OfficeIMO.Security
Assembly
OfficeIMO.Security
Source revision
ba882f6b0d07 with working tree changes
Implements
ICertificateRevocationFetcher IDisposable
Modifiers
sealed

Fetches OCSP responses (RFC 6960) and CRLs (RFC 5280) from the access locations named in a certificate's authority information access and CRL distribution points extensions.

Inheritance

  • object
  • CertificateRevocationFetcher

Remarks

OCSP is tried first; CRLs are fetched when no OCSP location returns a status signed by the issuer or its responder. Responses are cached by the instance until their nextUpdate. Only http and https locations are used and, while non-public addresses are refused, connections go directly to the server without a proxy. Non-public addresses are refused unless CertificateRevocationFetcherOptions.AllowPrivateNetworkAddresses is set; on .NET 8 and later every address is checked when the connection is made. Older frameworks check the resolved addresses before each request, send http requests to the checked address and rely on certificate validation to bind https connections to the host name.

Constructors

public CertificateRevocationFetcher(CertificateRevocationFetcherOptions? options = null) #

Creates a fetcher. The options are copied.

Parameters

options OfficeIMO.Security.CertificateRevocationFetcherOptions? = null optional

Methods

public void Dispose() #

Releases the HTTP connection pool and abandons requests still in flight.

public async Task<CertificateRevocationEvidence> FetchAsync(X509Certificate2 certificate, X509Certificate2 issuer, CancellationToken cancellationToken = default) #

Fetches revocation data for certificate, issued by issuer. Returned data is untrusted input; validators check its signature, issuer and freshness themselves.

Parameters

certificate System.Security.Cryptography.X509Certificates.X509Certificate2 required
issuer System.Security.Cryptography.X509Certificates.X509Certificate2 required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<CertificateRevocationEvidence>