Index: base/nss_init.cc |
=================================================================== |
--- base/nss_init.cc (revision 3736) |
+++ base/nss_init.cc (working copy) |
@@ -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 @@ |
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); |
} |