curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: CURLE_SSL_CACERT_BADFILE error for HTTPS URL

From: Jeffrey Walton via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 12 Jan 2020 16:18:43 -0500

On Sun, Jan 12, 2020 at 10:54 AM shiftag via curl-library
<curl-library_at_cool.haxx.se> wrote:
> ...
>
> That's what I did, I built libcurl with --with-ca-bundle and
> --with-ca-path but I unfortunately did a wrong copy/paste for curl one.
> I add the options that way:
>
> --with-ca-bundle=$(PATHDEP)/certs/ca-bundle.crt
> --with-ca-path=$(PATHDEP)/certs
>
> using the static curl binary in verbose mode I could see both path are
> correct. But I think the issue is related to the certs stuff. As I'm
> using a non-standard path I had to generate/download the ca-bundle, the
> crt files, pem files and the hash. So, curl static binay is checking the
> right path but still I end-up with error 77.

You might want to show how you configured your build of curl, and how
you are compiling and linking your program.

In the absence of the compile and link commands, and assuming you
installed your curl at /usr/local, and assuming you are on Linux, then
your link command should use something like:

    -l:/usr/local/lib/libcurl.a

or

  -L /usr/local/lib -l:libcurl.a

-l:<filename> is used to avoid link problems by not allowing the
linker to make the wrong guess. Also see the ld(1) man page at
http://man7.org/linux/man-pages/man1/ld.1.html, and the discussion of
--library=namespec and :filename.

Jeff
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-01-12