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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 83793006: NSS: Handle unfriendly tokens in client auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for comment #13 Created 7 years, 1 month 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/ssl/client_cert_store_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 4d8610e44bc8d48cd9087f9409e1e42c346b3748..c68b4b5ef852af8d3a0d53ce3ac30ba50b568da2 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -95,6 +95,10 @@
#include "chromeos/settings/cros_settings_names.h"
#endif // defined(OS_CHROMEOS)
+#if defined(USE_NSS)
+#include "chrome/browser/ui/crypto_module_password_dialog.h"
+#endif
+
using content::BrowserContext;
using content::BrowserThread;
using content::ResourceContext;
@@ -679,8 +683,14 @@ net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() {
scoped_ptr<net::ClientCertStore>
ProfileIOData::ResourceContext::CreateClientCertStore() {
#if !defined(USE_OPENSSL)
- return scoped_ptr<net::ClientCertStore>(new net::ClientCertStoreImpl());
-#else
+ scoped_ptr<net::ClientCertStoreImpl> store(new net::ClientCertStoreImpl());
+#if defined(USE_NSS)
+ store->set_password_delegate_factory(
+ base::Bind(&chrome::NewCryptoModuleBlockingDialogDelegate,
+ chrome::kCryptoModulePasswordClientAuth));
+#endif
+ return store.PassAs<net::ClientCertStore>();
+#else // defined(USE_OPENSSL)
// OpenSSL does not use the ClientCertStore infrastructure. On Android client
// cert matching is done by the OS as part of the call to show the cert
// selection dialog.
« no previous file with comments | « no previous file | net/ssl/client_cert_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698