From 1e7d221386d437538bb1958f7b721a9c1a76882b Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Thu, 12 Jul 2018 12:47:05 -0500 Subject: [PATCH] firefox: prefer cert9.db and skip cert8.db when found (#13) Fixes #12 (again) --- truststore_nss.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/truststore_nss.go b/truststore_nss.go index 9d72727..75cf1f6 100644 --- a/truststore_nss.go +++ b/truststore_nss.go @@ -100,13 +100,14 @@ func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) { if stat, err := os.Stat(profile); err != nil || !stat.IsDir() { continue } - if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) { - f("dbm:" + profile) - found++ - } if _, err := os.Stat(filepath.Join(profile, "cert9.db")); !os.IsNotExist(err) { f("sql:" + profile) found++ + continue + } + if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) { + f("dbm:" + profile) + found++ } } return