How to install a self-signed certificate in chromium under Debian

certificatessl

I have a web server that uses https protocol. I want to create a self signed certificate so I did the following:

  1. Issued this command:

    openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mysite.key -out mysite.crt
    
  2. The copied both .crt and .key file to /etc/ssl/crt directory.

  3. Modified /etc/apache2/sites-available/webserver.conf which is my configuration file for apache and the web server. Here I added this 3 lines to the virtualhost:

    SSLEngine on
    SSLCertificateFile /etc/ssl/crt/mysite.crt
    SSLCertificateKeyFile /etc/ssl/crt/mysite.key
    
  4. Restarted the server.

After this I have tried and tried searching for a way to add the certificate to chrome but all methods either fail or are completely inacurate (this means that the tell me to search for options that are not there). This is usually because they are old posts and answers.

So now that I have done the above. What is the right way to add the exception to Chromium running on Debian (I clarify this because a couple of tutorials showed windows commands)

Best Answer

Doesn't chrome use the OS cert store?

sudo cp my.cert /usr/local/share/ca-certificates/
sudo update-ca-certificates

Restart the browser

Chromium's docs say:

certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n certnickname -i certfilename
Related Question