Index: chromeos/dbus/cryptohome_client.cc |
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc |
index 7bcbc4a338322360ecf7c93e424f25c5c2684537..286533d4278f9e885ca7cd6894f952fd7c23b1c9 100644 |
--- a/chromeos/dbus/cryptohome_client.cc |
+++ b/chromeos/dbus/cryptohome_client.cc |
@@ -412,9 +412,11 @@ class CryptohomeClientImpl : public CryptohomeClient { |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeAsyncTpmAttestationCreateCertRequest); |
dbus::MessageWriter writer(&method_call); |
- bool include_stable_id = (options & INCLUDE_STABLE_ID); |
+ bool include_stable_id = |
+ (options & attestation::CERTIFICATE_INCLUDE_STABLE_ID); |
writer.AppendBool(include_stable_id); |
- bool include_device_state = (options & INCLUDE_DEVICE_STATE); |
+ bool include_device_state = |
+ (options & attestation::CERTIFICATE_INCLUDE_DEVICE_STATE); |
writer.AppendBool(include_device_state); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, |
@@ -425,7 +427,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void AsyncTpmAttestationFinishCertRequest( |
const std::string& pca_response, |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const AsyncMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
@@ -435,7 +437,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
writer.AppendArrayOfBytes( |
reinterpret_cast<const uint8*>(pca_response.data()), |
pca_response.size()); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
@@ -446,14 +448,14 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationDoesKeyExist( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const BoolDBusMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationDoesKeyExist); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
CallBoolMethod(&method_call, callback); |
@@ -461,14 +463,14 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationGetCertificate( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationGetCertificate); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
@@ -479,14 +481,14 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationGetPublicKey( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationGetPublicKey); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
@@ -497,14 +499,14 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationRegisterKey( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const AsyncMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationRegisterKey); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
@@ -515,24 +517,25 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationSignEnterpriseChallenge( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& domain, |
const std::string& device_id, |
- AttestationChallengeOptions options, |
+ attestation::AttestationChallengeOptions options, |
const std::string& challenge, |
const AsyncMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationSignEnterpriseChallenge); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
writer.AppendString(domain); |
writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(device_id.data()), |
device_id.size()); |
- bool include_signed_public_key = (options & INCLUDE_SIGNED_PUBLIC_KEY); |
+ bool include_signed_public_key = |
+ (options & attestation::CHALLENGE_INCLUDE_SIGNED_PUBLIC_KEY); |
writer.AppendBool(include_signed_public_key); |
writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()), |
challenge.size()); |
@@ -544,7 +547,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationSignSimpleChallenge( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& challenge, |
const AsyncMethodCallback& callback) OVERRIDE { |
@@ -552,7 +555,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationSignEnterpriseChallenge); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()), |
@@ -565,14 +568,14 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationGetKeyPayload( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
dbus::MethodCall method_call( |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationGetKeyPayload); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
@@ -583,7 +586,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationSetKeyPayload( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& payload, |
const BoolDBusMethodCallback& callback) OVERRIDE { |
@@ -591,7 +594,7 @@ class CryptohomeClientImpl : public CryptohomeClient { |
cryptohome::kCryptohomeInterface, |
cryptohome::kCryptohomeTpmAttestationSetKeyPayload); |
dbus::MessageWriter writer(&method_call); |
- bool is_user_specific = (key_type == USER_KEY); |
+ bool is_user_specific = (key_type == attestation::KEY_USER); |
writer.AppendBool(is_user_specific); |
writer.AppendString(key_name); |
writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(payload.data()), |
@@ -1043,7 +1046,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void AsyncTpmAttestationFinishCertRequest( |
const std::string& pca_response, |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const AsyncMethodCallback& callback) OVERRIDE { |
ReturnAsyncMethodResult(callback, true); |
@@ -1051,7 +1054,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationDoesKeyExist( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const BoolDBusMethodCallback& callback) OVERRIDE { |
MessageLoop::current()->PostTask( |
@@ -1061,7 +1064,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationGetCertificate( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
MessageLoop::current()->PostTask( |
@@ -1071,7 +1074,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationGetPublicKey( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
MessageLoop::current()->PostTask( |
@@ -1081,7 +1084,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationRegisterKey( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const AsyncMethodCallback& callback) OVERRIDE { |
ReturnAsyncMethodResult(callback, true); |
@@ -1089,11 +1092,11 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationSignEnterpriseChallenge( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& domain, |
const std::string& device_id, |
- AttestationChallengeOptions options, |
+ attestation::AttestationChallengeOptions options, |
const std::string& challenge, |
const AsyncMethodCallback& callback) OVERRIDE { |
ReturnAsyncMethodResult(callback, true); |
@@ -1101,7 +1104,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
// CryptohomeClient override. |
virtual void TpmAttestationSignSimpleChallenge( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& challenge, |
const AsyncMethodCallback& callback) OVERRIDE { |
@@ -1109,7 +1112,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
} |
virtual void TpmAttestationGetKeyPayload( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const DataMethodCallback& callback) OVERRIDE { |
MessageLoop::current()->PostTask( |
@@ -1118,7 +1121,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { |
} |
virtual void TpmAttestationSetKeyPayload( |
- AttestationKeyType key_type, |
+ attestation::AttestationKeyType key_type, |
const std::string& key_name, |
const std::string& payload, |
const BoolDBusMethodCallback& callback) OVERRIDE { |