Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to add Root CA with chromium installed by snap #116

Closed
AlexandrePavy opened this issue Jan 10, 2019 · 7 comments
Closed

[Question] How to add Root CA with chromium installed by snap #116

AlexandrePavy opened this issue Jan 10, 2019 · 7 comments

Comments

@AlexandrePavy
Copy link

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?

@adamdecaf
Copy link
Contributor

adamdecaf commented 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

@AlexandrePavy
Copy link
Author

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

@adamdecaf
Copy link
Contributor

@AlexandrePavy
Copy link
Author

👍 nice i will have a look soon,

i need to build this for test

@AlexandrePavy
Copy link
Author

AlexandrePavy commented 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?

@shaal
Copy link

shaal commented 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.

@adamdecaf
Copy link
Contributor

adamdecaf commented 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?

@FiloSottile FiloSottile added question This is a user question and removed question This is a user question labels Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants