On this blog, any problem is worth solving, no matter how obscure!
In this spirit I give you the solution to: How to add a self signed certificate to Google Chrome in Ubuntu Linux.
This is actually quite a non-trivial thing to do. Kind of smart of Google, actually, to not use resources to make their own certificate tool like Mozilla. But somewhat of a showstopper if you need it.
So this is what I ended up doing on my Ubuntu Linux 10.04 system terminal.
# Install cert tools
sudo apt-get install libnss3-tools
# Create database (if it doesn't already exist)
mkdir -p ~/.pki/nssdb
certutil -d sql:$HOME/.pki/nssdb -N
# Import the cert (You will need to copy it from your web server)
certutil -A -t "C,," -d $HOME/.pki/nssdb -n 'My Certificate' -i mycert.crt
Creating the database prevents errors like these:
certutil: function failed: security library: bad database.
could not authenticate to token NSS Certificate DB.:
An I/O error occurred during security authorization.