Table of Contents

Class TlsServerCertificateLoadResult

Namespace
MailFathom.Infrastructure.Certificates
Assembly
MailFathom.Infrastructure.dll

The outcome of turning configured material into the TLS identity an endpoint presents.

public sealed record TlsServerCertificateLoadResult : IDisposable, IEquatable<TlsServerCertificateLoadResult>
Inheritance
TlsServerCertificateLoadResult
Implements
Inherited Members

Remarks

Material an endpoint cannot serve with is an expected configuration failure with a named cause rather than an exceptional state, so loading returns this instead of throwing and startup reports every unusable endpoint of a deployment at once. A failed result carries no certificate and no material, which is what keeps it safe to include in an operator message.

Properties

Certificate

Gets the loaded identity, owned by the caller, or null when loading failed.

Failure

Gets why no identity was produced, or null when loading succeeded.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Failed(CertificateMaterialFailure)

Creates a failed result.

Loaded(TlsServerCertificate)

Creates a successful result that hands ownership of the identity to the caller.