namespace ZB.MOM.WW.MxGateway.Server.Configuration; /// /// Options controlling the gateway's self-signed certificate auto-generation. /// Only consulted when a Kestrel HTTPS endpoint is configured without its own /// certificate; plaintext deployments never trigger generation. /// public sealed class TlsOptions { /// Path to the persisted self-signed PFX. Reused across restarts. public string SelfSignedCertPath { get; init; } = @"C:\ProgramData\MxGateway\certs\gateway-selfsigned.pfx"; /// Lifetime in years of a freshly generated certificate. public int ValidityYears { get; init; } = 10; /// Extra DNS SANs to embed (e.g. a load-balancer name). public IReadOnlyList AdditionalDnsNames { get; init; } = []; /// Regenerate the persisted certificate when it has expired. public bool RegenerateIfExpired { get; init; } = true; }