问题
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