Closed Serraniel closed 3 years ago
The error message indicates there is a version mismatch in the TLS handshake. I have no way of diagnosing the root problem given the limited information so far. I suggest you use Wireshark to look for any problems in the TLS handshake. Even though you are requesting TLS 1.2 in your code, it is possible that maybe Indy/OpenSSL is falling back to TLS 1.1 or even 1.0 instead. Which version of the OpenSSL DLLs are you trying to use? Does the IsOpenSSL_TLSv1_2_Available()
function in the IdSSLOpenSSLHeaders
unit return true or false after the error occurs?
A colleague just sent me this: https://quality.embarcadero.com/browse/RSP-29900
I tried it and it seems to be the solution.
The reason of this trouble is the PassThrough property of the TIdSSLIOHandlerSocketOpenSSL: In Delphi 10.3.3 is by default false but in Delphi 10.4 it is by default true. Having this property with a true value, the TIdSSLIOHandlerSocketOpenSSL does not handle the encrypted connection and no encrypted connection is created, resulting in disconnection from the server.
So just setting it to false
on the client IO Handler was the fix. Sorry for the inconvenience.
Hi,
with the Indy version of Delphi 10.4 we are having issues using TLS for a TCP server / client system. I have a testtool which works perfectly when compiled with Delphi 10.3. With 10.4 we are getting an error, if the clients wants to connect:
The code of the server app is
For the client it looks like this:
The SSL IO handler is set via DFM to the server/client.
What I have found out so far: There is no exception and apps can communicate, if I do not set the
Passthrough
tofalse
in the connect event in the server. But if thePassthrough
property is not set tofalse
, the tcp connection is not secured and I can read sent messages in Wireshark in plain text.Do you have any idea about changes which may cause that behaviour? Anything I could do to provide more information about the issue?