MCPcopy
hub / github.com/FiloSottile/mkcert / installNSS

Method installNSS

truststore_nss.go:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89func (m *mkcert) installNSS() bool {
90 if m.forEachNSSProfile(func(profile string) {
91 cmd := exec.Command(certutilPath, "-A", "-d", profile, "-t", "C,,", "-n", m.caUniqueName(), "-i", filepath.Join(m.CAROOT, rootName))
92 out, err := execCertutil(cmd)
93 fatalIfCmdErr(err, "certutil -A -d "+profile, out)
94 }) == 0 {
95 log.Printf("ERROR: no %s security databases found", NSSBrowsers)
96 return false
97 }
98 if !m.checkNSS() {
99 log.Printf("Installing in %s failed. Please report the issue with details about your environment at https://github.com/FiloSottile/mkcert/issues/new 👎", NSSBrowsers)
100 log.Printf("Note that if you never started %s, you need to do that at least once.", NSSBrowsers)
101 return false
102 }
103 return true
104}
105
106func (m *mkcert) uninstallNSS() {
107 m.forEachNSSProfile(func(profile string) {

Callers 1

installMethod · 0.95

Calls 5

forEachNSSProfileMethod · 0.95
caUniqueNameMethod · 0.95
checkNSSMethod · 0.95
execCertutilFunction · 0.85
fatalIfCmdErrFunction · 0.85

Tested by

no test coverage detected