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

Unified Diff: chrome/browser/chromeos/settings/owner_key_util.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/owner_key_util.h
diff --git a/chrome/browser/chromeos/settings/owner_key_util.h b/chrome/browser/chromeos/settings/owner_key_util.h
index 8e42a50da0ef8dc78e4932ab447f8f41110a020e..8522db76346475fb627a48a15da967d8f567aa9e 100644
--- a/chrome/browser/chromeos/settings/owner_key_util.h
+++ b/chrome/browser/chromeos/settings/owner_key_util.h
@@ -13,6 +13,7 @@
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+#include "net/cert/x509_util_nss.h"
namespace base {
class FilePath;
@@ -38,9 +39,19 @@ class OwnerKeyUtil : public base::RefCountedThreadSafe<OwnerKeyUtil> {
// Looks for the private key associated with |key| in the default slot,
// and returns it if it can be found. Returns NULL otherwise.
// Caller takes ownership.
+ //
+ // TODO (ygorshenin@): this function is deprecated and should be
+ // removed, see crbug.com/372316.
virtual crypto::RSAPrivateKey* FindPrivateKey(
const std::vector<uint8>& key) = 0;
+ // Looks for the private key associated with |key| in the |slot|
+ // and returns it if it can be found. Returns NULL otherwise.
+ // Caller takes ownership.
+ virtual crypto::RSAPrivateKey* FindPrivateKeyInSlot(
+ const std::vector<uint8>& key,
+ PK11SlotInfo* slot) = 0;
+
// Checks whether the public key is present in the file system.
virtual bool IsPublicKeyPresent() = 0;
@@ -63,6 +74,9 @@ class OwnerKeyUtilImpl : public OwnerKeyUtil {
virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE;
virtual crypto::RSAPrivateKey* FindPrivateKey(
const std::vector<uint8>& key) OVERRIDE;
+ virtual crypto::RSAPrivateKey* FindPrivateKeyInSlot(
+ const std::vector<uint8>& key,
+ PK11SlotInfo* slot) OVERRIDE;
virtual bool IsPublicKeyPresent() OVERRIDE;
protected:
« no previous file with comments | « chrome/browser/chromeos/settings/mock_owner_key_util.cc ('k') | chrome/browser/chromeos/settings/owner_key_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698