Skip to content

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

Closed

Description

@AlexandrePavy

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?

Activity

  1. adamdecaf commented on Jan 10, 2019

    @adamdecaf
    Contributor

    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

  2. AlexandrePavy commented on Jan 10, 2019

    @AlexandrePavy
    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

  3. adamdecaf commented on Jan 17, 2019

    @adamdecaf
    Contributor
  4. AlexandrePavy commented on Jan 17, 2019

    @AlexandrePavy
    Author

    👍 nice i will have a look soon,

    i need to build this for test

  5. AlexandrePavy commented on Feb 10, 2019

    @AlexandrePavy
    Author

    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?

  6. shaal commented on May 16, 2019

    @shaal

    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.

  7. adamdecaf commented on May 22, 2019

    @adamdecaf
    Contributor

    @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?

  8. added
    question
    and removed
    question
    on Jun 1, 2019
  9. added a commit that references this issue on Jul 23, 2024
    8d9e434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions