Add HistorianClientOptions.AllowUntrustedServerCertificate
When true, the SDK's WCF channel factories accept the server's X.509 certificate without chain validation. Intended for connecting to development / on-prem Historians whose /HistCert endpoint presents an installer-generated self-signed cert that isn't in the local trust store. Particularly relevant on Linux: .NET WCF on Linux does its own X509Chain validation that doesn't honor the system CA bundle, so even after `update-ca-certificates` succeeds the cert binding still rejects the server. With this option set, custom certificate validator accepts any cert and revocation checking is disabled. Default false. Centralized in HistorianWcfClientCredentialsHelper.Configure and applied at every ChannelFactory<T> instantiation in the WCF layer (no-op when the option is false). 171/171 Windows tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,4 +27,15 @@ public sealed class HistorianClientOptions
|
||||
public HistorianTransport Transport { get; init; } = HistorianTransport.LocalPipe;
|
||||
|
||||
public string TargetSpn { get; init; } = @"NT SERVICE\aahClientAccessPoint";
|
||||
|
||||
/// <summary>
|
||||
/// When true, the WCF channel factories used by the SDK accept the server's
|
||||
/// X.509 certificate without chain validation. Useful when connecting to a
|
||||
/// development / on-prem Historian whose <c>/HistCert</c> endpoint presents an
|
||||
/// installer-generated self-signed cert that isn't in the local trust store
|
||||
/// (notably .NET WCF on Linux ignores the system CA bundle for its own
|
||||
/// X509Chain checks). Default false; do not enable in production where the
|
||||
/// server's identity matters.
|
||||
/// </summary>
|
||||
public bool AllowUntrustedServerCertificate { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user