namespace ZB.MOM.WW.LmxProxy.Client;

/// <summary>
/// TLS configuration for the LmxProxy gRPC client.
/// </summary>
public class ClientTlsConfiguration
{
    /// <summary>Whether to use TLS for the gRPC connection.</summary>
    public bool UseTls { get; set; } = false;

    /// <summary>Path to the client certificate PEM file for mTLS.</summary>
    public string? ClientCertificatePath { get; set; }

    /// <summary>Path to the client private key PEM file for mTLS.</summary>
    public string? ClientKeyPath { get; set; }

    /// <summary>Path to the server CA certificate PEM file for custom trust.</summary>
    public string? ServerCaCertificatePath { get; set; }

    /// <summary>Override the server name used for TLS verification.</summary>
    public string? ServerNameOverride { get; set; }

    /// <summary>Whether to validate the server certificate.</summary>
    public bool ValidateServerCertificate { get; set; } = true;

    /// <summary>Whether to allow self-signed certificates.</summary>
    public bool AllowSelfSignedCertificates { get; set; } = false;

    /// <summary>Whether to ignore all certificate errors (dangerous).</summary>
    public bool IgnoreAllCertificateErrors { get; set; } = false;
}
