Forum > Networking and Web Programming

Indy 10: TCP/HTTPS downloads management OnWork

<< < (2/2)

Remy Lebeau:

--- Quote from: torbente on January 11, 2022, 10:20:21 pm ---Error downloading last release: Error connecting with SSL.
error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version

--- End quote ---

By default, Indy enables TLS 1.0 only (see this ticket). Chances are, the site you are accessing wants TLS 1.1+ instead.


--- Quote from: torbente on January 11, 2022, 10:20:21 pm ---Well, im implemented this...


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---IdSSLIOHandler:= TIdSSLIOHandlerSocketOpenSSL.Create;...Form1.IdHTTPUpdate.IOHandler:=IdSSLIOHandler;
--- End quote ---

That is fine (just be sure to call IdSSLIOHandler.Free() when you are done using it, since you are not assigning an Owner to it).

Are you setting the IdSSLIOHandler.SSLOptions.SSLVersions property?  By default, it is set to [sslvTLSv1], try adding [sslvTLSv1_1,sslvTLSv1_2] to it, eg:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---IdSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(Form1.IdHTTPUpdate); IdSSLIOHandler.SSLOptions.SSLVersions := [sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2];// or: ...SSLVersions := [sslvTLSv1..sslvTLSv1_2]; // or: ...SSLVersions := ...SSLVersions + [sslvTLSv1_1,sslvTLSv1_2];// or: ...SSLVersions := ...SSLVersions + [sslvTLSv1_1..sslvTLSv1_2]; // or:// ...SSLVersions := [sslvSSLv23]; // enable all supported versions, then...// ...SSLVersions := ...SSLVersions - [sslvSSLv2,sslvSSLv3]; // remove unwanted versions // or:// ...Method := sslvSSLv23; // enable all supported versions, then...// ...SSLVersions := ...SSLVersions - [sslvSSLv2,sslvSSLv3]; // remove unwanted versions ...

--- Quote from: torbente on January 11, 2022, 10:20:21 pm ---Yes, ssleay32.dll and libeay32.dll, version 1.0.2

--- End quote ---

That should be fine then.

torbente:

--- Quote ---That is fine (just be sure to call IdSSLIOHandler.Free() when you are done using it, since you are not assigning an Owner to it).
--- End quote ---

Yep. I check all the create calls in the code to verify that all are appropiately freed  :)



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---IdSSLIOHandler.SSLOptions.SSLVersions := [sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2];
Worked perfectly! I did was now aware of the TLS thing.
Thanks a lot.

Navigation

[0] Message Index

[*] Previous page

Go to full version