On Fri, Apr 08, 2016 at 08:16:16PM +0000, Tom Goetze via curl-library wrote: > Thanks for the feedback Dan. > > gdb showed CURLE_FAILED_INIT as the return value (numerical value was 2) from > the curl_easy_setopt > During 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.
That does explain it—in that version (which is over 6 years old, BTW) libcurl returned CURLE_FAILED_INIT instead of CURLE_NOT_BUILT_IN for unsupported options. > However, since you said it is not likely to work in my situation, I will not > pursue this approach much more. CentOS 6.7 uses NSS which almost guarantees that Red Hat 6.6 does, too, and NSS doesn't support this callback. > > On Friday, April 8, 2016 12:40 PM, Dan Fandrich <[email protected]> > 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
