TsgcWebSocketLoadBalancerServerProperties › SSLOptions

SSLOptions 属性

保存负载均衡器 TLS 侦听器的证书路径、TLS 版本选择和 OpenSSL 调优参数。

语法

property SSLOptions: TsgcWSSSL_Options read FSSLOptions write SetSSLOptions;

默认值

Version=tlsUndefinedVerifyCertificate=False

备注

在激活负载均衡器且 SSLTrue 之前提供证书材料:RootCertFileCertFileKeyFile 指向 PEM 文件(当文件包含完整证书链时,三者使用相同路径),仅当私钥已加密时才需要 Password。将 VerifyCertificate 设为 True 可请求并验证客户端证书(子选项 FailIfNoCertificateVerifyClientOnce 细化检查方式),VerifyDepth 控制证书链长度;当注册的后端必须提供客户端证书以进行双向 TLS 认证时,此功能非常有用。Version 选择特定的 TLS 版本(tls1_0tls1_1tls1_2tls1_3)或保持协商开放(tlsUndefined)。OpenSSL_Options 公开底层旋钮:APIVersionoslAPI_1_0/oslAPI_1_1/oslAPI_3_0)、LibPath/LibPathCustomUnixSymLinksECDHECipherListCurveListMinVersionX509Checks

示例


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.SSL := true;
oServer.SSLOptions.CertFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.KeyFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.RootCertFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.Version := tls1_3;
oServer.SSLOptions.OpenSSL_Options.MinVersion := tls1_2;
oServer.SSLOptions.Port := 443;
oServer.Active := true;

返回属性