1.03.2014

Installing new CA certs on ubuntu for chrome or firefox

I recently needed to install a new CA cert into my ubuntu VM.  There are lots of tutorials out there that show how to use

sudo dpkg-reconfigure ca-certificates

This is all well and good if you want to install the CA into the global openssl store for things like git, wget, and apt.  However, if you want Chrome or Firefox to be able to trust the new CA, you need to install the CA cert into the NSS database.  (?!).

This SO article saved me about a day of frustration and sadly I don't have enough rep to upvote Johann's answer:

http://superuser.com/questions/437330/how-do-you-add-a-certificate-authority-ca-to-ubuntu/657177#657177?newreg=ad85846ee69249969b698b48bda371c3

Basically, you need to download the NSS client tools and use them to install the CA (the same one you put in openssl's store) into the backend NSS.  Chromium has the process documented here:

https://code.google.com/p/chromium/wiki/LinuxCertManagement

To install a new cert using the NSS client tools, do this:

certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n <certificate nickname> -i <certificate filename>

<certificate nickname> can be anything.  <certificate filename> is the full path to your PEM file (*.crt or *.cer).

No comments:

Post a Comment