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

Unified Diff: crypto/ec_private_key.h

Issue 951753002: Remove dead code in ECPrivateKey. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sleevi comments Created 5 years, 10 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 | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key.h
diff --git a/crypto/ec_private_key.h b/crypto/ec_private_key.h
index 9fd8ffdfb62230ac2dac10afb56818baba96bd8e..a3d3d1ea02ac33ad9243e62cf9965cdc0a90c1c8 100644
--- a/crypto/ec_private_key.h
+++ b/crypto/ec_private_key.h
@@ -42,13 +42,6 @@ class CRYPTO_EXPORT ECPrivateKey {
// TODO(mattm): Add a curve parameter.
static ECPrivateKey* Create();
-#if defined(USE_NSS)
- // Creates a new random instance in |slot|. Can return NULL if initialization
- // fails. The created key is permanent and is not exportable in plaintext
- // form.
- static ECPrivateKey* CreateSensitive(PK11SlotInfo* slot);
-#endif
-
// Creates a new instance by importing an existing key pair.
// The key pair is given as an ASN.1-encoded PKCS #8 EncryptedPrivateKeyInfo
// block and an X.509 SubjectPublicKeyInfo block.
@@ -58,19 +51,6 @@ class CRYPTO_EXPORT ECPrivateKey {
const std::vector<uint8>& encrypted_private_key_info,
const std::vector<uint8>& subject_public_key_info);
-#if defined(USE_NSS)
- // Creates a new instance in |slot| by importing an existing key pair.
- // The key pair is given as an ASN.1-encoded PKCS #8 EncryptedPrivateKeyInfo
- // block and an X.509 SubjectPublicKeyInfo block.
- // This can return NULL if initialization fails. The created key is permanent
- // and is not exportable in plaintext form.
- static ECPrivateKey* CreateSensitiveFromEncryptedPrivateKeyInfo(
- PK11SlotInfo* slot,
- const std::string& password,
- const std::vector<uint8>& encrypted_private_key_info,
- const std::vector<uint8>& subject_public_key_info);
-#endif
-
#if !defined(USE_OPENSSL)
// Imports the key pair into |slot| and returns in |public_key| and |key|.
// Shortcut for code that needs to keep a reference directly to NSS types
@@ -122,25 +102,6 @@ class CRYPTO_EXPORT ECPrivateKey {
// Constructor is private. Use one of the Create*() methods above instead.
ECPrivateKey();
-#if !defined(USE_OPENSSL)
- // Shared helper for Create() and CreateSensitive().
- // TODO(cmasone): consider replacing |permanent| and |sensitive| with a
- // flags arg created by ORing together some enumerated values.
- static ECPrivateKey* CreateWithParams(PK11SlotInfo* slot,
- bool permanent,
- bool sensitive);
-
- // Shared helper for CreateFromEncryptedPrivateKeyInfo() and
- // CreateSensitiveFromEncryptedPrivateKeyInfo().
- static ECPrivateKey* CreateFromEncryptedPrivateKeyInfoWithParams(
- PK11SlotInfo* slot,
- const std::string& password,
- const std::vector<uint8>& encrypted_private_key_info,
- const std::vector<uint8>& subject_public_key_info,
- bool permanent,
- bool sensitive);
-#endif
-
#if defined(USE_OPENSSL)
EVP_PKEY* key_;
#else
« no previous file with comments | « no previous file | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698