TsgcWebSocketClientProperties › TLSOptions

TLSOptions Property

Configura certificados, versão de TLS, ALPN, IOHandler e outros detalhes de conexão segura usados quando o TLS está habilitado.

Sintaxe

property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;

Valor Padrão

Observações

Acessível somente quando TLS é True. As subpropriedades incluem RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version (de tlsUndefined até tls1_3), ALPNProtocols e IOHandler (iohOpenSSL, iohSChannel, iohAndroidTLS ou iohAppleTLS). No Android, iohAndroidTLS usa o TLS nativo da plataforma (javax.net.ssl.SSLEngine) e no iOS e macOS, iohAppleTLS usa o TLS nativo da Apple, portanto nenhuma biblioteca OpenSSL precisa ser implantada; o TLS nativo da plataforma requer a edição Enterprise. As configurações específicas do OpenSSL ficam em OpenSSL_Options e as configurações específicas do SChannel em SChannel_Options.

Exemplo


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;

Voltar para Propriedades