Skip to content

IRecipientCertificates

Interface in Oadm.Sdk.Certificates · Oadm.Sdk.dll

The certificates recipients can use (SDK 0.12.0), offered by PKI through IPluginServices. By convention only the host reads it: a plugin gets its certificates in RecipientSessionRequest. Nothing enforces that: any core plugin in the process can find this service, private keys included.

public interface IRecipientCertificates
Task<IReadOnlyList<ActionChoice>> ClientCertificatesAsync(CancellationToken ct)

Certificates with a key OADM holds that have not ended; the value is the id a field stores.

Task<IReadOnlyList<X509Certificate2>?> LoadAsync(string id, bool withKey, CancellationToken ct)

The certificate, then its issuers; null when it is gone. withKey true: with its private key when OADM holds one (a client certificate). False: never with a key (a trusted certificate). The caller disposes them.

Task<IReadOnlyList<ActionChoice>> TrustedCertificatesAsync(CancellationToken ct)

The CAs and the imported certificates a server can be checked against.