Method LoadAsync
- Namespace
- MailFathom.Infrastructure.Certificates
- Assembly
- MailFathom.Infrastructure.dll
LoadAsync(ConfiguredSecret?, CancellationToken)
Loads the certificate behind a configured secret block.
public Task<TrustAnchorLoadResult> LoadAsync(ConfiguredSecret? configuredMaterial, CancellationToken cancellationToken)
Parameters
configuredMaterialConfiguredSecretThe block referencing the anchor material, whose nested password block protects a PKCS#12 bundle when one is used.
cancellationTokenCancellationTokenCancels the retrieval and the bundle password retrieval.
Returns
- Task<TrustAnchorLoadResult>
The loaded anchor, whose ownership passes to the caller, or a named failure.
Remarks
The material is erased before this returns, whether loading succeeded or not, so the anchor outlives the bytes it was parsed from. The returned certificate is public material and may be logged by subject and thumbprint.