| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/easy_unlock/easy_unlock_tpm_key_manager.
h" | 5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.
h" |
| 6 | 6 |
| 7 #include <cryptohi.h> | 7 #include <cryptohi.h> |
| 8 #include <keyhi.h> | 8 #include <keyhi.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/base64.h" | 12 #include "base/base64.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/prefs/pref_registry_simple.h" | |
| 18 #include "base/prefs/pref_service.h" | |
| 19 #include "base/prefs/scoped_user_pref_update.h" | |
| 20 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
| 21 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
| 22 #include "base/threading/worker_pool.h" | 19 #include "base/threading/worker_pool.h" |
| 23 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 24 #include "base/values.h" | 21 #include "base/values.h" |
| 25 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 24 #include "components/prefs/pref_registry_simple.h" |
| 25 #include "components/prefs/pref_service.h" |
| 26 #include "components/prefs/scoped_user_pref_update.h" |
| 27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 28 #include "crypto/nss_key_util.h" | 28 #include "crypto/nss_key_util.h" |
| 29 #include "crypto/nss_util_internal.h" | 29 #include "crypto/nss_util_internal.h" |
| 30 #include "crypto/scoped_nss_types.h" | 30 #include "crypto/scoped_nss_types.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // The modulus length for RSA keys used by easy sign-in. | 34 // The modulus length for RSA keys used by easy sign-in. |
| 35 const int kKeyModulusLength = 2048; | 35 const int kKeyModulusLength = 2048; |
| 36 | 36 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 // If key creation failed, reset the state machine. | 391 // If key creation failed, reset the state machine. |
| 392 create_tpm_key_state_ = | 392 create_tpm_key_state_ = |
| 393 public_key.empty() ? CREATE_TPM_KEY_NOT_STARTED : CREATE_TPM_KEY_DONE; | 393 public_key.empty() ? CREATE_TPM_KEY_NOT_STARTED : CREATE_TPM_KEY_DONE; |
| 394 } | 394 } |
| 395 | 395 |
| 396 void EasyUnlockTpmKeyManager::OnDataSigned( | 396 void EasyUnlockTpmKeyManager::OnDataSigned( |
| 397 const base::Callback<void(const std::string&)>& callback, | 397 const base::Callback<void(const std::string&)>& callback, |
| 398 const std::string& signature) { | 398 const std::string& signature) { |
| 399 callback.Run(signature); | 399 callback.Run(signature); |
| 400 } | 400 } |
| OLD | NEW |