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

nss: look in more locations for cert/key database #121

Closed
wants to merge 1 commit into from

Conversation

adamdecaf
Copy link
Contributor

There seem to be installs/platforms that don't follow the typical NSS database install location. I don't know how many of these we want to support, so NSSDB=<path> mkcert -install could be an option also.

Issue: #116 and #120

@@ -13,7 +13,7 @@ var (
hasNSS bool
hasCertutil bool
certutilPath string
nssDB = filepath.Join(os.Getenv("HOME"), ".pki/nssdb")
nssDB string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this unused except on Linux? Because now it's only initialized there.

@@ -13,7 +13,7 @@ var (
hasNSS bool
hasCertutil bool
certutilPath string
nssDB = filepath.Join(os.Getenv("HOME"), ".pki/nssdb")
nssDB string
)

func init() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hasNSS check below on line 21 uses nssDB before it's set.

@adamdecaf
Copy link
Contributor Author

Apologies for the delay, but I updated the PR.

@AlexandrePavy
Copy link

Hello,

I added some feedback on issue : #116 (comment)

on my side it does not seem to work

@adamdecaf
Copy link
Contributor Author

re: #116 (comment)

I see what's wrong. The closure isn't running over both paths.

func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
	profiles, _ := filepath.Glob(FirefoxProfile)

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

Successfully merging this pull request may close these issues.

3 participants