MacOS – How to fix curl throwing “error setting certificate verify locations”

leopardmacbook promacosterminal

I'm a web developer and I have a MacBook4,1 with OS X 10.5.8. Important stuff like GitHub, homebrew, ruby and python doesn't work correctly, because curl doesn't work.
It seems that the SSL certificates are outdated.

I get this error every time:

curl: (77) error setting certificate verify locations:
  CAfile: /usr/share/curl/curl-ca-bundle.crt
  CApath: none

What can I do to fix this?

Best Answer

That error doesn't explicitly say that the certificates are outdated does it? It looks to me like it is complaining that the certs are not where they are supposed to be (or potentially they can't be read).

Found this on google:

http://curl.haxx.se/mail/curlphp-2005-11/0038.html

To summarize the poster suggests either using the -k flag with curl to suppress this error (this is obviously less secure) or make sure that what ever process is calling curl has execute access to all directories on the path to the certificates.