Table of Contents

Interface IOcspClient

Namespace
SimpleSign.Core.Revocation
Assembly
SimpleSign.Core.dll

OCSP (Online Certificate Status Protocol) client for certificate revocation checking.

public interface IOcspClient

Methods

CheckEmbeddedOcspResponse(X509Certificate2, X509Certificate2?, byte[], DateTimeOffset?)

Validates an embedded OCSP response against the certificate and issuer.

bool? CheckEmbeddedOcspResponse(X509Certificate2 cert, X509Certificate2? issuerCert, byte[] ocspResponseBytes, DateTimeOffset? signingTime)

Parameters

cert X509Certificate2
issuerCert X509Certificate2
ocspResponseBytes byte[]
signingTime DateTimeOffset?

Returns

bool?

CheckOcspAsync(X509Certificate2, string, CancellationToken)

Checks revocation status via OCSP for a certificate with the given responder URL.

Task<bool> CheckOcspAsync(X509Certificate2 cert, string ocspUrl, CancellationToken ct)

Parameters

cert X509Certificate2
ocspUrl string
ct CancellationToken

Returns

Task<bool>

CheckOcspWithChainAsync(X509Certificate2, IReadOnlyList<X509Certificate2>, string, CancellationToken)

Checks revocation status via OCSP with the full certificate chain.

Task<bool> CheckOcspWithChainAsync(X509Certificate2 cert, IReadOnlyList<X509Certificate2> chain, string ocspUrl, CancellationToken ct)

Parameters

cert X509Certificate2
chain IReadOnlyList<X509Certificate2>
ocspUrl string
ct CancellationToken

Returns

Task<bool>

FetchOcspResponseAsync(X509Certificate2, X509Certificate2?, string, CancellationToken)

Fetches and validates a raw OCSP response for the given certificate.

Task<OcspFetchResult> FetchOcspResponseAsync(X509Certificate2 cert, X509Certificate2? issuerCert, string ocspUrl, CancellationToken ct)

Parameters

cert X509Certificate2
issuerCert X509Certificate2
ocspUrl string
ct CancellationToken

Returns

Task<OcspFetchResult>