cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl problem with -k option on win32

From: Gisle Vanem <giva_at_bgnett.no>
Date: Sat, 15 Jan 2005 10:03:49 +0100

"Jochen Roderburg" wrote:

> data->set.ssl.CAfile in lib/url.c
>
> it is initialised there like
>
> 354:#ifdef CURL_CA_BUNDLE
> 355- /* This is our prefered CA cert bundle since install time */
> 356: data->set.ssl.CAfile = (char *)CURL_CA_BUNDLE;
> 357-#endif
>
> and I assume this is not done in the Windows version.

Because Windows (and DOS) cannot use the hardcoded hack that's
done on Unix (where CURL_CA_BUNDLE = /usr/share/bla-bla set
by configure).

Instead use env-var CURL_CA_BUNDLE. Comment from .\src\main.c:

 On WIN32 (non-cygwin), we can't set the path to curl-ca-bundle.crt
 at compile time. So we look here for the file in two ways:
 1: look at the environment variable CURL_CA_BUNDLE for a path
 2: if #1 isn't found, use the windows API function SearchPath()
    to find it along the app's path (includes app's dir and CWD)

----
Or put something like this in your $HOME/_curlrc file.
  --cacert = c:\curl\lib\ca-bundle.crt
If you don't have %HOME set, curl will look in %APPDATA, then
%USERPROFILE%\Application Data
--gv
Received on 2005-01-15