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

Unified Diff: crypto/symmetric_key_nss.cc

Issue 11186004: Use the NSS internal key slot for all temporary key operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused slot Created 8 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 | « crypto/openpgp_symmetric_encryption.cc ('k') | net/http/des.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/symmetric_key_nss.cc
diff --git a/crypto/symmetric_key_nss.cc b/crypto/symmetric_key_nss.cc
index 6772532ae282356e60a2087ef749b461287c7a0a..7fd0c320d888e3d7bcdfa21337c1c44db0224f13 100644
--- a/crypto/symmetric_key_nss.cc
+++ b/crypto/symmetric_key_nss.cc
@@ -23,7 +23,7 @@ SymmetricKey* SymmetricKey::GenerateRandomKey(Algorithm algorithm,
if (key_size_in_bits == 0)
return NULL;
- ScopedPK11Slot slot(PK11_GetBestSlot(CKM_AES_KEY_GEN, NULL));
+ ScopedPK11Slot slot(PK11_GetInternalSlot());
if (!slot.get())
return NULL;
@@ -68,7 +68,7 @@ SymmetricKey* SymmetricKey::DeriveKeyFromPassword(Algorithm algorithm,
if (!alg_id.get())
return NULL;
- ScopedPK11Slot slot(PK11_GetBestSlot(SEC_OID_PKCS5_PBKDF2, NULL));
+ ScopedPK11Slot slot(PK11_GetInternalSlot());
if (!slot.get())
return NULL;
@@ -93,7 +93,7 @@ SymmetricKey* SymmetricKey::Import(Algorithm algorithm,
const_cast<char *>(raw_key.data()));
key_item.len = raw_key.size();
- ScopedPK11Slot slot(PK11_GetBestSlot(cipher, NULL));
+ ScopedPK11Slot slot(PK11_GetInternalSlot());
if (!slot.get())
return NULL;
« no previous file with comments | « crypto/openpgp_symmetric_encryption.cc ('k') | net/http/des.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698