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

Unified Diff: crypto/ec_private_key.h

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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/curve25519_nss.cc ('k') | 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 1ee4aca8b0ed2128fe76f4251c4a5dc340395de3..6ebe21d01028c73b574ca1a46d903db82f96bd18 100644
--- a/crypto/ec_private_key.h
+++ b/crypto/ec_private_key.h
@@ -15,16 +15,8 @@
#include "build/build_config.h"
#include "crypto/crypto_export.h"
-#if defined(USE_OPENSSL)
// Forward declaration for openssl/*.h
typedef struct evp_pkey_st EVP_PKEY;
-#else
-// Forward declaration.
-typedef struct CERTSubjectPublicKeyInfoStr CERTSubjectPublicKeyInfo;
-typedef struct PK11SlotInfoStr PK11SlotInfo;
-typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey;
-typedef struct SECKEYPublicKeyStr SECKEYPublicKey;
-#endif
namespace crypto {
@@ -51,32 +43,10 @@ class CRYPTO_EXPORT ECPrivateKey {
const std::vector<uint8_t>& encrypted_private_key_info,
const std::vector<uint8_t>& subject_public_key_info);
-#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
- // without having to create a ECPrivateKey object and make a copy of them.
- // TODO(mattm): move this function to some NSS util file.
- static bool ImportFromEncryptedPrivateKeyInfo(
- PK11SlotInfo* slot,
- const std::string& password,
- const uint8_t* encrypted_private_key_info,
- size_t encrypted_private_key_info_len,
- CERTSubjectPublicKeyInfo* decoded_spki,
- bool permanent,
- bool sensitive,
- SECKEYPrivateKey** key,
- SECKEYPublicKey** public_key);
-#endif
-
// Returns a copy of the object.
ECPrivateKey* Copy() const;
-#if defined(USE_OPENSSL)
EVP_PKEY* key() { return key_; }
-#else
- SECKEYPrivateKey* key() { return key_; }
- SECKEYPublicKey* public_key() { return public_key_; }
-#endif
// Exports the private key as an ASN.1-encoded PKCS #8 EncryptedPrivateKeyInfo
// block and the public key as an X.509 SubjectPublicKeyInfo block.
@@ -101,12 +71,7 @@ class CRYPTO_EXPORT ECPrivateKey {
// Constructor is private. Use one of the Create*() methods above instead.
ECPrivateKey();
-#if defined(USE_OPENSSL)
EVP_PKEY* key_;
-#else
- SECKEYPrivateKey* key_;
- SECKEYPublicKey* public_key_;
-#endif
DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
};
« no previous file with comments | « crypto/curve25519_nss.cc ('k') | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698