cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl+openssl on windows

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Tue, 28 Feb 2012 21:30:28 +0100

"Alex Loukissas" <alex_at_maginatics.com> wrote:

> I have an app that links statically against libcurl, which itself (libcurl)
> is built with openssl support. My app is cross-compiled on Linux with
> mingw-64 and run on Win7-64. The problem I'm facing is the following:
>
> Unless I use the CURLOPT_CAINFO option and hard-code a certificate path,
> the program throws an error: "error setting certificate verify locations:
> CAfile: /etc/ssl/certs/ca-certificates.crt". My question is: can libcurl
> use Windows' certificates somehow, and if so, how? From an old thread (
> http://curl.haxx.se/mail/archive-2000-05/0060.html), it seems that the
> answer may be no, although my suspicion is that openSSL supports this.

Maybe this will help:
  http://curl.haxx.se/mail/lib-2008-03/0293.html

Basically, something like "-DCURL_CA_BUNDLE='curl_getenv("CURL_CA_BUNDLE")'"
in your CFLAGS if I didn't misunderstand the problem. Or experiment with something
like:
  curl_getenv ("%APPDATA%\\ca-cert.crt") -> will become expanded at run-time.

Also, check this section in acinclude.m4:

dnl CURL_CHECK_CA_BUNDLE
dnl -------------------------------------------------
dnl Check if a default ca-bundle should be used
dnl
...

--gv

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