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

Unified Diff: net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp

Issue 5686002: NSS: PKCS 11 password prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing review comments Created 9 years, 11 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 | « net/third_party/mozilla_security_manager/nsPKCS12Blob.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
diff --git a/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp b/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
index cf2b0cfa7a4bca0b00182cb411334b8ecda10e14..fcaff6062a6b0bc0935ef7fa73ff6d5729fca5c2 100644
--- a/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
+++ b/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp
@@ -262,17 +262,13 @@ void EnsurePKCS12Init() {
}
// Based on nsPKCS12Blob::ImportFromFile.
-int nsPKCS12Blob_Import(const char* pkcs12_data,
+int nsPKCS12Blob_Import(PK11SlotInfo* slot,
+ const char* pkcs12_data,
size_t pkcs12_len,
const string16& password) {
- base::ScopedPK11Slot slot(base::GetDefaultNSSKeySlot());
- if (!slot.get()) {
- LOG(ERROR) << "Couldn't get Internal key slot!";
- return net::ERR_PKCS12_IMPORT_FAILED;
- }
int rv = nsPKCS12Blob_ImportHelper(pkcs12_data, pkcs12_len, password, false,
- slot.get());
+ slot);
// When the user entered a zero length password:
// An empty password should be represented as an empty
@@ -283,7 +279,7 @@ int nsPKCS12Blob_Import(const char* pkcs12_data,
// without giving a user prompt when trying the different empty password flavors.
if (rv == net::ERR_PKCS12_IMPORT_BAD_PASSWORD && password.size() == 0) {
rv = nsPKCS12Blob_ImportHelper(pkcs12_data, pkcs12_len, password, true,
- slot.get());
+ slot);
}
return rv;
}
« no previous file with comments | « net/third_party/mozilla_security_manager/nsPKCS12Blob.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698