I get this error when I try to download a file using TIdHTTP component:
First chance exception at $76D8AAF2. Exception class EIdOSSLUnderlyingCryptoError with message
'Error connecting with SSL.
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'.
Process Project1.exe (3684)
I have Indy version 10.6.2.5341 shipped with Embarcadero Rad Studio 10.1 Berlin.
I'm using IdSSLIOHandlerSocketOpenSSL with those options enabled:
[sslvtlsv1, sslvtlsv1_1, sslvtlsv1_2], but still same error, I also have ssl dlls in my application exe directory (libeay32.dll and ssleay32.dll) version 1.0.2u, got it from this post:
How can we connect with a website? Getting SSL error 1409442E
And this code I use to download a file:
const UnicodeString URL = "https://www.rarlab.com/rar/winrar-x64-60b1.exe";
TMemoryStream *ms = new TMemoryStream();
try
{
IdHTTP1->Get(URL, ms);
ms->SaveToFile("E://winrar.exe");
}
__finally
{
delete ms;
}
Update: I upgraded to Indy version 10.6.2.0 and still have the same SSL problem.
sslvTLSv1_1
/sslvTLSv1_2
yet). You can check the exact version that shipped with Berlin in the IDE, but I know that XE4 shipped with 10.6.0.0, and Indy 10.6.2.0 was released just before XE8, so Berlin must have a newer version. I suggest you upgrade to the latest from Indy's GitHub repo – Samantha[ilink32 Error] Fatal: Unable to open file 'INDYSYSTEM.BPI'
I also added library path to the compiler. – ScholzINDYSYSTEM.BPI
file in Indy 10, Indy's packages have version numbers in their filenames, and that includes the BPI files (yes, I know, that is not a good thing, it is an open issue), so in this caseINDYSYSTEM240.BPI
. – SamanthaINDYSYSTEM.BPI
, you need to fix that. – SamanthaSSLIOHandler
configured incorrectly (please edit your question to show your exact setup), or you are using the wrong OpenSSL DLLs (what do theIdSSLOpenSSL.OpenSSLVersion()
andIdSSLOpenSSLHeaders.IsOpenSSL_TLSv1_(0|1|2)_Available()
functions report?). – SamanthaTIdHTTP
andTIdSSLIOHandlerSocketOpenSSL
objects, what properties you are setting for them, etc. I need to see the ACTUAL SETUP you are using. Also, you didn't answer my earlier question about what theIdSSLOpenSSL(Headers)
utility functions are actually reporting, so I can't even tell if you are using OpenSSL correctly. – Samantha