mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

Recognize custom Firefox profile locations

Open philnagel opened this issue 1 year ago • 3 comments

Environment

  • Operating system (including version): macOS Ventura 13.3.1
  • mkcert version (from mkcert -version): v1.4.4
  • Server (where the certificate is loaded): n/a
  • Client (e.g. browser, CLI tool, or script): n/a

What you did

Ran mkcert -install

What went wrong

The above command was partially successful but returned an error regarding Firefox:

The local CA is already installed in the system trust store! 👍
ERROR: no Firefox security databases found

I believe this is due to how this script (line 19) assumes Firefox profiles are always located at ~/Library/Application Support/Firefox/Profiles. However, Firefox supports custom profile locations. On my machine, the profiles are located elsewhere. Instead of assuming the above path, the script should check the file ~/Library/Application Support/Firefox/Profiles/profiles.ini, which has the following pertinent sections:

[Profile1]
Name=Work
IsRelative=0
Path=/Users/philna/firefox_profiles/phil_work

[Profile0]
Name=Personal
IsRelative=0
Path=/Users/philna/firefox_profiles/personal

I would normally submit a pull request, but I have never used go before so I am not sure it would be very elegant. I can attempt if desired.

philnagel avatar Apr 27 '23 18:04 philnagel

+1 in linux environments, firefox-esr uses ~/.mozilla/firefox-esr/ and currently mkcert checks ~/.mozilla/firefox/

g0t4 avatar Jan 19 '24 20:01 g0t4

FYI https://github.com/FiloSottile/mkcert/pull/566

g0t4 avatar Jan 29 '24 21:01 g0t4

in general it would be good to allow the developers to override data. being able to manually provide things like profile dir and name of the CA would really help.

c33s avatar Feb 01 '24 22:02 c33s