TsgcWebSocketServer_HTTPAPIProperties › SSLOptions

SSLOptions Property

Identifies the Windows Certificate Store entry that http.sys binds to the listener when SSL is enabled.

Syntax

property SSLOptions: TsgcWSSSL_Options_HTTPAPI read FSSLOptions write SetSSLOptions;

Default Value

CertStoreName='MY', Hash=''

Remarks

CertStoreName is the name of the Windows Certificate Store that holds the server certificate (default MY which maps to cert:\LocalMachine\My). Hash is the hexadecimal thumbprint of the target certificate and is required by http.sys to locate it — obtain it from PowerShell with dir cert:\localmachine\my. Unlike the Indy-based servers, this property does not use PEM files, OpenSSL versions or verify-certificate flags: TLS negotiation (protocol versions, cipher suites, client-cert requirements) is governed by the Windows Schannel configuration rather than by sgcWebSockets. To change those settings, use Group Policy, the registry or the netsh http add sslcert flags.

Example


oServer := TsgcWebSocketServer_HTTPAPI.Create(nil);
oServer.Host := '127.0.0.1';
oServer.Port := 443;
oServer.SSL := true;
oServer.SSLOptions.CertStoreName := 'MY';
oServer.SSLOptions.Hash := 'CERTIFICATE_HASH';
oServer.Active := true;

Back to Properties