TsgcWebSocketClient › Właściwości › TLSOptions
Konfiguruje certyfikaty, wersję TLS, ALPN, IOHandler i inne szczegóły bezpiecznego połączenia używane gdy TLS jest włączony.
property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;
—
Dostępne wyłącznie gdy właściwość TLS ma wartość True. Podwłaściwości obejmują: RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version (od tlsUndefined do tls1_3), ALPNProtocols oraz IOHandler (iohOpenSSL lub iohSChannel). Ustawienia specyficzne dla OpenSSL znajdują się w OpenSSL_Options, a dla SChannel w 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;