我使用delphi xe6,windows10,openssl 1.0.2u win32,当我连接到许多www时我没有问题,但是当我尝试以https://www.scuderiequirinale.it/进行连接时,我总是遇到错误“套接字错误#10054对等连接重置。”我试图用许多组合来更改SSLOptions.SSLVersions ...但是我随时都有错误...我在类似的错误中搜索但我没有找到解决方案...你有想法吗?
谢谢!
这是代码:
hIOHand.SSLOptions.SSLVersions := [sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2,sslvSSLv23];
hIOHand.SSLOptions.SSLVersions := [sslvTLSv1]; //i will try with all combinations
Web.IOHandler := hIOHand;
Web.OnHeadersAvailable := CheckResponseCharset;
Web.Request.UserAgent := INET_USERAGENT; //Custom user agent string
Web.RedirectMaximum := INET_REDIRECT_MAX; //Maximum redirects
Web.HandleRedirects := INET_REDIRECT_MAX <> 0; //Handle redirects
Web.ReadTimeOut := INET_TIMEOUT_SECS * 1000; //Read timeout msec
Web.ConnectTimeout := INET_TIMEOUT_SECS div 2 * 1000;
try
Sito := Web.Get(FUrl);
Sito := DateToStr(Web.Response.LastModified) + Sito;
except
on e : exception do
Sito := '!!|!!|ERR-: ' +FUrl+#32+e.Message;
end
finally
EndTime := Now;
TStr.Free;
Web.Free;
hIOHand.Free;
end;