OLD | NEW |
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/login/owner_key_utils.h" | 5 #include "chrome/browser/chromeos/settings/owner_key_utils.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 15 #include "chrome/common/extensions/extension_constants.h" |
14 #include "crypto/rsa_private_key.h" | 16 #include "crypto/rsa_private_key.h" |
15 #include "crypto/signature_creator.h" | 17 #include "crypto/signature_creator.h" |
16 #include "crypto/signature_verifier.h" | 18 #include "crypto/signature_verifier.h" |
17 #include "chrome/browser/chromeos/cros/cros_library.h" | |
18 #include "chrome/common/extensions/extension_constants.h" | |
19 | 19 |
20 using extension_misc::kSignatureAlgorithm; | 20 using extension_misc::kSignatureAlgorithm; |
21 | 21 |
22 namespace chromeos { | 22 namespace chromeos { |
23 | 23 |
24 /////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////// |
25 // OwnerKeyUtils | 25 // OwnerKeyUtils |
26 | 26 |
27 // static | 27 // static |
28 OwnerKeyUtils::Factory* OwnerKeyUtils::factory_ = NULL; | 28 OwnerKeyUtils::Factory* OwnerKeyUtils::factory_ = NULL; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 crypto::RSAPrivateKey* OwnerKeyUtilsImpl::FindPrivateKey( | 166 crypto::RSAPrivateKey* OwnerKeyUtilsImpl::FindPrivateKey( |
167 const std::vector<uint8>& key) { | 167 const std::vector<uint8>& key) { |
168 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key); | 168 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key); |
169 } | 169 } |
170 | 170 |
171 FilePath OwnerKeyUtilsImpl::GetOwnerKeyFilePath() { | 171 FilePath OwnerKeyUtilsImpl::GetOwnerKeyFilePath() { |
172 return FilePath(OwnerKeyUtilsImpl::kOwnerKeyFile); | 172 return FilePath(OwnerKeyUtilsImpl::kOwnerKeyFile); |
173 } | 173 } |
174 | 174 |
175 } // namespace chromeos | 175 } // namespace chromeos |
OLD | NEW |