curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl 7.60: CURLUSESSL_ALL set, but still only ftp connection

From: Ivan Pilipenko <ivan.pilipenko_at_matrix-vision.de>
Date: Thu, 5 Jul 2018 17:16:47 +0200 (CEST)

> Daniel Stenberg <daniel_at_haxx.se> hat am 28. Juni 2018 um 15:58 geschrieben:
>
>
> On Thu, 28 Jun 2018, Ivan Pilipenko wrote:
>
> > I have used the following curl command line to generate the options needed
> > for an SSL connection:
> >
> > I can see that curl does an AUTH SSL, so it seems to be working. The result
> > of --libcurl was the following options list:
>
> So it works with the command line tool but not with libcurl? Are you 100% sure
> they are using the same libcurl? Is there any chance your libcurl test runs
> with libcurl without TLS support? (Your code doesn't show you checking the
> curl_easy_setopt() return values.)
>
> Otherwise I suggest setting a break-point at lib/ftp.c:2651 and single-step a
> few steps from there to figure out what's wrong!
>
> --
>
> / daniel.haxx.se

Turns out the answer is really simple: There are some options being set in the
constructor of our FTP class, which inherits basic curl functionality from
a base class. I've added the options generated by --libcurl to the constructor
alongside other options, and they were being set correctly, yet no SSL was used.

Looks like the base class calls curl_easy_reset() before each transfer, obviously
resetting any option that was set in the constructor, including CURLOPT_USE_SSL...

Thank you for the hints.

-- 
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-07-05