-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
A configuration with the following:
./configure ... --with-ca-path=/usr/share/curl --with-ca-bundle=curl-ca-bundle.crt
Configures fine. At runtime, it produces an error:
curl: (77) error setting certificate verify locations:
CAfile: curl-ca-bundle.crt
CApath: /usr/share/curl
cURL has access to both the path and the file:
$ ls -Al /usr/share/curl
total 1496
-rw-r--r--@ 1 root staff 258424 Aug 24 11:38 ca-bundle.crt
-rw-r--r--@ 1 root wheel 258424 Aug 30 18:58 curl-ca-bundle.crt
-rw-r--r-- 1 root wheel 238102 Sep 24 2007 curl-ca-bundle.crt.bak
According to configure --help, I've set them as I'm supposed to. I provided the path via --with-ca-path, and I provided the filename via --with-ca-bundle
$ ./configure --help | grep "\-ca"
...
--with-ca-bundle=FILE File name to use as CA bundle
--without-ca-bundle Don't use a default CA bundle
--with-ca-path=DIRECTORY
--without-ca-path Don't use a default CA path
There seems to be a lot of trouble with these options and lack of validation. Here's the number one search result: http://curl.haxx.se/mail/curlphp-2005-11/0038.html. In this report, the permissions were wrong. Configure could have easily tested it, but it did not.
Here's the number two search result: https://stackoverflow.com/questions/3160909/how-do-i-deal-with-certificates-using-curl-while-trying-to-access-an-https-url. The advice is to read the primary reference at http://curl.haxx.se/docs/sslcerts.html.
Unfortunately, the primary reference language is ambiguous and it lacks a working example. For example, when you say "FILE", do you mean just the filename (curl-ca-bundle.crt), or do you mean the fully qualified or absolute filename (/usr/share/curl/curl-ca-bundle.crt)?
It would be very helpful to users to state _exactly_ and _precisely_ what cURL expects or needs. It would also be very helpful to users if configure validated the --with-ca-path and --with-ca-bundle.