Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1335)

Unified Diff: base/nss_init.cc

Issue 4049: Port SSLClientSocket to Linux (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | net/base/client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698