Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to install custom certificates so that they work with wget installed via MacPorts. I can't find the right directory.

I've tried installing in /System/Library/OpenSSL/certs but that directory seems to be ingored by wget. Likewise certificates installed in my keychain are ignored.

share|improve this question
up vote 3 down vote accepted

Create a wgetrc file containing:


On Linux and BSD, the file is located at ~/.wgetrc (and /etc/wgetrc system-wide). I don't know if it is the same for MacPorts.

share|improve this answer
Very cool. It's /opt/local/etc/wgetrc on macports. – vy32 Mar 26 '11 at 19:44

The answer above didn't resolve the issue for me, but I found a similar easy solution with MacPorts:

sudo port install curl-ca-bundle

To install the Certificate Authrity bundle and then push its reference to the wget settings profile:

echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc
share|improve this answer
me neither, thanks! – cce Dec 7 '12 at 4:18

I can't add a comment to grawity's solution, so I guess I'll create a new answer...

grawity's solution seems to be incomplete. It worked because you had already "tried installing in /System/Library/OpenSSL/certs".

I installed OpenSSL from MacPorts (newer than the version included with my Snow Leopard install). This put a cert.pem file in /opt/local/etc/openssl/, which I could then point to with grawity's method. This is essentially what I did:

sudo port install openssl
sudo echo 'ca_directory = /opt/local/etc/openssl' > /opt/local/etc/wgetrc
sudo cat /opt/local/etc/wgetrc.sample >> /opt/local/etc/wgetrc`

Ain's solution probably would have worked for me as well.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .