TsgcHTTP2Client › Events › OnSSLGetHandler
Fires before the SSL handler is created so a custom handler instance can be supplied.
property OnSSLGetHandler: TsgcTCPOnSSLGetHandler;
// TsgcTCPOnSSLGetHandler = procedure(Sender: TObject; aType: TwsSSLHandler; var aSSLHandler: TIdSSLIOHandlerSocketBase) of object
—
OnSSLGetHandler is raised just before the client builds the TLS IOHandler. Set aSSLHandler to an instance of your own class (inherited from TIdIOHandlerSSLBase) to replace the default handler, for example to wire a specialized OpenSSL or SChannel implementation. Leave aSSLHandler unassigned to let the client create the default handler, in which case OnSSLAfterCreateHandler can still be used to tweak properties after creation. The component takes ownership of the handler assigned here.
procedure OnSSLGetHandler(Sender: TObject; aType: TwsSSLHandler;
var aSSLHandler: TIdSSLIOHandlerSocketBase);
begin
aSSLHandler := TCustomSSLHandler.Create(nil);
// ... configure handler properties
end;