kostenloser Webspace werbefrei: lima-city


Suche auf lima-city

  • in: Zugriff cUrl Ftp mit tls

    geschrieben von mnlogin

    So hab mir jetzt ein eigenes Zertifikat erstellt mit OpenSsl. Mein Vorgehen entspricht dem hier:
    https://thomas-leister.de/internet/eine-eigene-openssl-ca-erstellen-und-zertifikate-ausstellen/

    Das Programm erkennt und verarbeitet auch viel mehr und die Console gibt jeden denkbaren Schritt aus.
    Als Fehlermeldung wird ausgegeben, dass das Ssl-Zertifikat unbekannt ist. (siehe weiter unten).

    Mein Code
    curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,my_fwrite);
    curl_easy_setopt(curl,CURLOPT_WRITEDATA,&ftpfile);
    curl_easy_setopt(curl,CURLOPT_USE_SSL,CURLUSESSL_ALL);
    
    char cCert[]="C:/root/cert.pem";
    curl_easy_setopt(curl,CURLOPT_CAINFO,cCert);
    
    curl_easy_setopt(curl,CURLOPT_FTPSSLAUTH,CURLFTPAUTH_TLS);
    curl_easy_setopt(curl,CURLOPT_SSLVERSION,CURL_SSLVERSION_TLSv1);
    curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,0L);                 // vorläufig false
    
    curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);


    Die Debugmeldung:
    * STATE: INIT => CONNECT handle 0xe2ee30; line 1090 (connection #-5000)
    * Added connection 0. The cache now contains 1 members
    * STATE: CONNECT => WAITRESOLVE handle 0xe2ee30; line 1127 (connection #0)
    *   Trying 212.83.45.133...
    * STATE: WAITRESOLVE => WAITCONNECT handle 0xe2ee30; line 1200 (connection #0)
    * Connected to ftp.lima-city.de (212.83.45.133) port 21 (#0)
    * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0xe2ee30; line 1240 (connection
    #0)
    * FTP 0xe40e60 (line 3207) state change from STOP to WAIT220
    * STATE: SENDPROTOCONNECT => PROTOCONNECT handle 0xe2ee30; line 1254 (connection
     #0)
    < 220-##########################################################################
    
    < 220- FTP-Zugang zum kostenlosen Webspace von www.lima-city.de
    < 220- Halte dich an unsere AGB und Regeln.
    < 220- Lies bei Fragen oder Problemen bitte zuerst in unseren Hilfetexten nach.
    < 220- Weitere Informationen auf http://www.lima-city.de/2008/speicherplatz
    < 220- Tipp: Stelle die maximale Anzahl gleichzeitiger Uebertragungen auf 1.
    < 220-##########################################################################
    
    < 220 Dies ist ein privates System - Keine anonyme Anmeldung m├Âglich.
    > AUTH TLS
    * FTP 0xe40e60 (line 2767) state change from WAIT220 to AUTH
    < 234 AUTH TLS OK.
    * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    * successfully set certificate verify locations:
    *   CAfile: C:/root/cert.pem
      CApath: none
    * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
    * Server certificate:
    *        subject: OU=Domain Control Validated; OU=PositiveSSL; CN=ftp.lima-city.
    de
    *        start date: Feb 25 00:00:00 2015 GMT
    *        expire date: Mar 10 23:59:59 2016 GMT
    *        subjectAltName: ftp.lima-city.de matched
    *        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN
    =COMODO RSA Domain Validation Secure Server CA
    *        SSL certificate verify result: unable to get local issuer certificate (
    20), continuing anyway.
    > USER mnlogin
    * FTP 0xe40e60 (line 846) state change from AUTH to USER
    < 331 Benutzer mnlogin GEFUNDEN. Passwort erforderlich.
    > PASS password
    * FTP 0xe40e60 (line 2640) state change from USER to PASS
    < 230-Ihre Bandbreitenbenutzung ist limitiert.
    < 230 Aktuelles, beschränktes Verzeichnis ist /.
    > PBSZ 0
    * FTP 0xe40e60 (line 2616) state change from PASS to PBSZ
    < 200 PBSZ=0
    > PROT P
    * FTP 0xe40e60 (line 2826) state change from PBSZ to PROT
    < 200 Data protection level set to "private"
    > PWD
    * FTP 0xe40e60 (line 858) state change from PROT to PWD
    < 257 "/" ist das aktuelle Verzeichnis.
    * Entry path is '/'
    * FTP 0xe40e60 (line 2957) state change from PWD to STOP
    * protocol connect phase DONE
    * STATE: PROTOCONNECT => DO handle 0xe2ee30; line 1275 (connection #0)
    * DO phase starts
    > CWD default-website
    * FTP 0xe40e60 (line 952) state change from STOP to CWD
    * ftp_perform ends with SECONDARY: 0
    * STATE: DO => DOING handle 0xe2ee30; line 1324 (connection #0)
    < 250 Aktuelles Verzeichnis ist /default-website.
    > CWD dir
    < 250 Aktuelles Verzeichnis ist /default-website/dir.
    > EPSV
    * FTP 0xe40e60 (line 1381) state change from CWD to PASV
    * Connect data stream passively
    < 229 Extended Passive mode OK (|||34149|)
    *   Trying 212.83.45.133...
    * Connecting to 212.83.45.133 (212.83.45.133) port 34149
    * FTP 0xe40e60 (line 2100) state change from PASV to STOP
    * DO phase is complete2
    * STATE: DOING => DO_MORE handle 0xe2ee30; line 1413 (connection #0)
    * Connected to ftp.lima-city.de (212.83.45.133) port 21 (#0)
    * DO-MORE connected phase starts
    > TYPE I
    * FTP 0xe40e60 (line 3540) state change from STOP to RETR_TYPE
    < 200 TYPE ist jetzt 8-bit binary
    > SIZE file.txt
    * FTP 0xe40e60 (line 1794) state change from RETR_TYPE to RETR_SIZE
    < 213 136
    > RETR file.txt
    * FTP 0xe40e60 (line 2351) state change from RETR_SIZE to RETR
    < 150 Verbindung akzeptiert.
    * Maxdownload = -1
    * Getting file with size: 136
    * Doing the SSL/TLS handshake on the data stream
    * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    * successfully set certificate verify locations:
    *   CAfile: C:/root/cert.pem
      CApath: none
    * SSL re-using session ID
    * Unknown SSL protocol error in connection to ftp.lima-city.de:21
    * Curl_done
    * Closing connection 0
    * The cache now contains 0 members
    * Expire cleared


    Hat jemand vielleicht eine Idee oder einen besseren Weg wie man das lösen kann. Danke.
  • in: Zugriff cUrl Ftp mit tls

    geschrieben von mnlogin

    Hallo webfreclan

    Danke für die Antwort.

    Es war anders gemeint. Ich hab vorher mit dem Support schon geschrieben, und man hat mich ins Forum verwiesen. Ich hab also eine Antwort vom Support erwartet, da die alle Infos haben, die ich vorab schon gegeben habe.

    Es handelt sich hier um eine Ftp-Client Anwendung die ich in C/C++ programmiert habe. Die Zugriffsmöglichkeit auf lima-city können "ohne TLS-Sicherung" problemlos durchgeführt werden. Nun möchte ich natürlich auch "explizit gesichert" auf lima-city zugreifen, sofern es diese Möglichkeit gibt.

    Ich nehm hier einfachhalber das Beispiel von meinem oben erwähnten link.
    char cFtpUrl[]="ftp://mnlogin:password@ftp.lima-city.de/default-website/file.txt";
    curl_easy_setopt(curl,CURLOPT_URL,cFtpUrl);
    curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,my_fwrite);
    curl_easy_setopt(curl,CURLOPT_WRITEDATA,&ftpfile);
    
    //curl_easy_setopt(curl,CURLOPT_USE_SSL,CURLUSESSL_NONE);	// ohne SSL
    curl_easy_setopt(curl,CURLOPT_USE_SSL,CURLUSESSL_ALL);		// mit SSL
    curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);


    Die Debugausgabe: es wird ein CA Cert PEM erwartet.


    Daher auch meine Frage: "Wie kann ich mir ein entsprechendes Zertifikat erstellen und einrichten ? ". Wenn möglich ohne das ich mir was kaufen muss.
  • in: Zugriff cUrl Ftp mit tls

    geschrieben von mnlogin

    Hallo

    Hab mir ein kleines Ftp-Programm geschrieben (cUrl ohne SSL/TLS) das wunderbar funktioniert.

    Nun möchte ich auch die gesicherte Variante ausprobieren. Den Zugriff per FTPES. Dazu nutze ich dieses Beispiel.
    http://curl.haxx.se/libcurl/c/ftpsget.html

    Es wird ein CA Cert (PEM) erwartet, dass ich zum Programm einbinden muss.

    Wie kann ich mir ein entsprechendes Zertifikat einrichten ?

    Vorab schon meinen Dank.


Login zum Webhosting ohne Werbung!