Table of Contents

Method Create

Namespace
MailFathom.Infrastructure.Security.ClientCertificates
Assembly
MailFathom.Infrastructure.dll

Create(string, McpClientCertificateRequirement, IEnumerable<ConfiguredSecret>, IEnumerable<string>)

Creates a profile from settings that have already been validated.

public static McpClientCertificateTrustProfile Create(string name, McpClientCertificateRequirement requirement, IEnumerable<ConfiguredSecret> trustAnchors, IEnumerable<string> expectedDnsNames)

Parameters

name string

The operator-chosen name of the client this profile identifies.

requirement McpClientCertificateRequirement

Whether a request presenting no certificate is refused.

trustAnchors IEnumerable<ConfiguredSecret>

The configured certificate authorities, at least one.

expectedDnsNames IEnumerable<string>

The subject alternative names expected of a presented certificate, at least one.

Returns

McpClientCertificateTrustProfile

The profile.

Exceptions

ArgumentNullException

Thrown when trustAnchors or expectedDnsNames is null.

ArgumentException

Thrown when a value would leave the profile unable to identify a client, which means it was mapped before it was validated.