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

Side by Side Diff: chrome/browser/chromeos/settings/owner_key_util.cc

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 #include "chrome/browser/chromeos/settings/owner_key_util.h" 5 #include "chrome/browser/chromeos/settings/owner_key_util.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 reinterpret_cast<char*>(vector_as_array(output)), 63 reinterpret_cast<char*>(vector_as_array(output)),
64 safe_file_size); 64 safe_file_size);
65 return data_read == safe_file_size; 65 return data_read == safe_file_size;
66 } 66 }
67 67
68 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKey( 68 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKey(
69 const std::vector<uint8>& key) { 69 const std::vector<uint8>& key) {
70 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key); 70 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key);
71 } 71 }
72 72
73 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKeyInSlot(
74 const std::vector<uint8>& key,
75 PK11SlotInfo* slot) {
76 return crypto::RSAPrivateKey::FindFromPublicKeyInfoInSlot(key, slot);
77 }
78
73 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { 79 bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
74 return base::PathExists(key_file_); 80 return base::PathExists(key_file_);
75 } 81 }
76 82
77 } // namespace chromeos 83 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/owner_key_util.h ('k') | chrome/browser/chromeos/settings/session_manager_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698