TsgcWebSocketServerProperties › SSLOptions

SSLOptions Property

Holds certificate paths, TLS version selection and OpenSSL tuning for the TLS listener.

Syntax

public TsgcWSSSL_Options SSLOptions { get; set; }

Default Value

Version=tlsUndefined, VerifyCertificate=False

Remarks

Supply the certificate material before activating the server when SSL is True: RootCertFile, CertFile and KeyFile point to PEM files (use the same path for all three when the file contains the full chain), and Password is required only if the private key is encrypted. Set VerifyCertificate to True to request and validate client certificates (sub-options FailIfNoCertificate and VerifyClientOnce refine the check) with VerifyDepth controlling chain length. Version picks a specific TLS version (tls1_0, tls1_1, tls1_2, tls1_3) or leaves negotiation open (tlsUndefined). OpenSSL_Options exposes low-level knobs: APIVersion (oslAPI_1_0/oslAPI_1_1/oslAPI_3_0), LibPath/LibPathCustom for locating the OpenSSL binaries, UnixSymLinks, ECDHE, CipherList, CurveList, MinVersion and X509Checks for hostname/IP validation.

Example


oServer = new TsgcWebSocketServer();
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 = TwsSSLVersion.tls1_3;
oServer.SSLOptions.OpenSSL_Options.MinVersion = TwsSSLVersion.tls1_2;
oServer.SSLOptions.Port = 443;
oServer.Active = true;

Back to Properties