TsgcWebSocketLoadBalancerServer › プロパティ › 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 はチェーンの長さを制御します。これは登録するバックエンドが相互 TLS のクライアント証明書を提示する必要がある場合に便利です。Version は特定の TLS バージョン(tls1_0、tls1_1、tls1_2、tls1_3)を選択するか、ネゴシエーションをオープンのままにします(tlsUndefined)。OpenSSL_Options は低レベルのノブを公開します: APIVersion(oslAPI_1_0/oslAPI_1_1/oslAPI_3_0)、LibPath/LibPathCustom、UnixSymLinks、ECDHE、CipherList、CurveList、MinVersion、X509Checks。
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;