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

Unified Diff: base/crypto/rsa_private_key.h

Issue 5047003: Implements RSAPrivateKey for openssl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git diff trunk Created 10 years, 1 month 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 | base/crypto/rsa_private_key_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/crypto/rsa_private_key.h
diff --git a/base/crypto/rsa_private_key.h b/base/crypto/rsa_private_key.h
index 4492c3d3f91f83fb75240e5a47abc602a2a43b9f..ea5daac5fcfdd4da73dce8dac5c34681220e3a8f 100644
--- a/base/crypto/rsa_private_key.h
+++ b/base/crypto/rsa_private_key.h
@@ -8,7 +8,10 @@
#include "build/build_config.h"
-#if defined(USE_NSS)
+#if defined(USE_OPENSSL)
+// Forward declaration for openssl/*.h
+typedef struct evp_pkey_st EVP_PKEY;
+#elif defined(USE_NSS)
// Forward declaration.
struct SECKEYPrivateKeyStr;
struct SECKEYPublicKeyStr;
@@ -216,7 +219,7 @@ class RSAPrivateKey {
// Exports the public key to an X509 SubjectPublicKeyInfo block.
bool ExportPublicKey(std::vector<uint8>* output);
-private:
+ private:
#if defined(USE_NSS)
FRIEND_TEST_ALL_PREFIXES(RSAPrivateKeyNSSTest, FindFromPublicKey);
FRIEND_TEST_ALL_PREFIXES(RSAPrivateKeyNSSTest, FailedFindFromPublicKey);
@@ -238,7 +241,9 @@ private:
static RSAPrivateKey* CreateFromPrivateKeyInfoWithParams(
const std::vector<uint8>& input, bool permanent, bool sensitive);
-#if defined(USE_NSS)
+#if defined(USE_OPENSSL)
+ EVP_PKEY* key_;
+#elif defined(USE_NSS)
SECKEYPrivateKeyStr* key_;
SECKEYPublicKeyStr* public_key_;
#elif defined(OS_WIN)
« no previous file with comments | « no previous file | base/crypto/rsa_private_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698