Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi FTP SSL File Download (https://www.delphipraxis.net/147510-ftp-ssl-file-download.html)

Ruewue 10. Feb 2010 07:56


FTP SSL File Download
 
Hallo zusammen,

ich habe da ein sehr spezielles Problem. Ich habe eine bestehende FTP Virbindung auf SSL umgestellt. Soweit auch kein Problem. Mit dieser Verbindung werden Files zu einem Server hochgeladen und auch welche runter geladen. Das Hochladen klappt ohne Probleme, jedoch beim Download holt er das erste File und bricht dann ab. Er führt den DELETE Befehl nicht mehr aus. Stelle ich die Verbindung wieder auf normal, also ohne SSL, dann klappt auch der Dwonload wieder. Kann mir jemand sagen, ob für SSL beim Download noch gesonnderte Einstellungen zu machen sind?

Delphi-Quellcode:
   
//--- Jetzt die SSL/TLS Setings --------------------------------------------------------------------------
    FIdSSLHandler.Port                           := 990;
    FIdSSLHandler.PassThrough                  := false;      // SSL würde übergangen werden bei True
    FIdSSLHandler.ReadTimeout                  := -1;
    FIdFTPClient.IOHandler                     := FIdSSLHandler;
    FIdFTPClient.UseTLS                           := utUseImplicitTLS;
    FIdFTPCLient.AUTHCmd                        := tAuto;
    FIdFTPClient.DataPortProtection         := ftpdpsPrivate;

    //--- nun connecten --------------------------------------------------------------------------------------
    FIdFTPClient.Connect;
Delphi-Quellcode:
      slList := TStringList.Create;

      slList.Clear;
      FIdFTPClient.List(slList, '*.csv', false);
      for nCount := 0 to slList.Count - 1 do begin
        FIdFTPClient.Get(slList[nCount], gsPathIn + slLIst[nCount], false);
        FIdFTPClient.Delete(slList[nCount]);
        SendInfo('Die Datei ' +  slList[nCount] + ' wurde runtergeladen und gelöscht!');
      end;
Danke schon mal im Voraus!

(Meine erste SSL Verbindung)

Ruewue 10. Feb 2010 08:47

Re: FTP SSL File Download
 
Hallo,

ich habe das Problem selbst gelöst. Habe die OPTIONS Einstellungen ins Programm übernommen und schon gehts.

Delphi-Quellcode:

    FIdSSLHandler.SSLOptions.CertFile         := 'Certificate.crt';
    FIdSSLHandler.SSLOptions.Method            := sslvSSLv23;
    FIdSSLHandler.SSLOptions.Mode               := sslmClient;
    FIdSSLHandler.SSLOptions.VerifyDepth   := 2;
    FIdSSLHandler.SSLOptions.VerifyMode  := [];
Sind halt Anfängerfehler. Die Einstellungen hatte ich auch im TIdSSLIOHandlerSocketOpenSSL vorgenommen, doch scheins ohne Wirkung.

DANKE an Alle die sich den Kopf noch zerbrechen!


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz