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

Unified Diff: crypto/rsa_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/hmac_nss.cc ('k') | crypto/rsa_private_key_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key.h
diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h
index 5a6dc8cf012ac4c2ad92f5cab9176a82bc8aaca1..0304a8c5322e55713c17b68133bcb2a7a573b75d 100644
--- a/crypto/rsa_private_key.h
+++ b/crypto/rsa_private_key.h
@@ -15,15 +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 PK11SlotInfoStr PK11SlotInfo;
-typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey;
-typedef struct SECKEYPublicKeyStr SECKEYPublicKey;
-#endif
namespace crypto {
@@ -43,23 +36,12 @@ class CRYPTO_EXPORT RSAPrivateKey {
static RSAPrivateKey* CreateFromPrivateKeyInfo(
const std::vector<uint8_t>& input);
-#if defined(USE_OPENSSL)
// Create a new instance from an existing EVP_PKEY, taking a
// reference to it. |key| must be an RSA key. Returns NULL on
// failure.
static RSAPrivateKey* CreateFromKey(EVP_PKEY* key);
-#else
- // Create a new instance by referencing an existing private key
- // structure. Does not import the key.
- static RSAPrivateKey* CreateFromKey(SECKEYPrivateKey* key);
-#endif
-#if defined(USE_OPENSSL)
EVP_PKEY* key() { return key_; }
-#else
- SECKEYPrivateKey* key() { return key_; }
- SECKEYPublicKey* public_key() { return public_key_; }
-#endif
// Creates a copy of the object.
RSAPrivateKey* Copy() const;
@@ -74,12 +56,7 @@ class CRYPTO_EXPORT RSAPrivateKey {
// Constructor is private. Use one of the Create*() methods above instead.
RSAPrivateKey();
-#if defined(USE_OPENSSL)
EVP_PKEY* key_;
-#else
- SECKEYPrivateKey* key_;
- SECKEYPublicKey* public_key_;
-#endif
DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
};
« no previous file with comments | « crypto/hmac_nss.cc ('k') | crypto/rsa_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698