Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers 3

up vote 3 down vote accepted

Create a wgetrc file containing:

ca_directory=/System/Library/OpenSSL/certs

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
2  
Very cool. It's /opt/local/etc/wgetrc on macports. –  vy32 Mar 26 '11 at 19:44
add comment

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
2  
me neither, thanks! –  cce Dec 7 '12 at 4:18
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.