diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-03-17 13:33:03 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 13:11:37 +0200 |
commit | 894b33e53a0c05f0d5b083caf97db0f20f758d5d (patch) | |
tree | d6bd47bc7d114923d0681688535545f4372b8bad /toolkit/xre | |
parent | 236d42599310ca6672503709815a0dda3771d414 (diff) | |
download | UXP-894b33e53a0c05f0d5b083caf97db0f20f758d5d.tar UXP-894b33e53a0c05f0d5b083caf97db0f20f758d5d.tar.gz UXP-894b33e53a0c05f0d5b083caf97db0f20f758d5d.tar.lz UXP-894b33e53a0c05f0d5b083caf97db0f20f758d5d.tar.xz UXP-894b33e53a0c05f0d5b083caf97db0f20f758d5d.zip |
Issue #1467 - Part 2: Make the PBKDF rounds adaptive to choice of NSS db
Diffstat (limited to 'toolkit/xre')
-rw-r--r-- | toolkit/xre/nsAppRunner.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index e3705a5c2..1f3615a6a 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2781,19 +2781,26 @@ XREMain::XRE_mainInit(bool* aExitFlag) #endif SetupErrorHandling(gArgv[0]); - - // Set up environment for NSS DBM database + // Set up environment for NSS database choice +#ifndef NSS_DISABLE_DBM // Allow iteration counts in DBM mode SaveToEnv("NSS_ALLOW_LEGACY_DBM_ITERATION_COUNT=1"); - // Set default Master Password rounds to a sane value for DBM which is slower - // than SQL for PBKDF. The NSS hard-coded default of 10,000 is too much. - // See also Bug 1606992 for perf issues. +#endif + #ifdef DEBUG + // Reduce the number of rounds for debug builds for perf/test reasons. SaveToEnv("NSS_MAX_MP_PBE_ITERATION_COUNT=15"); #else +#ifdef NSS_SQLSTORE + // We're using SQL; NSS's defaults for rounds are fine. +#else + // Set default Master Password rounds to a sane value for DBM which is slower + // than SQL for PBKDF. The NSS hard-coded default of 10,000 is too much. + // See also Bug 1606992 for perf issues. SaveToEnv("NSS_MAX_MP_PBE_ITERATION_COUNT=500"); #endif +#endif #ifdef CAIRO_HAS_DWRITE_FONT { |