Index: crypto/ec_private_key.h |
diff --git a/crypto/ec_private_key.h b/crypto/ec_private_key.h |
index 0d287de9cc05949236f4c6bff5cf037b6a6f40d9..7fdccf31d41f73f5d2efd3b71134f8448cd21bf3 100644 |
--- a/crypto/ec_private_key.h |
+++ b/crypto/ec_private_key.h |
@@ -18,6 +18,7 @@ |
typedef struct evp_pkey_st EVP_PKEY; |
#else |
// Forward declaration. |
+typedef struct CERTSubjectPublicKeyInfoStr CERTSubjectPublicKeyInfo; |
typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey; |
typedef struct SECKEYPublicKeyStr SECKEYPublicKey; |
#endif |
@@ -65,6 +66,20 @@ class CRYPTO_EXPORT ECPrivateKey { |
const std::vector<uint8>& encrypted_private_key_info, |
const std::vector<uint8>& subject_public_key_info); |
+#if !defined(USE_OPENSSL) |
+ // Import the key pair and return in |public_key| and |key|. |
wtc
2011/12/02 22:06:59
Nit: Import => Imports
return => returns
mattm
2011/12/05 22:19:20
Done.
|
+ // Shortcut for code that need to keep a ref directly to NSS types without |
+ // having to create a ECPrivateKey object and make a copy of them. |
+ static bool ImportFromEncryptedPrivateKeyInfo( |
wtc
2011/12/02 22:06:59
DESIGN: this function probably should be moved to
mattm
2011/12/05 22:19:20
Added TODO.
|
+ const std::string& password, |
+ const std::vector<uint8>& encrypted_private_key_info, |
+ CERTSubjectPublicKeyInfo* decoded_spki, |
+ bool permanent, |
+ bool sensitive, |
+ SECKEYPrivateKey** key, |
+ SECKEYPublicKey** public_key); |
+#endif |
+ |
#if defined(USE_OPENSSL) |
EVP_PKEY* key() { return key_; } |
#else |