[GH-ISSUE #116] [Question] How to add Root CA with chromium installed by snap #64

Closed
opened 2026-02-25 22:32:30 +03:00 by kerem · 7 comments
Owner

Originally created by @AlexandrePavy on GitHub (Jan 10, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/116

Hello,

Nice project work as a charm 👍,

I have a little question, I use chromium with snapcraft.

When i do mkcert -install this add Root CA in default path for chrome (and work fine this default chrome on linux) but not with chromium browser installed by snap

image

Default path for Root CA is sql:$HOME/.pki/nssdb but with snap is sql:/home/alexandre/snap/chromium/current/.pki/nssdb.

Do you have an idea for it to work in my case ? Can we change the default path of root CA? What is the certutils command for add the root ca in my chromium?

Originally created by @AlexandrePavy on GitHub (Jan 10, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/116 Hello, Nice project work as a charm :+1:, I have a little question, I use chromium with snapcraft. When i do `mkcert -install` this add Root CA in default path for chrome (and work fine this default chrome on linux) but not with chromium browser installed by snap ![image](https://user-images.githubusercontent.com/6603411/50995253-dea3f500-151e-11e9-8e1e-20abd4d84cd6.png) Default path for Root CA is `sql:$HOME/.pki/nssdb` but with snap is `sql:/home/alexandre/snap/chromium/current/.pki/nssdb`. Do you have an idea for it to work in my case ? Can we change the default path of root CA? What is the certutils command for add the root ca in my chromium?
kerem closed this issue 2026-02-25 22:32:30 +03:00
Author
Owner

@adamdecaf commented on GitHub (Jan 10, 2019):

Can you try adding support for that path in the NSS code? We should support both options.

  • $HOME/.pki/nssdb
  • $HOME/snap/chromium/current/.pki/nssdb

https://github.com/FiloSottile/mkcert/blob/master/truststore_nss.go#L16

<!-- gh-comment-id:453256775 --> @adamdecaf commented on GitHub (Jan 10, 2019): Can you try adding support for that path in the NSS code? We should support both options. - `$HOME/.pki/nssdb` - `$HOME/snap/chromium/current/.pki/nssdb` https://github.com/FiloSottile/mkcert/blob/master/truststore_nss.go#L16
Author
Owner

@AlexandrePavy commented on GitHub (Jan 10, 2019):

Yes add snap path should be great.

as workaround, you can add manually Root CA with this command

certutil -d sql:/home/<HomeName>/snap/chromium/current/.pki/nssdb -A -t "C,," -n 'mkcert dev' -i /home/<HomeName>/.local/share/mkcert/rootCA.pem

<!-- gh-comment-id:453270203 --> @AlexandrePavy commented on GitHub (Jan 10, 2019): Yes add snap path should be great. as workaround, you can add manually Root CA with this command `certutil -d sql:/home/<HomeName>/snap/chromium/current/.pki/nssdb -A -t "C,," -n 'mkcert dev' -i /home/<HomeName>/.local/share/mkcert/rootCA.pem`
Author
Owner

@adamdecaf commented on GitHub (Jan 17, 2019):

@AlexandrePavy would you be able to pull down this Pull Request and try?

Branch: https://github.com/adamdecaf/mkcert/tree/more-nss-locations

<!-- gh-comment-id:454992164 --> @adamdecaf commented on GitHub (Jan 17, 2019): @AlexandrePavy would you be able to pull down [this Pull Request](https://github.com/FiloSottile/mkcert/pull/121) and try? Branch: https://github.com/adamdecaf/mkcert/tree/more-nss-locations
Author
Owner

@AlexandrePavy commented on GitHub (Jan 17, 2019):

👍 nice i will have a look soon,

i need to build this for test

<!-- gh-comment-id:455101830 --> @AlexandrePavy commented on GitHub (Jan 17, 2019): :+1: nice i will have a look soon, i need to build this for test
Author
Owner

@AlexandrePavy commented on GitHub (Feb 10, 2019):

Hello @adamdecaf,

I have just tried PR, sorry for the delay !

image

firstly I delete the existing certificate
image

Then when I reinstall the certificat, I have no added certificate for the chrome snap :
image

it does not seem to work or did something wrong?

<!-- gh-comment-id:462150668 --> @AlexandrePavy commented on GitHub (Feb 10, 2019): Hello @adamdecaf, I have just tried PR, sorry for the delay ! ![image](https://user-images.githubusercontent.com/6603411/52536515-f8be3680-2d5b-11e9-8ed0-84248e65074c.png) firstly I delete the existing certificate ![image](https://user-images.githubusercontent.com/6603411/52536527-168b9b80-2d5c-11e9-9b05-2ca87fd2e0f4.png) Then when I reinstall the certificat, I have no added certificate for the chrome snap : ![image](https://user-images.githubusercontent.com/6603411/52536533-24d9b780-2d5c-11e9-9659-ae88bc88842e.png) it does not seem to work or did something wrong?
Author
Owner

@shaal commented on GitHub (May 16, 2019):

Using Ubuntu 18.10
On a DDEV 1.8.0 project, I installed mkcert -install.

It works great on Google Chrome and Firefox.
But does NOT work on Chromium and on Firefox Nightly.

<!-- gh-comment-id:493052962 --> @shaal commented on GitHub (May 16, 2019): Using Ubuntu 18.10 On a [DDEV 1.8.0](https://github.com/drud/ddev/releases/tag/v1.8.0) project, I installed `mkcert -install`. It works great on Google Chrome and Firefox. But does NOT work on Chromium and on Firefox Nightly.
Author
Owner

@adamdecaf commented on GitHub (May 22, 2019):

@shaal can you confirm if the above additional paths would work to install and trust the certificate on your machine? If not, do you know where mkcert should install the certificate into?

<!-- gh-comment-id:494979708 --> @adamdecaf commented on GitHub (May 22, 2019): @shaal can you confirm if the above additional paths would work to install and trust the certificate on your machine? If not, do you know where mkcert should install the certificate into?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#64
No description provided.