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

Unified Diff: crypto/rsa_private_key_nss.cc

Issue 17447009: On NSS, treat non-permanent RSA private keys as ephemeral (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_nss.cc
diff --git a/crypto/rsa_private_key_nss.cc b/crypto/rsa_private_key_nss.cc
index 977460ff92dbfec5fdcbf0a2733f520767873532..15c82fca424e79b13f0f432862322814e6df3da5 100644
--- a/crypto/rsa_private_key_nss.cc
+++ b/crypto/rsa_private_key_nss.cc
@@ -207,7 +207,8 @@ RSAPrivateKey* RSAPrivateKey::CreateWithParams(uint16 num_bits,
scoped_ptr<RSAPrivateKey> result(new RSAPrivateKey);
- ScopedPK11Slot slot(GetPrivateNSSKeySlot());
+ ScopedPK11Slot slot(permanent ? GetPrivateNSSKeySlot() :
+ PK11_GetInternalKeySlot());
wtc 2013/06/20 19:57:37 I think we should use GetPublicNSSKeySlot() instea
Ryan Sleevi 2013/06/20 20:01:50 This was intentional, because I do not want to use
if (!slot.get())
return NULL;
@@ -237,7 +238,8 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfoWithParams(
scoped_ptr<RSAPrivateKey> result(new RSAPrivateKey);
- ScopedPK11Slot slot(GetPrivateNSSKeySlot());
+ ScopedPK11Slot slot(permanent ? GetPrivateNSSKeySlot() :
+ PK11_GetInternalKeySlot());
if (!slot.get())
return NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698