首页 > 代码库 > indy Sftp 编程 ftp安全访问

indy Sftp 编程 ftp安全访问

var
  IdFTP: TIdFTP;
  IdSSLIOHandlerSocketOpenSSL: TIdSSLIOHandlerSocketOpenSSL;
begin
  IdFTP := TIdFTP.Create(Nil);
  try
    IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
    try
      IdFTP.IOHandler := IdSSLIOHandlerSocketOpenSSL;
      IdFTP.UseTLS := utUseRequireTLS;

      ...

    finally
      IdSSLIOHandlerSocketOpenSSL.Free;
    end;
  finally
    IdFTP.Free;
  end;
end;

indy Sftp 编程 ftp安全访问