Search code examples
delphisslindyindy10

Which Indy TIdHTTPServer code ir responsible for server side checking of SSL versions and ciphers?


I am using Indy 10.6.2 (current version from SVN) server components in Delphi 2007 and client components in Delphi 6 application, and of course OpenSSL.

I am receiving "Error connecting with SSL. EOF was observed that violates the protocol" in the client application.

As far as I have found on the web, this arises from the server socket closing its connection, e.g., due to mismatch of SSL versions or ciphers between HTTP client and server. It sounds quite logical.

I would like to debug (introduce more reporting in the server side about this mismatch), but where is the code located in the Indy libraries (System, Core, Protocols) that checks and closes the server connection (that rejects client request) when any incompatibilities are observed?

The answer to my question can solve "Error connecting with SSL. EOF was observed that violates the protocol", but it can also help in the future to resolve any problems during handshake, i.e., if I implement more extensive logging about rejected connections.


Solution

  • where is the code located in the Indy libraries (System, Core, Protocols) that checks and closes the server connection (that rejects client request) when any incompatibilities are observed?

    Nowhere, because it is not Indy that is doing the checks. It is OpenSSL itself doing the checks internally while it is handling the SSL handshake. OpenSSL has the socket handle. When it detects a problem with the handshake, it closes the socket connection immediately and returns an error to Indy, which then closes the socket handle.