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

Unified Diff: crypto/ec_private_key_nss.cc

Issue 10700099: NSS Channel ID: don't check ECC support on every socket creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move/update the comment Created 8 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
Index: crypto/ec_private_key_nss.cc
diff --git a/crypto/ec_private_key_nss.cc b/crypto/ec_private_key_nss.cc
index c6c476325bb7b52ed7ee4ff0013e6346e2244559..32e4617788517f060f0dfe01cbc2b70f6d355815 100644
--- a/crypto/ec_private_key_nss.cc
+++ b/crypto/ec_private_key_nss.cc
@@ -114,7 +114,7 @@ bool ECPrivateKey::ImportFromEncryptedPrivateKeyInfo(
bool sensitive,
SECKEYPrivateKey** key,
SECKEYPublicKey** public_key) {
- ScopedPK11Slot slot(GetPublicNSSKeySlot());
+ ScopedPK11Slot slot(GetKeySlot());
if (!slot.get())
return false;
@@ -174,6 +174,11 @@ bool ECPrivateKey::ImportFromEncryptedPrivateKeyInfo(
return true;
}
+// static
+PK11SlotInfo* ECPrivateKey::GetKeySlot() {
+ return GetPublicNSSKeySlot();
+}
+
bool ECPrivateKey::ExportEncryptedPrivateKey(
const std::string& password,
int iterations,
@@ -247,7 +252,7 @@ ECPrivateKey* ECPrivateKey::CreateWithParams(bool permanent,
scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
- ScopedPK11Slot slot(GetPrivateNSSKeySlot());
+ ScopedPK11Slot slot(GetKeySlot());
if (!slot.get())
return NULL;

Powered by Google App Engine
This is Rietveld 408576698