summaryrefslogtreecommitdiffstats
path: root/security/certverifier/NSSCertDBTrustDomain.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-03-16 13:38:19 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 13:11:05 +0200
commit899e14e94569ef668fdf10152d6c7296a6be4daa (patch)
tree72f5cf75a85c0a63506120829b1b21058ba82fbf /security/certverifier/NSSCertDBTrustDomain.cpp
parent03fda9f0f34a92f7b7620f614983f69d0a69faa3 (diff)
downloadUXP-899e14e94569ef668fdf10152d6c7296a6be4daa.tar
UXP-899e14e94569ef668fdf10152d6c7296a6be4daa.tar.gz
UXP-899e14e94569ef668fdf10152d6c7296a6be4daa.tar.lz
UXP-899e14e94569ef668fdf10152d6c7296a6be4daa.tar.xz
UXP-899e14e94569ef668fdf10152d6c7296a6be4daa.zip
Issue #1467 - Part 1: Set up conditional NSS-SQL builds.
- Adds buildconfig option --enable-nss-sqlstore - Prefixes NSS dbinit with either sql: or dbm: depending on config - Pre-initializes mozStorage when NSS-SQL storage is used to prevent an sqlite3_config race in NSS Init
Diffstat (limited to 'security/certverifier/NSSCertDBTrustDomain.cpp')
-rw-r--r--security/certverifier/NSSCertDBTrustDomain.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
index 5e89c2484..2793fad48 100644
--- a/security/certverifier/NSSCertDBTrustDomain.cpp
+++ b/security/certverifier/NSSCertDBTrustDomain.cpp
@@ -1102,7 +1102,12 @@ InitializeNSS(const nsACString& dir, bool readOnly, bool loadPKCS11Modules)
flags |= NSS_INIT_NOMODDB;
}
nsAutoCString dbTypeAndDirectory;
+#ifdef NSS_SQLSTORE
+ // Not strictly necessary with current NSS versions, but can't hurt to be explicit.
+ dbTypeAndDirectory.Append("sql:");
+#else
dbTypeAndDirectory.Append("dbm:");
+#endif
dbTypeAndDirectory.Append(dir);
return ::NSS_Initialize(dbTypeAndDirectory.get(), "", "", SECMOD_DB, flags);
}