TsgcWebSocketHTTPServer › Properties › SSLOptions
TLSリスナーの証明書パス、TLSバージョン選択、およびOpenSSLチューニングを保持します。
property SSLOptions: TsgcWSSSL_Options read FSSLOptions write SetSSLOptions;
Version=tlsUndefined、VerifyCertificate=False
SSL が True の場合、サーバーをアクティブにする前に証明書マテリアルを提供してください: RootCertFile、CertFile、KeyFile は PEM ファイルを指します(ファイルにフルチェーンが含まれている場合は 3 つすべてに同じパスを使用)。Password は秘密鍵が暗号化されている場合のみ必要です。VerifyCertificate を True に設定してクライアント証明書のリクエストと検証を行います(サブオプション FailIfNoCertificate と VerifyClientOnce でチェックを調整)。VerifyDepth でチェーンの長さを制御します。Version で特定の TLS バージョン(tls1_0、tls1_1、tls1_2、tls1_3)を選択するか、ネゴシエーションをオープンのままにします(tlsUndefined)。OpenSSL_Options は低レベルのノブを公開します: APIVersion(oslAPI_1_0/oslAPI_1_1/oslAPI_3_0)、OpenSSL バイナリを見つけるための LibPath/LibPathCustom、UnixSymLinks、ECDHE、CipherList、CurveList、ホスト名/IP 検証のための MinVersion、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;