Commit 6d81ed25 authored by Leo Lai's avatar Leo Lai Committed by Commit Bot

deploy AttestationFlowIntegrated

This CL deploys the usage of platform side of attestation flow because
attestation service at platform side knows better about the stat
machines of the enrollment.

BUG=b:158955123

Change-Id: I902f8bfc43da9cb2cae0e65a0d244c31ce986dfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297061
Commit-Queue: Leo Lai <cylai@google.com>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789858}
parent 9a6944e0
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/chromeos/attestation/attestation_ca_client.h" #include "chrome/browser/chromeos/attestation/attestation_ca_client.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/attestation/attestation_flow_integrated.h"
#include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/cryptohome/cryptohome_client.h" #include "chromeos/dbus/cryptohome/cryptohome_client.h"
...@@ -94,11 +95,7 @@ void EnrollmentCertificateUploaderImpl::Start() { ...@@ -94,11 +95,7 @@ void EnrollmentCertificateUploaderImpl::Start() {
cryptohome_client_ = CryptohomeClient::Get(); cryptohome_client_ = CryptohomeClient::Get();
if (!attestation_flow_) { if (!attestation_flow_) {
std::unique_ptr<ServerProxy> attestation_ca_client( default_attestation_flow_ = std::make_unique<AttestationFlowIntegrated>();
new AttestationCAClient());
default_attestation_flow_.reset(new AttestationFlow(
cryptohome::AsyncMethodCaller::GetInstance(), cryptohome_client_,
std::move(attestation_ca_client)));
attestation_flow_ = default_attestation_flow_.get(); attestation_flow_ = default_attestation_flow_.get();
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "chrome/browser/chromeos/attestation/attestation_key_payload.pb.h" #include "chrome/browser/chromeos/attestation/attestation_key_payload.pb.h"
#include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/attestation/attestation_flow_integrated.h"
#include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/cryptohome/cryptohome_client.h" #include "chromeos/dbus/cryptohome/cryptohome_client.h"
...@@ -163,11 +164,7 @@ void MachineCertificateUploaderImpl::Start() { ...@@ -163,11 +164,7 @@ void MachineCertificateUploaderImpl::Start() {
cryptohome_client_ = CryptohomeClient::Get(); cryptohome_client_ = CryptohomeClient::Get();
if (!attestation_flow_) { if (!attestation_flow_) {
std::unique_ptr<ServerProxy> attestation_ca_client( default_attestation_flow_ = std::make_unique<AttestationFlowIntegrated>();
new AttestationCAClient());
default_attestation_flow_.reset(new AttestationFlow(
cryptohome::AsyncMethodCaller::GetInstance(), cryptohome_client_,
std::move(attestation_ca_client)));
attestation_flow_ = default_attestation_flow_.get(); attestation_flow_ = default_attestation_flow_.get();
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "chrome/browser/permissions/permission_manager_factory.h" #include "chrome/browser/permissions/permission_manager_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/attestation/attestation_flow_integrated.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
...@@ -152,9 +153,7 @@ PlatformVerificationFlow::PlatformVerificationFlow() ...@@ -152,9 +153,7 @@ PlatformVerificationFlow::PlatformVerificationFlow()
delegate_(NULL), delegate_(NULL),
timeout_delay_(base::TimeDelta::FromSeconds(kTimeoutInSeconds)) { timeout_delay_(base::TimeDelta::FromSeconds(kTimeoutInSeconds)) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
std::unique_ptr<ServerProxy> attestation_ca_client(new AttestationCAClient()); default_attestation_flow_ = std::make_unique<AttestationFlowIntegrated>();
default_attestation_flow_.reset(new AttestationFlow(
async_caller_, cryptohome_client_, std::move(attestation_ca_client)));
attestation_flow_ = default_attestation_flow_.get(); attestation_flow_ = default_attestation_flow_.get();
default_delegate_.reset(new DefaultDelegate()); default_delegate_.reset(new DefaultDelegate());
delegate_ = default_delegate_.get(); delegate_ = default_delegate_.get();
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "chrome/browser/extensions/chrome_extension_function_details.h" #include "chrome/browser/extensions/chrome_extension_function_details.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chromeos/attestation/attestation_flow_integrated.h"
#include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/constants/attestation_constants.h" #include "chromeos/dbus/constants/attestation_constants.h"
...@@ -115,10 +116,7 @@ std::string GetKeyNameWithDefault(AttestationKeyType key_type, ...@@ -115,10 +116,7 @@ std::string GetKeyNameWithDefault(AttestationKeyType key_type,
} // namespace } // namespace
TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl() TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl()
: default_attestation_flow_(std::make_unique<AttestationFlow>( : default_attestation_flow_(std::make_unique<AttestationFlowIntegrated>()),
cryptohome::AsyncMethodCaller::GetInstance(),
CryptohomeClient::Get(),
std::make_unique<AttestationCAClient>())),
attestation_flow_(default_attestation_flow_.get()) {} attestation_flow_(default_attestation_flow_.get()) {}
TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl( TpmChallengeKeySubtleImpl::TpmChallengeKeySubtleImpl(
......
...@@ -60,11 +60,11 @@ ...@@ -60,11 +60,11 @@
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/attestation/attestation_flow_integrated.h"
#include "chromeos/constants/chromeos_paths.h" #include "chromeos/constants/chromeos_paths.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/system_salt_getter.h" #include "chromeos/cryptohome/system_salt_getter.h"
#include "chromeos/dbus/cryptohome/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager/session_manager_client.h" #include "chromeos/dbus/session_manager/session_manager_client.h"
#include "chromeos/dbus/upstart/upstart_client.h" #include "chromeos/dbus/upstart/upstart_client.h"
...@@ -518,10 +518,7 @@ void BrowserPolicyConnectorChromeOS::RestartDeviceCloudPolicyInitializer() { ...@@ -518,10 +518,7 @@ void BrowserPolicyConnectorChromeOS::RestartDeviceCloudPolicyInitializer() {
std::unique_ptr<chromeos::attestation::AttestationFlow> std::unique_ptr<chromeos::attestation::AttestationFlow>
BrowserPolicyConnectorChromeOS::CreateAttestationFlow() { BrowserPolicyConnectorChromeOS::CreateAttestationFlow() {
return std::make_unique<chromeos::attestation::AttestationFlow>( return std::make_unique<chromeos::attestation::AttestationFlowIntegrated>();
cryptohome::AsyncMethodCaller::GetInstance(),
chromeos::CryptohomeClient::Get(),
std::make_unique<chromeos::attestation::AttestationCAClient>());
} }
chromeos::AffiliationIDSet chromeos::AffiliationIDSet
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment