Add permanent SSL certificate exception in Chrome (Linux)

66

29

I have a problem with a website that has an SSL certificate which doesn't correspond to the website domain. Chrome gives me a warning for this website (and rightly so), which I have to ignore manually. Every time I restart Chrome, I need to ignore the certificate issue again.

I've tried adding the certificate as a trusted one with certutil, using C,, and P,, trustargs, but it doesn't work. I can't find a set of trustargs that will tell it to ignore which domain is using the certificate.

Is there a way to tell Chrome (or certutil) to trust this certificate whatever domain uses it?

ℝaphink

Posted 2010-02-03T10:03:54.753

Reputation: 3 531

Answers

60

This is a summary of the answers from the thread
Disable Google Chrome warning if security certificate is not trusted.

You can avoid the message for trusted sites by installing the certificate.
This can be done by clicking on the warning icon in the address bar, then click
Certificate Information -> Details Tab -> Export...
Save the certificate.

Use Chrome's Preferences -> Under The Hood -> Manage Certificates -> Import.
On the "Certificate Store" screen of the import, choose "Place all certificates in the following store" and browse for "Trusted Root Certification Authorities." Restart Chrome.

harrymc

Posted 2010-02-03T10:03:54.753

Reputation: 306 093

Good answer, thank you. I just wish it was easier, 1 click ideally :-) – Josef Sábl – 2014-09-05T08:07:56.397

22 quick things to add to this:

  1. It seems to work best if you go to the "Authorities" tab in the certificate manager, before clicking "Import..." (thus adding you, or whoever signed the certificate, as a trusted signer-of-certificates)

  2. I'm not sure if I needed to, but I checked all the checkboxes under "Edit trust settings".

  3. < – Sean the Bean – 2014-10-10T17:30:23.763

8Thank you, but this only works on Windows. On Linux, Chrome uses the certutil command line tool to manage certificates, nothing else. – ℝaphink – 2010-02-11T11:30:15.267

1It seems I can't select your answer as the right one anymore because the bounty expired :'( – ℝaphink – 2010-02-15T09:24:59.257

@Raphink: Does this work after all in Linux? – harrymc – 2010-02-15T09:28:59.793

Worked like a charm, never considered it thank you! – Rudi Strydom – 2014-12-12T15:20:00.463

3No, it doesn't work on Linux, and the bounty cannot be relaunched. – ℝaphink – 2010-02-22T09:43:17.907

There is no certificate information any more in recent chrome versions. – user1050755 – 2017-04-21T08:30:57.300

@user1050755: What do you mean? AFAIK certificates are reachable via Settings > Show advanced settings > HTTPS/SSL > Manage certificates. – harrymc – 2017-04-21T09:00:27.360

@user1050755 Dev Tools (F12) > Security tab > View Certificate – Andre Figueiredo – 2017-06-05T20:20:44.270

1

FYI, this (now?) does work on Chromium 18, Ubuntu 12.04 - same instructions found here: http://superuser.com/a/41937/55046

– Zayne S Halsall – 2013-01-15T05:08:28.767

15

Using Chrome Version 23.0.1271.97 on Linux:

  1. First click on the certificate warning and export the certificate to your file system. (Connection > Certificate Information > Details > Export)
  2. Then use certutil in order to add this saved certificate as a trusted peer:

    certutil -d sql:$HOME/.pki/nssdb -A -t P -n <certificate nickname> -i <certificate filename>
    
  3. Restart Chrome and you're done.

Tundrome

Posted 2010-02-03T10:03:54.753

Reputation: 151

This is a great answer, if you want to understand better how it works, use certutil -H -A, and maybe read about trust flags in NSS Database: https://blogs.oracle.com/meena/entry/notes_about_trust_flags

– Tomasz Gandor – 2015-11-25T08:24:34.520

2This worked for me, thanks! I had to run this first (opensuse linux): sudo zypper install mozilla-nss-tools – gatoatigrado – 2013-09-27T08:09:50.287

10

The only way I got it working in Chromium with Ubuntu Linux is using this certutil commandline:

certutil -d sql:$HOME/.pki/nssdb -A -t "CP,CP," -n CertNickName -i cert_file.crt

Treviño

Posted 2010-02-03T10:03:54.753

Reputation: 308

2This worked for me using Arch too. – Tim – 2015-07-23T08:48:23.557

That worked for me on Centos 7 – The_Cute_Hedgehog – 2016-09-26T13:26:56.557

1Worked Debian 9 also (requires libnss3-tools package installed first). – nd34567s32e – 2017-11-02T13:47:32.053

3

Please have a look at this thread:
Can't convince Chrome that my Tivo's self signed certificate is ok.

The article remarks that:

You need to specify the "C,," trust flags to work around the NSS bug.

If this thread does relate to your problem, it looks like this is a known bug in Chrome, where the "P,," trust flags is not working: libpkix ignores the P (trusted peer) trust flag

I hope this helps (I'm answering a bit blindly, since I'm not on Linux).

harrymc

Posted 2010-02-03T10:03:54.753

Reputation: 306 093

Thanks, it seems to be related to my problem, and hence a bug in Chrome. I'll consider your suggestion as an answer to my question, even though it doesn't really fix my problem :-) – ℝaphink – 2010-02-15T09:23:42.847

0

Google Chrome in Linux doesn’t have a SSL certificate manager, it relies on the NSS Shared DB. In order to add SSL certificates to the database you will have to use the command line. I will explain how you can add the CAcert certificates and a very easy way to add self-signed certificates.

Please have a look at this thread: blog.avirtualhome.com/2010/02/02/adding-ssl-certificates-to-google-chrome-linux-ubuntu/

k din

Posted 2010-02-03T10:03:54.753

Reputation: 25

You should move the stuff from the blog post into here. Currently as it stands this is pretty much a link-only answer. – AlbertEngelB – 2015-08-11T20:50:16.683

-1 Need to explain here. Links die. This will live. – Elijah Lynn – 2017-02-21T17:23:00.690

1aaaaand the link is dead. – Mike Diehn – 2018-06-11T16:56:15.327