When I change function like next, I see non-encrypted http GET request on 443 port by TCP protocol. I think it is not correct, as browser uses TLS protocol over TCP protocol. Browser makes Client Hello. Synapse does not. I think that synapse has absolutely wrong interpretation of standard.
function THTTPSend.InternalDoConnect(needssl: Boolean): Boolean;
begin
Result := False;
FSock.CloseSocket;
FSock.Bind(FIPInterface, cAnyPort);
if FSock.LastError <> 0 then
Exit;
FSock.Connect(FTargetHost, FTargetPort);
if FSock.LastError <> 0 then
Exit;
if needssl then
begin
if (FSock.SSL.SNIHost='') then
FSock.SSL.SNIHost:=FTargetHost;
sleep(1);// marker for debugging in OllyDBG
FSock.SSLDoConnect;
sleep(2);
FSock.SSL.SNIHost:=''; //don't need it anymore and don't wan't to reuse it in next connection
{if FSock.LastError <> 0 then
Exit; }
end;
FAliveHost := FTargetHost;
FAlivePort := FTargetPort;
Result := True;
end;