diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/nss_init.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/base/nss_init.cc b/base/nss_init.cc index c5c10c4..c8ba44b 100644 --- a/base/nss_init.cc +++ b/base/nss_init.cc @@ -6,6 +6,12 @@ #include <nss.h> +// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 +// until NSS 3.12.2 comes out and we update to it. +#define Lock FOO_NSS_Lock +#include <ssl.h> +#undef Lock + #include "base/logging.h" #include "base/singleton.h" @@ -15,9 +21,16 @@ class NSSInitSingleton { public: NSSInitSingleton() { CHECK(NSS_NoDB_Init(".") == SECSuccess); + // Enable ciphers + NSS_SetDomesticPolicy(); + // Enable SSL + SSL_OptionSetDefault(SSL_SECURITY, PR_TRUE); } ~NSSInitSingleton() { + // Have to clear the cache, or NSS_Shutdown fails with SEC_ERROR_BUSY + SSL_ClearSessionCache(); + SECStatus status = NSS_Shutdown(); DCHECK(status == SECSuccess); } |