Chromium Code Reviews| Index: crypto/rsa_private_key.h |
| diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h |
| index 4453845773454396985f74c410a599eaf024a268..9f862bf277969574c0672ce21c2efb346572d355 100644 |
| --- a/crypto/rsa_private_key.h |
| +++ b/crypto/rsa_private_key.h |
| @@ -206,6 +206,16 @@ class CRYPTO_EXPORT RSAPrivateKey { |
| // created in the key database. |
| static RSAPrivateKey* FindFromPublicKeyInfo( |
| const std::vector<uint8>& input); |
| + |
| + // Import an existing public key, and then search for the private |
| + // half in the slot specified by |slot|. The format of the public |
| + // key blob is is an X509 SubjectPublicKeyInfo block. This can return |
| + // NULL if initialization fails or the private key cannot be found. |
| + // The caller takes ownership of the returned object, but nothing new |
| + // is created in the slot. |
| + static RSAPrivateKey* FindFromPublicKeyInfoInSlot( |
| + const std::vector<uint8>& input, |
| + PK11SlotInfo* slot); |
| #endif |
| #if defined(USE_OPENSSL) |
| @@ -254,6 +264,14 @@ class CRYPTO_EXPORT RSAPrivateKey { |
| bool sensitive); |
| #endif |
| +#if defined(USE_NSS) |
| + // Import an existing public key. The format of the public key blob |
| + // is an X509 SubjectPublicKeyInfo block. This can return NULL if |
| + // initialization fails. The caller takes ownership of the returned |
| + // object. Note, that this method doesn't initialize the |key_| member. |
|
wtc
2014/05/20 16:46:39
Nit: the comma after "Note" is not necessary.
|
| + static RSAPrivateKey* InitPublicPart(const std::vector<uint8>& input); |
| +#endif |
| + |
| #if defined(USE_OPENSSL) |
| EVP_PKEY* key_; |
| #else |