cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_setopt fails setting CURLOPT_SSL_CTX_FUNCTION

From: Tom Goetze via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 8 Apr 2016 20:16:16 +0000 (UTC)

Thanks for the feedback Dan.
gdb showed CURLE_FAILED_INIT as the return value (numerical value was 2) from the curl_easy_setoptDuring the curl_easy_perform() with a breakpoint in the callback never hit the breakpoint, so the failure during setup was accurate.rpm says I have curl-7.19.7-40.el6_6.1x86_64 in case that helps explain how my situation could have occurred.
However, since you said it is not likely to work in my situation, I will not pursue this approach much more.

    On Friday, April 8, 2016 12:40 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
 

 On Fri, Apr 08, 2016 at 03:26:28PM +0000, Tom Goetze via curl-library wrote:
> Following the example from: https://curl.haxx.se/libcurl/c/
> CURLOPT_SSL_CTX_FUNCTION.html
> My attempts at setting CURLOPT_SSL_CTX_FUNCTION are failing in the call:
>
>  rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
>
>
> I always get rv == CURLE_FAILED_INIT

Is it the curl_easy_setopt() call the returns CURLE_FAILED_INIT or the
subsequent curl_easy_perform()? I don't see how the former can return this
error. If it's not supported, curl_easy_setopt() will return
CURLE_NOT_BUILT_IN.

> Any pointers on how to debug it? I believe it should have been built against
> OpenSSL, but since it is a system installed libcurl, I am not sure how I can
> validate (on RedHat 6.6). I mentioned this, since the docs says this feature is
> not always available, so interested to know how to check (unless the above is
> the check).

Red Hat uses NSS, not OpenSSL, so I wouldn't expect it to work, regardless of
which error you get back.

>>> Dan
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

  

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-08