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

Side by Side 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: Fixes, rebase. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CRYPTO_RSA_PRIVATE_KEY_H_ 5 #ifndef CRYPTO_RSA_PRIVATE_KEY_H_
6 #define CRYPTO_RSA_PRIVATE_KEY_H_ 6 #define CRYPTO_RSA_PRIVATE_KEY_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <list> 10 #include <list>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 static RSAPrivateKey* CreateFromKey(SECKEYPrivateKey* key); 199 static RSAPrivateKey* CreateFromKey(SECKEYPrivateKey* key);
200 200
201 // Import an existing public key, and then search for the private 201 // Import an existing public key, and then search for the private
202 // half in the key database. The format of the public key blob is is 202 // half in the key database. The format of the public key blob is is
203 // an X509 SubjectPublicKeyInfo block. This can return NULL if 203 // an X509 SubjectPublicKeyInfo block. This can return NULL if
204 // initialization fails or the private key cannot be found. The 204 // initialization fails or the private key cannot be found. The
205 // caller takes ownership of the returned object, but nothing new is 205 // caller takes ownership of the returned object, but nothing new is
206 // created in the key database. 206 // created in the key database.
207 static RSAPrivateKey* FindFromPublicKeyInfo( 207 static RSAPrivateKey* FindFromPublicKeyInfo(
208 const std::vector<uint8>& input); 208 const std::vector<uint8>& input);
209
210 // Import an existing public key, and then search for the private
211 // half in a |slot|. The format of the public key blob is is
wtc 2014/05/16 15:06:36 1. Nit: either just "in |slot|", or "in the slot s
ygorshenin1 2014/05/19 09:43:50 Done.
212 // an X509 SubjectPublicKeyInfo block. This can return NULL if
213 // initialization fails or the private key cannot be found. The
214 // caller takes ownership of the returned object, but nothing new is
215 // created in the key database.
wtc 2014/05/16 15:06:36 Nit: the key database => |slot|
ygorshenin1 2014/05/19 09:43:50 Done.
216 static RSAPrivateKey* FindFromPublicKeyInfoInSlot(
217 const std::vector<uint8>& input,
218 PK11SlotInfo* slot);
209 #endif 219 #endif
210 220
211 #if defined(USE_OPENSSL) 221 #if defined(USE_OPENSSL)
212 EVP_PKEY* key() { return key_; } 222 EVP_PKEY* key() { return key_; }
213 #else 223 #else
214 SECKEYPrivateKey* key() { return key_; } 224 SECKEYPrivateKey* key() { return key_; }
215 SECKEYPublicKey* public_key() { return public_key_; } 225 SECKEYPublicKey* public_key() { return public_key_; }
216 #endif 226 #endif
217 227
218 // Creates a copy of the object. 228 // Creates a copy of the object.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 SECKEYPrivateKey* key_; 270 SECKEYPrivateKey* key_;
261 SECKEYPublicKey* public_key_; 271 SECKEYPublicKey* public_key_;
262 #endif 272 #endif
263 273
264 DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey); 274 DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
265 }; 275 };
266 276
267 } // namespace crypto 277 } // namespace crypto
268 278
269 #endif // CRYPTO_RSA_PRIVATE_KEY_H_ 279 #endif // CRYPTO_RSA_PRIVATE_KEY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698