curl / Mailing Lists / curl-library / Single Mail

curl-library

libcurl 7.60: CURLUSESSL_ALL set, but still only ftp connection

From: Ivan Pilipenko <ivan.pilipenko_at_matrix-vision.de>
Date: Thu, 28 Jun 2018 15:34:10 +0200 (CEST)

Hello,

I am trying to make our FTP code use FTPS (FTP over TLS) and it doesn't seem to work.
I have used the following curl command line to generate the options needed for an SSL connection:

curl -v -u user:pass --ssl-reqd --libcurl /tmp/output.txt ftp://myserver/testfile.txt

I can see that curl does an AUTH SSL, so it seems to be working. The result of --libcurl was the following options list:

curl_easy_setopt(hnd, CURLOPT_URL, "ftp://myserver/testfile.txt");
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:pass");
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);

If I now set those options in my code, curl still only connects using regular FTP:

* Hostname myserver was found in DNS cache
* Trying 192.168.1.2...
* TCP_NODELAY set
* Connected to myserver (192.168.1.2) port 21 (#3)
< 220 ProFTPD 1.3.5a Server (myserver) [192.168.1.2]
> USER user
< 331 Password required for ftp-rw
> PASS pass
< 230 User ftp-rw logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
...

What am I missing?

-- 
Freundliche Grüße / Best regards
Ivan Pilipenko
---------------------------------------------------------
MATRIX VISION GmbH
Ivan Pilipenko
Entwicklung / Development
Talstrasse 16
D-71570 Oppenweiler
Tel: +49 7191 94 32 430
Fax: +49 7191 94 32 288
e-mail: ivan.pilipenko_at_matrix-vision.de
internet: www.matrix-vision.de
-----------------------------------------------------------------
Upcoming Events:
06.-08. November: VISION, Stuttgart, Germany 
-----------------------------------------------------------------
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Uwe Furtner
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-28