TIdHttpServer call from TIdHttp SSL

Giganews Newsgroups
Subject: TIdHttpServer call from TIdHttp SSL
Posted by:  James (james.bo…@007.com)
Date: Mon, 31 Dec 2007

A call to an TIdHttpServer with default IOHandler from a TIdHttp with SSL
IOHandler never returns.

The client waits forever on line 1902 of IdSSLOpenSS in
procedure TIdSSLSocket.Connect(const pHandle: TIdStackSocketHandle)

error := IdSslConnect(fSSL);

which is looping through SslLockingCallback.

The server thread waits forever on on a line 1084 in IdIOHandler in
function TIdIOHandler.ReadLn(ATerminator: string; ATimeout: Integer =
  AMaxLineLength: Integer = -1; const AEncoding: TIdEncoding = en7Bit):

FReadLnTimedOut := ReadFromSource(True, ATimeout, False) = -1;

Note that the http server is non-SSL, but the client is trying to connect
via SSL.

BTW, FF or IE do not hang when trying to connect to the Indy server via SSL.
Furthermore, TIdHttp behaves fine (IdSslConnect returns an error) when
trying to connect via SSL to IIS, e.g.

Any ideas on how to fix the problem? Thanks.