Delphi : SSL routines:SSL3_GET_RECORD:wrong version number

倾然丶 夕夏残阳落幕 提交于 2021-01-29 21:15:44

问题


I found several topics about the same problem but it didn't help me to resolve my problem.

I'm trying to connect to a FTPS server (with Delphi 10.3) using this code:

IdSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
IdSSLIOHandler.SSLOptions.Method := sslvSSLv3;
IdSSLIOHandler.SSLOptions.SSLVersions := [sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2];
IdFTP.IOHandler := IdSSLIOHandler;
IdFtp.UseTLS := utUseExplicitTLS;
IdFtp.DataPortProtection := ftpdpsPrivate;
IdFtp.Connect();

I put several versions of SSLVersions in the array to be sure to have the good one.

I got this message when TIdFTP tries to connect:

SSL routines:SSL3_GET_RECORD:wrong version number

When I try to connect with FileZilla, it works and the protocol seems to be TLS 1.2.

Do you have any advice?

来源:https://stackoverflow.com/questions/61478573/delphi-ssl-routinesssl3-get-recordwrong-version-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!