TsgcWebSocketClient › Properties › TLSOptions
TLS が有効な場合に使用される証明書、TLS バージョン、ALPN、IOHandler、その他のセキュア接続の詳細を設定します。
property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;
—
TLS が True の場合のみアクセス可能です。サブプロパティには RootCertFile、CertFile、KeyFile、Password、VerifyCertificate、VerifyDepth、Version(tlsUndefined から tls1_3)、ALPNProtocols、IOHandler(iohOpenSSL または iohSChannel)が含まれます。OpenSSL 固有の設定は OpenSSL_Options に、SChannel 固有の設定は SChannel_Options にあります。
oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.TLSOptions.Version := tls1_2;
oClient.TLSOptions.VerifyCertificate := true;
oClient.TLSOptions.RootCertFile := 'cacert.pem';
oClient.Active := true;