TsgcWebSocketHTTPServerProperties › SSLOptions

SSLOptions 属性

保存 TLS 监听器的证书路径、TLS 版本选择和 OpenSSL 调整选项。

语法

property SSLOptions: TsgcWSSSL_Options read FSSLOptions write SetSSLOptions;

默认值

Version=tlsUndefinedVerifyCertificate=False

备注

在激活服务器之前,当 SSLTrue 时提供证书材料:RootCertFileCertFileKeyFile 指向 PEM 文件(当文件包含完整链时,所有三个使用相同路径),且仅在私钥加密时需要 Password。将 VerifyCertificate 设置为 True 以请求和验证客户端证书(子选项 FailIfNoCertificateVerifyClientOnce 细化检查),VerifyDepth 控制链长度。Version 选择特定的 TLS 版本(tls1_0tls1_1tls1_2tls1_3)或保持协商开放(tlsUndefined)。OpenSSL_Options 公开低级选项:APIVersionoslAPI_1_0/oslAPI_1_1/oslAPI_3_0)、用于定位 OpenSSL 二进制文件的 LibPath/LibPathCustomUnixSymLinksECDHECipherListCurveListMinVersion 以及用于主机名/IP 验证的 X509Checks

示例


oServer := TsgcWebSocketHTTPServer.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;

返回属性