| Index: crypto/rsa_private_key.h
|
| diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h
|
| index b8ce1690f1689c14838845623aa22aba4b7116ea..6f115964848ef009e473aeaed9705796adc0c210 100644
|
| --- a/crypto/rsa_private_key.h
|
| +++ b/crypto/rsa_private_key.h
|
| @@ -7,32 +7,26 @@
|
|
|
| #include "build/build_config.h"
|
|
|
| -#if defined(USE_OPENSSL)
|
| -// Forward declaration for openssl/*.h
|
| -typedef struct evp_pkey_st EVP_PKEY;
|
| -#elif defined(USE_NSS)
|
| -// Forward declaration.
|
| -typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey;
|
| -typedef struct SECKEYPublicKeyStr SECKEYPublicKey;
|
| -#elif defined(OS_IOS)
|
| -#include <Security/Security.h>
|
| -#elif defined(OS_MACOSX)
|
| -#include <Security/cssm.h>
|
| -#endif
|
| -
|
| #include <list>
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "crypto/crypto_export.h"
|
|
|
| -#if defined(OS_WIN)
|
| -#include "crypto/scoped_capi_types.h"
|
| -#endif
|
| #if defined(USE_NSS)
|
| #include "base/gtest_prod_util.h"
|
| #endif
|
|
|
| +#if defined(USE_OPENSSL)
|
| +// Forward declaration for openssl/*.h
|
| +typedef struct evp_pkey_st EVP_PKEY;
|
| +#elif defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
|
| +// Forward declaration.
|
| +typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey;
|
| +typedef struct SECKEYPublicKeyStr SECKEYPublicKey;
|
| +#endif
|
| +
|
| +
|
| namespace crypto {
|
|
|
| // Used internally by RSAPrivateKey for serializing and deserializing
|
| @@ -200,7 +194,7 @@ class CRYPTO_EXPORT RSAPrivateKey {
|
| static RSAPrivateKey* CreateSensitiveFromPrivateKeyInfo(
|
| const std::vector<uint8>& input);
|
|
|
| -#if defined(USE_NSS)
|
| +#if defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
|
| // Create a new instance by referencing an existing private key
|
| // structure. Does not import the key.
|
| static RSAPrivateKey* CreateFromKey(SECKEYPrivateKey* key);
|
| @@ -219,18 +213,9 @@ class CRYPTO_EXPORT RSAPrivateKey {
|
|
|
| #if defined(USE_OPENSSL)
|
| EVP_PKEY* key() { return key_; }
|
| -#elif defined(USE_NSS)
|
| +#elif defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
|
| SECKEYPrivateKey* key() { return key_; }
|
| SECKEYPublicKey* public_key() { return public_key_; }
|
| -#elif defined(OS_WIN)
|
| - HCRYPTPROV provider() { return provider_; }
|
| - HCRYPTKEY key() { return key_; }
|
| -#elif defined(OS_IOS)
|
| - SecKeyRef key() { return key_; }
|
| - SecKeyRef public_key() { return public_key_; }
|
| -#elif defined(OS_MACOSX)
|
| - CSSM_KEY_PTR key() { return &key_; }
|
| - CSSM_KEY_PTR public_key() { return &public_key_; }
|
| #endif
|
|
|
| // Creates a copy of the object.
|
| @@ -266,20 +251,9 @@ class CRYPTO_EXPORT RSAPrivateKey {
|
|
|
| #if defined(USE_OPENSSL)
|
| EVP_PKEY* key_;
|
| -#elif defined(USE_NSS)
|
| +#elif defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
|
| SECKEYPrivateKey* key_;
|
| SECKEYPublicKey* public_key_;
|
| -#elif defined(OS_WIN)
|
| - bool InitProvider();
|
| -
|
| - ScopedHCRYPTPROV provider_;
|
| - ScopedHCRYPTKEY key_;
|
| -#elif defined(OS_IOS)
|
| - SecKeyRef key_;
|
| - SecKeyRef public_key_;
|
| -#elif defined(OS_MACOSX)
|
| - CSSM_KEY key_;
|
| - CSSM_KEY public_key_;
|
| #endif
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
|
|
|