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

Unified Diff: chrome/browser/webui/options/certificate_manager_handler.cc

Issue 6580058: NSS: Unlock crypto devices when populating cert manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing newline Created 9 years, 10 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
Index: chrome/browser/webui/options/certificate_manager_handler.cc
diff --git a/chrome/browser/webui/options/certificate_manager_handler.cc b/chrome/browser/webui/options/certificate_manager_handler.cc
index bdbbfc915cea37b9a3ffbd97000ac14212a1928e..ab86e204c25a16232fa82ac8c26f426c216e3576 100644
--- a/chrome/browser/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/webui/options/certificate_manager_handler.cc
@@ -532,7 +532,8 @@ void CertificateManagerHandler::ExportPersonalPasswordSelected(
}
// Currently, we don't support exporting more than one at a time. If we do,
- // this would need some cleanup to handle unlocking multiple slots.
+ // this would need to either change this to use UnlockSlotsIfNecessary or
+ // change UnlockCertSlotIfNecessary to take a CertificateList.
DCHECK_EQ(selected_cert_list_.size(), 1U);
// TODO(mattm): do something smarter about non-extractable keys
@@ -629,8 +630,10 @@ void CertificateManagerHandler::ImportPersonalFileRead(
// TODO(mattm): allow user to choose a slot to import to.
module_ = certificate_manager_model_->cert_db().GetDefaultModule();
- browser::UnlockSlotIfNecessary(
- module_.get(),
+ net::CryptoModuleList modules;
+ modules.push_back(module_);
+ browser::UnlockSlotsIfNecessary(
+ modules,
browser::kCryptoModulePasswordCertImport,
"", // unused.
NewCallback(this,

Powered by Google App Engine
This is Rietveld 408576698