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; |
} |