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

CA not installed for Firefox on MacOS Big Sur #15

Open
tnyeanderson opened this issue Nov 6, 2022 · 1 comment
Open

CA not installed for Firefox on MacOS Big Sur #15

tnyeanderson opened this issue Nov 6, 2022 · 1 comment

Comments

@tnyeanderson
Copy link

tnyeanderson commented Nov 6, 2022

Problem

Using command:

step certificate install --all $certpath

This works for the system trust store, but not for Firefox (or curl but I think that's a separate issue). There is no error message and exit code is 0.

When run with --firefox --no-system it still gives the Certificate xyz has been installed success message even though the cert is not actually added to the firefox trust store.

May try to dig into the code and investigate if I have time this week.

Versions

Smallstep CLI v0.22.0 (installed with brew install step)

Pretty fresh Big Sur 11.7.1 installation, already logged into Firefox before running the step command.

Firefox v106.0.5

@maraino
Copy link
Collaborator

maraino commented Nov 9, 2022

In case you want to investigate, we look for firefox profiles in:

NSSProfile = os.Getenv("HOME") + "/Library/Application Support/Firefox/Profiles/*"

And then by default we use certutil, it can be installed with (brew install nss), to install the cert in all profiles:

func (t *NSSTrust) Uninstall(filename string, cert *x509.Certificate) (err error) {
forEachNSSProfile(func(profile string) {
if err != nil {
return
}
// skip if not found
//nolint:gosec // tolerable risk necessary for function
if err := exec.Command(t.certutilPath, "-V", "-d", profile, "-u", "L", "-n", uniqueName(cert)).Run(); err != nil {
return
}
// delete certificate
//nolint:gosec // tolerable risk necessary for function
cmd := exec.Command(t.certutilPath, "-D", "-d", profile, "-n", uniqueName(cert))
out, err1 := cmd.CombinedOutput()
if err1 != nil {
err = NewCmdError(err1, cmd, out)
}
})
if err == nil {
debug("certificate uninstalled properly from NSS security databases")
}
return
}

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

2 participants