I am writing an application in C ++ Builder XE8 , I use the Indy TCPServer and TCPClient components , since the transmission medium will be dangerous, then encryption is needed, I chose the TLS 1.2 protocol and placed the TIdServerIOHandlerSSLOpenSSL and TIdSSLIOHandlerSocketOpenSSL on the server and client, respectively. Installed certificates:

 IOHandler1->SSLOptions->RootCertFile = "C:\\root.pem"; IOHandler1->SSLOptions->CertFile = "C:\\server.pem"; IOHandler1->SSLOptions->KeyFile = "C:\\server.key"; IOHandler1->SSLOptions->DHParamsFile = "C:\\dh1024.pem"; TCPServer1->Active = true; Mode = sslmUnassigned 

For the client, similarly with their certificates. With CipherList played, set the parameters for TLS 1.2 with the key DH , DH-RSA-AES128-SHA256 . The client does not connect to any. The firewall is disabled and works without encryption. After a long hang, the client issues Socket Error # 2 Windows 10 Pro 64 Bit, the application is written under windows 64bit.

  • and dll files copied with the project? what would ssl work dll ki should also match - Saidolim
  • ssleay32.lib and libeay32.lib? No, but do you need to connect them? or just throw in the folder with the project? - Aslan
  • Yes, these are the easiest to throw in the folder with the exe file. there seems 3 dll ki were. - Saidolim
  • does not help yet. Libraries took with Openssl installed on this system - Aslan

1 answer 1

 void __fastcall TForm1::Server1Connect(TIdContext *AContext) { if(AContext->Connection->IOHandler->InheritsFrom(__classid(TIdSSLIOHandlerSocketBase))) { ((TIdSSLIOHandlerSocketBase *)AContext->Connection->IOHandler)->PassThrough = false; } } 

Here is the answer