How to add a self-signed certificate as an exception in Chrome?

Solution 1:

  1. Export the certificate from Chrome.

    • To view the certificate click Inspect on the page and go the the Tab Security: enter image description here
    • Now click on View Certificate and export the certificate by clicking on Copy to file... In the wizard choose Base 64 encoded .Cer. Now save the certificate on your Desktop. enter image description here
  2. Import the certificate into your trusted root certification authority store.

    • Go to Start | and run the command certmgr.msc.

    • Expand the tree to get to Trusted Root Certification Authorities | Certificates. Go to All Tasks, choose Import and import the certificate in question.

OR

  • In chrome settings search for Manage certificates. Click on it and import the certificate under Trusted Root certificate Authorities.

    enter image description here

Solution 2:

For Mac OS X:

Click on the Certificate icon in the address bar. Click on "Certificate Information", then drag and drop the certificate image to your desktop or any other folder.

Double click the cer file you've just saved, it will open in the Keychain Access.

Choose a keychain to store it (I think this step is specific to Yosemite), for example "login", and finally click "always trust".

If you're not being asked where to save it or if you should trust it, locate the newly added certificate (it should be at the top of your list), right click it, choose "get info" and then choose "Always trrust" in the Trust tab, under "When using this certificate".

UPDATE 25/2/2017

Chrome doesn't show the certificate options next to the URL, you now have to open the developer tools (Option + Command + i) and go to the "Security" tab. You can then click "View Certificate" and follow the above instructions from the drag and drop and onwards.

You can also enable the more direct certificate link again by following these instructions: How to view SSL Certificate details on Chrome?

Solution 3:

For OS X, to do it from the command line:

sudo security add-trusted-cert -p ssl -d -r trustRoot -k ~/Library/Keychains/login.keychain selfsigned.crt

If you don't have a .crt file (selfsigned.crt in this command) already to reference, view the cert in Chrome and drag it to your desktop.