diff options
author | ygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-21 01:50:25 +0000 |
---|---|---|
committer | ygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-21 01:50:25 +0000 |
commit | 196e53e84cfd2533fe8a195fafb7a46e41440c00 (patch) | |
tree | 98a343569dc922e682a720c5f0f5b2aa8e8c2d7f /crypto/rsa_private_key.h | |
parent | f571bc032bdfab736cb212b56e83dcb95ec5d7c6 (diff) | |
download | chromium_src-196e53e84cfd2533fe8a195fafb7a46e41440c00.zip chromium_src-196e53e84cfd2533fe8a195fafb7a46e41440c00.tar.gz chromium_src-196e53e84cfd2533fe8a195fafb7a46e41440c00.tar.bz2 |
Implemented profile-aware owner key loading.
BUG=230018
TEST=manual
Review URL: https://codereview.chromium.org/270663002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271802 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/rsa_private_key.h')
-rw-r--r-- | crypto/rsa_private_key.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h index 4453845..cb19067 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. + static RSAPrivateKey* InitPublicPart(const std::vector<uint8>& input); +#endif + #if defined(USE_OPENSSL) EVP_PKEY* key_; #else |