Here's my program:
Application.FTP.Host:= vHost;
Application.FTP.Port:= vPort;
try
Application.FTP.AutoLogin := false;
Application.FTP.Connect;
Application.FTP.IOHandler.RecvBufferSize := 2048;
I'm using TIdFTP
component in Delphi XE3.
I think I have to use something like this...
Application.FTP.UseTLS := utUseRequireTLS;
but the compiler doesn't like that line
How can I get my FTP application to use FTPS ?
First, do you need SFTP (FTP over SSH) or FTPS (FTP over SSL)? They are not the same thing. Indy does not support SSH at this time. For SSL, you can attach an SSL IOHandler, such as TIdSSLIOHandlerSocketOpenSSL
, to the TIdFTP.IOHandler
property and then set the TIdFTP.UseTLS
property to anything other than utNoTLSSupport
(yes, TIdFTP
does have a UseTLS
property). If you need to encrypt the actual file transfer connections, not just the command connection, then set the TIdFTP.DataPortProtection
property to ftpdpsPrivate
.
With Indy10 you can add an TIdSSLIOHandlerSocketOpenSSL component and set FTP.IOHandler to point to this component.
And then in TIdSSLIOHandlerSocketOpenSSL you set your SSL options.
Ex.
ftpC.IOHandler:=iohFTPSE; //TIdSSLIOHandlerSocketOpenSSL
ftpC.UseTLS:=utUseExplicitTLS;
ftpC.DataPortProtection:=ftpdpsPrivate;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With