Tuesday, 26 August 2014

How to install a CA Certificate in Ubuntu

I was looking for the above problem when I found this to be a perfect solution.

Given a CA certificate file 'foo.crt', follow these steps to install it on Ubuntu:
First, copy your CA to dir /usr/local/share/ca-certificates/
sudo cp foo.crt /usr/local/share/ca-certificates/foo.crt
then, update CA store
sudo update-ca-certificates
That's all. You should get this output:
Updating certificates in /etc/ssl/certs... 1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....
Adding debian:foo.pem
No file is needed to edit. Link to your CA is created automatically.
Please note that the certificate filenames have to end in .crt, otherwise the update-ca-certificates script won't pick up on them.

Thanks to Frantisek for his answer here.

No comments:

Post a Comment