cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_CAPATH on Windows

From: Guenter <lists_at_gknw.net>
Date: Sat, 02 Mar 2013 19:56:42 +0100

Hi Katie,
Am 02.03.2013 18:22, schrieb Katie Scott:
> I ran across:
>
> "The CURLOPT_CAPATH
> <http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTCAPATH> function
> apparently does not work in Windows due to some limitation in openssl."
>
> Is this still current? If so - can I get some clues from a Windows
> programmer as to how to work around that.
see lib/curl_setuop.h:
/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
#endif

that means that you can either:
1) #define CURL_CA_BUNDLE "/path/to/ca-bundle.crt" at compiletime
or
2) #define CURL_WANTS_CA_BUNDLE_ENV at compiletime and then
set CURL_CA_BUNDLE=/path/to/ca-bundle.crt at runtime

another option is to build libcurl with WinSSL support which uses the
cert store from OS.

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-02