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

Unified Diff: crypto/rsa_private_key.h

Issue 270663002: Implemented profile-aware owner key loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests, used GetPublicSlotForChromeOSUSer. Created 6 years, 7 months 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
Index: crypto/rsa_private_key.h
diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h
index 4453845773454396985f74c410a599eaf024a268..da064f968859f1918bfdd955f150e675603e9f60 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 key slot.
wtc 2014/05/19 17:23:54 Nit: I think it's better to say in |slot| or i
ygorshenin1 2014/05/20 07:53:50 Done.
+ 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 is an X509 SubjectPublicKeyInfo block. This can return NULL if
wtc 2014/05/19 17:23:54 Nit: is is => is
ygorshenin1 2014/05/20 07:53:50 Done.
+ // initialization fails. The caller takes ownership of the returned
+ // object, but nothing new is created in the key slot.
wtc 2014/05/19 17:23:54 Nit: since this function doesn't have a |slot| par
ygorshenin1 2014/05/20 07:53:50 Done.
+ static RSAPrivateKey* InitPublicPart(const std::vector<uint8>& input);
+#endif
+
#if defined(USE_OPENSSL)
EVP_PKEY* key_;
#else

Powered by Google App Engine
This is Rietveld 408576698