cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl command for ssl won't connect

From: Flores,Miguel,NORTH YORK,LGO Business Connections <Miguel.Flores_at_ca.nestle.com>
Date: Wed, 8 Jan 2014 19:31:18 +0000

I use the command below:



curl -3 -v --cacert /home/adm/ssl/certs/cert.pem --disable-epsv --ftp-skip-pasv-ip --ftp-ssl -T "/adm/FILE.TXT" ftp://User:Password@URL:990



Results:



* About to connect() to Ftpsec.mei-tpm.com port 990 (#0)

* Trying 174.143.89.74...

  % Total % Received % Xferd Average Speed Time Time Time Current

                                 Dload Upload Total Spent Left Speed

  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connected

* Connected to Ftpsec.mei-tpm.com (174.143.89.74) port 990 (#0)

  0 0 0 0 0 0 0 0 --:--:-- 0:00:30 --:--:-- 0* response reading failed

* Closing connection #0

curl: (56) response reading failed



Any ideas?



Thanks,



Miguel



-----Original Message-----

From: curl-users [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Paul J. Lucas

Sent: January-08-14 12:43 PM

To: curl-users_at_cool.haxx.se<mailto:curl-users_at_cool.haxx.se>

Subject: curl with ftp URL works for SSL, but ftps URL doesn't: unknown protocol



I compiled and installed ProFTPD on my Mac for testing purposes and generated self-signed SSL certificates because I want to test ftps.



When I do:



    curl --ftp-ssl-reqd --insecure ftp://localhost/hello.txt



it works. I know it actually doing SSL because the tls.log contains:



    Jan 08 07:20:32 mod_tls/2.4.3[81549]: SSL/TLS-P requested, starting TLS handshake

    Jan 08 07:20:32 mod_tls/2.4.3[81549]: client supports secure renegotiations

    Jan 08 07:20:32 mod_tls/2.4.3[81549]: TLSv1/SSLv3 connection accepted, using cipher AES128-SHA (128 bits)

    Jan 08 15:20:32 mod_tls/2.4.3[81549]: Protection set to Private

    Jan 08 15:20:32 mod_tls/2.4.3[81549]: starting TLS negotiation on data connection

    Jan 08 15:20:37 mod_tls/2.4.3[81549]: TLSv1/SSLv3 renegotiation accepted, using cipher AES128-SHA (128 bits)

    Jan 08 15:20:37 mod_tls/2.4.3[81549]: TLSv1/SSLv3 data connection accepted, using cipher AES128-SHA (128 bits)



However, when I instead do:



    curl --insecure ftps://localhost:21/hello.txt



i.e., use ftps as the URL scheme rather than ftp I get:



    curl: (35) Unknown SSL protocol error in connection to localhost:-9800



Why doesn't an ftps URL work? (Explicitly using --ftp-ssl-reqd makes no difference.) Is it a ProFTPD server misconfiguration? An incorrect curl command-line?



BTW: when I do curl -V, I get:



    curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5

    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp

    Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz



and ftps is listed as a supported protocol.



(I'd like to get this to work using curl specifically because I'm writing my own ftp client using libcurl; hence I'm testing using command-line curl first.)



- Paul





-------------------------------------------------------------------

List admin: http://cool.haxx.se/list/listinfo/curl-users

FAQ: http://curl.haxx.se/docs/faq.html

Etiquette: http://curl.haxx.se/mail/etiquette.html



________________________________

This email may contain confidential and/or privileged information. If you are not the intended recipient (or have received this email in error) please notify the sender immediately and destroy this email. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden.

________________________________

Ce courriel pourrait contenir des renseignements confidentiels ou protégés. Si vous n'êtes pas le destinataire prévu (ou si vous avez reçu ce courriel par erreur), veuillez en informer l'expéditeur sans tarder et détruire ce courriel. Toute reproduction, divulgation ou diffusion non autorisées de la documentation comprise dans ce courriel est strictement interdite.



-------------------------------------------------------------------

List admin: http://cool.haxx.se/list/listinfo/curl-users

FAQ: http://curl.haxx.se/docs/faq.html

Etiquette: http://curl.haxx.se/mail/etiquette.html

________________________________
This email may contain confidential and/or privileged information. If you are not the intended recipient (or have received this email in error) please notify the sender immediately and destroy this email. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden.
________________________________
Ce courriel pourrait contenir des renseignements confidentiels ou protégés. Si vous n'êtes pas le destinataire prévu (ou si vous avez reçu ce courriel par erreur), veuillez en informer l'expéditeur sans tarder et détruire ce courriel. Toute reproduction, divulgation ou diffusion non autorisées de la documentation comprise dans ce courriel est strictement interdite.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-08