cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Paul J. Lucas <paul_at_lucasmail.org>
Date: Wed, 8 Jan 2014 09:42:45 -0800

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
Received on 2014-01-08