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

Method forEachNSSProfile

truststore_nss.go:131–151  ·  view source on GitHub ↗
(f func(profile string))

Source from the content-addressed store, hash-verified

129}
130
131func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
132 var profiles []string
133 profiles = append(profiles, nssDBs...)
134 for _, ff := range FirefoxProfiles {
135 pp, _ := filepath.Glob(ff)
136 profiles = append(profiles, pp...)
137 }
138 for _, profile := range profiles {
139 if stat, err := os.Stat(profile); err != nil || !stat.IsDir() {
140 continue
141 }
142 if pathExists(filepath.Join(profile, "cert9.db")) {
143 f("sql:" + profile)
144 found++
145 } else if pathExists(filepath.Join(profile, "cert8.db")) {
146 f("dbm:" + profile)
147 found++
148 }
149 }
150 return
151}

Callers 3

checkNSSMethod · 0.95
installNSSMethod · 0.95
uninstallNSSMethod · 0.95

Calls 1

pathExistsFunction · 0.85

Tested by

no test coverage detected