On Sun, 22 Mar 2020, Timothe Litt via curl-library wrote:

I see the curl_easy_setopt items CURLOPT_CAINFO (root cert bundle) and CURLOPT_CAPATH (root cert directory).

I'd like to be able to read them - particularly the default for CAINFO (CAPATH is documented as NULL) so that they can be passed to the other library.  But the "current" values would be better.

The documentation doesn't list a way to get the values - though they do seem to show up in debug/verbose output.

Not exactly though. What's shown in the debug/verbose output is the *used* paths, which can be set by the application so it is not necessarily the default values you see there.

I'd like to default to Curl's built-in values because it does a good job of defaulting based on the build system; the others aren't quite as good.

I'm glad you think we're doing a good job there. It's a difficult territory to maneuver in.

So: Am I missing an API call to get these?

There is none.

If not, perhaps curl_version_info() could provide?

That seems reasonable indeed. You basically want CURL_CA_BUNDLE and CURL_CA_PATH exposed there, right?

As a side note, in my search I noted that https://curl.haxx.se/libcurl/c/libcurl.html has a link to https://curl.haxx.se/libcurl/c/curl-config.html - which wins a 404...

Thanks, Jay subsequently filed that one over at https://github.com/curl/curl-www/issues/65 and I've landed a fix that should appear now!

--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                  | Private help, bug fixes, support, ports, new features
                  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to