procedure TForm1.SSLconnect;
//var
// FIdFTPClient: TIdFTP;
// FIdSSLHandler: TIdSSLIOHandlerSocketOpenSSL;
begin
try
FIdFTPClient.Host:=ed_ip.text;
FIdFTPClient.Port:=strtointdef(ed_port.text,21);
FIdFTPClient.Username:=ed_user.text;
FIdFTPClient.Password:=ed_pw.text;
if cb_ssl.Checked
then
begin
FIdFTPClient.IOHandler:=FIdSSLHandler;
FIdSSLHandler.SSLOptions.CertFile:='
Z:\Delphi\ftp ssl\ssl.cer';
FIdSSLHandler.SSLOptions.Method:=sslvSSLv23;
FIdSSLHandler.SSLOptions.Mode:=sslmClient;
FIdSSLHandler.SSLOptions.VerifyMode := [sslvrfPeer];
FIdSSLHandler.PassThrough := False;
FIdSSLHandler.OnVerifyPeer := MeinSSLZertifikatChecker;
FIdSSLHandler.Destination:=FIdFTPClient.Host;
FIdSSLHandler.host:=FIdFTPClient.Host;
FIdFTPClient.IOHandler := FIdSSLHandler;
FIdFTPClient.UseTLS := utUseExplicitTLS;
FIdFTPClient.AUTHCmd := tAuto;
FIdFTPClient.DataPortProtection:=ftpdpsPrivate;
FIdFTPClient.UseTLS:=utUseImplicitTLS;
FIDFTPClient.ReadTimeout:=15000;
FIDFTPClient.Passive:=true;
FIdFTPClient.DataPortProtection:=ftpdpsPrivate;
FIdFTPClient.UseTLS:=utUseExplicitTLS;
end
else
begin
FIdFTPClient.UseTLS := utNoTLSSupport;
FIdFTPClient.DataPortProtection := ftpdpsClear;
end;
FIdFTPClient.Connect;
finally
end;
end;
procedure TForm1.list;
begin
FTP.List(slList,'
',false);
// Hier is der Fehler
//usw.
end;