()
| 87 | } |
| 88 | |
| 89 | func (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 | |
| 106 | func (m *mkcert) uninstallNSS() { |
| 107 | m.forEachNSSProfile(func(profile string) { |
no test coverage detected