Index: chrome/browser/chromeos/attestation/attestation_policy_observer.cc |
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc |
index 21664cde31c1188311062f51478bc9a4f81ce67d..517a34adb9bbbf0d146d1b4ad1e06861a4cd1dd0 100644 |
--- a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc |
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc |
@@ -143,7 +143,7 @@ void AttestationPolicyObserver::Start() { |
base::Bind(&AttestationPolicyObserver::GetNewCertificate, |
weak_factory_.GetWeakPtr()); |
cryptohome_client_->TpmAttestationDoesKeyExist( |
- CryptohomeClient::DEVICE_KEY, |
+ DEVICE_KEY, |
kEnterpriseMachineKey, |
base::Bind(DBusBoolRedirectCallback, on_does_exist, on_does_not_exist)); |
} |
@@ -151,7 +151,8 @@ void AttestationPolicyObserver::Start() { |
void AttestationPolicyObserver::GetNewCertificate() { |
// We can reuse the dbus callback handler logic. |
attestation_flow_->GetCertificate( |
- kEnterpriseMachineKey, |
+ ENTERPRISE_MACHINE_CERTIFICATE, |
+ true, // Force a new key to be generated. |
base::Bind(DBusStringCallback, |
base::Bind(&AttestationPolicyObserver::UploadCertificate, |
weak_factory_.GetWeakPtr()), |
@@ -160,7 +161,7 @@ void AttestationPolicyObserver::GetNewCertificate() { |
void AttestationPolicyObserver::GetExistingCertificate() { |
cryptohome_client_->TpmAttestationGetCertificate( |
- CryptohomeClient::DEVICE_KEY, |
+ DEVICE_KEY, |
kEnterpriseMachineKey, |
base::Bind(DBusStringCallback, |
base::Bind(&AttestationPolicyObserver::CheckCertificateExpiry, |