diff options
author | dkrahn@chromium.org <dkrahn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-21 19:57:24 +0000 |
---|---|---|
committer | dkrahn@chromium.org <dkrahn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-21 19:57:24 +0000 |
commit | 1260076a7a6991acfead415cc53e86c5e45c04be (patch) | |
tree | b400f75810929de8bf32db228699d17f34e9e0cd /chromeos/dbus | |
parent | 903a1f44903ea145b9698f26cac6fe0999fa7a6a (diff) | |
download | chromium_src-1260076a7a6991acfead415cc53e86c5e45c04be.zip chromium_src-1260076a7a6991acfead415cc53e86c5e45c04be.tar.gz chromium_src-1260076a7a6991acfead415cc53e86c5e45c04be.tar.bz2 |
Added multi-profile support for attestation on chromeos.
All certified keys and certificates will be associated with the correct
profile when multiple profiles are used.
BUG=chromium:205206
TEST=unit, manual
Review URL: https://codereview.chromium.org/27044004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus')
-rw-r--r-- | chromeos/dbus/cryptohome_client.cc | 40 | ||||
-rw-r--r-- | chromeos/dbus/cryptohome_client.h | 50 | ||||
-rw-r--r-- | chromeos/dbus/fake_cryptohome_client.cc | 11 | ||||
-rw-r--r-- | chromeos/dbus/fake_cryptohome_client.h | 11 | ||||
-rw-r--r-- | chromeos/dbus/mock_cryptohome_client.h | 29 |
5 files changed, 108 insertions, 33 deletions
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc index e862ffb..79a6561 100644 --- a/chromeos/dbus/cryptohome_client.cc +++ b/chromeos/dbus/cryptohome_client.cc @@ -464,7 +464,7 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void AsyncTpmAttestationCreateCertRequest( attestation::AttestationCertificateProfile certificate_profile, - const std::string& user_email, + const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( @@ -472,7 +472,7 @@ class CryptohomeClientImpl : public CryptohomeClient { cryptohome::kCryptohomeAsyncTpmAttestationCreateCertRequestByProfile); dbus::MessageWriter writer(&method_call); writer.AppendInt32(certificate_profile); - writer.AppendString(user_email); + writer.AppendString(user_id); writer.AppendString(request_origin); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, @@ -484,17 +484,19 @@ class CryptohomeClientImpl : public CryptohomeClient { virtual void AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeAsyncTpmAttestationFinishCertRequestOld); + cryptohome::kCryptohomeAsyncTpmAttestationFinishCertRequest); dbus::MessageWriter writer(&method_call); writer.AppendArrayOfBytes( reinterpret_cast<const uint8*>(pca_response.data()), pca_response.size()); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, @@ -505,14 +507,16 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationDoesKeyExistOld); + cryptohome::kCryptohomeTpmAttestationDoesKeyExist); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); CallBoolMethod(&method_call, callback); } @@ -520,14 +524,16 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationGetCertificateOld); + cryptohome::kCryptohomeTpmAttestationGetCertificate); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnDataMethod, @@ -538,14 +544,16 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationGetPublicKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationGetPublicKeyOld); + cryptohome::kCryptohomeTpmAttestationGetPublicKey); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnDataMethod, @@ -556,14 +564,16 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationRegisterKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationRegisterKeyOld); + cryptohome::kCryptohomeTpmAttestationRegisterKey); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall, @@ -574,6 +584,7 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& domain, const std::string& device_id, @@ -582,10 +593,11 @@ class CryptohomeClientImpl : public CryptohomeClient { const AsyncMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationSignEnterpriseChallengeOld); + cryptohome::kCryptohomeTpmAttestationSignEnterpriseChallenge); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); writer.AppendString(domain); writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(device_id.data()), @@ -604,15 +616,17 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationSignSimpleChallengeOld); + cryptohome::kCryptohomeTpmAttestationSignSimpleChallenge); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()), challenge.size()); @@ -625,14 +639,16 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationGetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationGetKeyPayloadOld); + cryptohome::kCryptohomeTpmAttestationGetKeyPayload); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&CryptohomeClientImpl::OnDataMethod, @@ -643,15 +659,17 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. virtual void TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback) OVERRIDE { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, - cryptohome::kCryptohomeTpmAttestationSetKeyPayloadOld); + cryptohome::kCryptohomeTpmAttestationSetKeyPayload); dbus::MessageWriter writer(&method_call); bool is_user_specific = (key_type == attestation::KEY_USER); writer.AppendBool(is_user_specific); + writer.AppendString(user_id); writer.AppendString(key_name); writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(payload.data()), payload.size()); diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h index f230d03..cc4b9d7 100644 --- a/chromeos/dbus/cryptohome_client.h +++ b/chromeos/dbus/cryptohome_client.h @@ -265,17 +265,17 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { const AsyncMethodCallback& callback) = 0; // Asynchronously creates an attestation certificate request according to - // |certificate_profile|. Some profiles require that the |user_email| of the + // |certificate_profile|. Some profiles require that the |user_id| of the // currently active user and an identifier of the |request_origin| be // provided. |callback| will be called when the dbus call completes. When // the operation completes, the AsyncCallStatusWithDataHandler signal handler // is called. The data that is sent with the signal is a certificate request // to be sent to the Privacy CA. The certificate request is completed by - // calling AsyncTpmAttestationFinishCertRequest. The |user_email| will not + // calling AsyncTpmAttestationFinishCertRequest. The |user_id| will not // be included in the certificate request for the Privacy CA. virtual void AsyncTpmAttestationCreateCertRequest( attestation::AttestationCertificateProfile certificate_profile, - const std::string& user_email, + const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback) = 0; @@ -285,34 +285,47 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // sent with the signal is a certificate chain in PEM format. |pca_response| // is the response to the certificate request emitted by the Privacy CA. // |key_type| determines whether the certified key is to be associated with - // the current user. |key_name| is a name for the key. + // the current user. |key_name| is a name for the key. If |key_type| is + // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. + // For normal GAIA users the |user_id| is a canonical email address. virtual void AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) = 0; // Checks if an attestation key already exists. If the key specified by // |key_type| and |key_name| exists, then the result sent to the callback will - // be true. + // be true. If |key_type| is KEY_USER, a |user_id| must be provided. + // Otherwise |user_id| is ignored. For normal GAIA users the |user_id| is a + // canonical email address. virtual void TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback) = 0; // Gets the attestation certificate for the key specified by |key_type| and // |key_name|. |callback| will be called when the operation completes. If - // the key does not exist the callback |result| parameter will be false. + // the key does not exist the callback |result| parameter will be false. If + // |key_type| is KEY_USER, a |user_id| must be provided. Otherwise |user_id| + // is ignored. For normal GAIA users the |user_id| is a canonical email + // address. virtual void TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) = 0; // Gets the public key for the key specified by |key_type| and |key_name|. // |callback| will be called when the operation completes. If the key does - // not exist the callback |result| parameter will be false. + // not exist the callback |result| parameter will be false. If |key_type| is + // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. + // For normal GAIA users the |user_id| is a canonical email address. virtual void TpmAttestationGetPublicKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) = 0; @@ -320,8 +333,12 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // PKCS #11 token. The |callback| will be called when the dbus call // completes. When the operation completes, the AsyncCallStatusHandler signal // handler is called. |key_type| and |key_name| specify the key to register. + // If |key_type| is KEY_USER, a |user_id| must be provided. Otherwise + // |user_id| is ignored. For normal GAIA users the |user_id| is a canonical + // email address. virtual void TpmAttestationRegisterKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) = 0; @@ -331,9 +348,12 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // generated. |challenge| must be a valid enterprise attestation challenge. // The |callback| will be called when the dbus call completes. When the // operation completes, the AsyncCallStatusWithDataHandler signal handler is - // called. + // called. If |key_type| is KEY_USER, a |user_id| must be provided. + // Otherwise |user_id| is ignored. For normal GAIA users the |user_id| is a + // canonical email address. virtual void TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& domain, const std::string& device_id, @@ -346,9 +366,12 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // A nonce will be appended to the challenge before signing; this method // cannot be used to sign arbitrary data. The |callback| will be called when // the dbus call completes. When the operation completes, the - // AsyncCallStatusWithDataHandler signal handler is called. + // AsyncCallStatusWithDataHandler signal handler is called. If |key_type| is + // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. + // For normal GAIA users the |user_id| is a canonical email address. virtual void TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback) = 0; @@ -357,17 +380,24 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { // |key_name|. The |callback| will be called when the operation completes. // If the key does not exist the callback |result| parameter will be false. // If no payload has been set for the key the callback |result| parameter will - // be true and the |data| parameter will be empty. + // be true and the |data| parameter will be empty. If |key_type| is + // KEY_USER, a |user_id| must be provided. Otherwise |user_id| is ignored. + // For normal GAIA users the |user_id| is a canonical email address. virtual void TpmAttestationGetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) = 0; // Sets the |payload| associated with the key specified by |key_type| and // |key_name|. The |callback| will be called when the operation completes. // If the operation succeeds, the callback |result| parameter will be true. + // If |key_type| is KEY_USER, a |user_id| must be provided. Otherwise + // |user_id| is ignored. For normal GAIA users the |user_id| is a canonical + // email address. virtual void TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback) = 0; diff --git a/chromeos/dbus/fake_cryptohome_client.cc b/chromeos/dbus/fake_cryptohome_client.cc index aa067a1..7b40854 100644 --- a/chromeos/dbus/fake_cryptohome_client.cc +++ b/chromeos/dbus/fake_cryptohome_client.cc @@ -275,7 +275,7 @@ void FakeCryptohomeClient::AsyncTpmAttestationEnroll( void FakeCryptohomeClient::AsyncTpmAttestationCreateCertRequest( attestation::AttestationCertificateProfile certificate_profile, - const std::string& user_email, + const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback) { ReturnAsyncMethodResult(callback, true); @@ -284,6 +284,7 @@ void FakeCryptohomeClient::AsyncTpmAttestationCreateCertRequest( void FakeCryptohomeClient::AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) { ReturnAsyncMethodResult(callback, true); @@ -291,6 +292,7 @@ void FakeCryptohomeClient::AsyncTpmAttestationFinishCertRequest( void FakeCryptohomeClient::TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback) { base::MessageLoop::current()->PostTask( @@ -299,6 +301,7 @@ void FakeCryptohomeClient::TpmAttestationDoesKeyExist( void FakeCryptohomeClient::TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) { base::MessageLoop::current()->PostTask( @@ -308,6 +311,7 @@ void FakeCryptohomeClient::TpmAttestationGetCertificate( void FakeCryptohomeClient::TpmAttestationGetPublicKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) { base::MessageLoop::current()->PostTask( @@ -317,6 +321,7 @@ void FakeCryptohomeClient::TpmAttestationGetPublicKey( void FakeCryptohomeClient::TpmAttestationRegisterKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) { ReturnAsyncMethodResult(callback, true); @@ -324,6 +329,7 @@ void FakeCryptohomeClient::TpmAttestationRegisterKey( void FakeCryptohomeClient::TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& domain, const std::string& device_id, @@ -335,6 +341,7 @@ void FakeCryptohomeClient::TpmAttestationSignEnterpriseChallenge( void FakeCryptohomeClient::TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback) { @@ -343,6 +350,7 @@ void FakeCryptohomeClient::TpmAttestationSignSimpleChallenge( void FakeCryptohomeClient::TpmAttestationGetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) { base::MessageLoop::current()->PostTask( @@ -352,6 +360,7 @@ void FakeCryptohomeClient::TpmAttestationGetKeyPayload( void FakeCryptohomeClient::TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback) { diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h index d18b6e8..4f045ec 100644 --- a/chromeos/dbus/fake_cryptohome_client.h +++ b/chromeos/dbus/fake_cryptohome_client.h @@ -95,32 +95,38 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { const AsyncMethodCallback& callback) OVERRIDE; virtual void AsyncTpmAttestationCreateCertRequest( attestation::AttestationCertificateProfile certificate_profile, - const std::string& user_email, + const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback) OVERRIDE; virtual void AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) OVERRIDE; virtual void TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback) OVERRIDE; virtual void TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE; virtual void TpmAttestationGetPublicKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE; virtual void TpmAttestationRegisterKey( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) OVERRIDE; virtual void TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& domain, const std::string& device_id, @@ -129,15 +135,18 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { const AsyncMethodCallback& callback) OVERRIDE; virtual void TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback) OVERRIDE; virtual void TpmAttestationGetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) OVERRIDE; virtual void TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback) OVERRIDE; diff --git a/chromeos/dbus/mock_cryptohome_client.h b/chromeos/dbus/mock_cryptohome_client.h index 76f3069..8cb4c6b 100644 --- a/chromeos/dbus/mock_cryptohome_client.h +++ b/chromeos/dbus/mock_cryptohome_client.h @@ -99,49 +99,58 @@ class MockCryptohomeClient : public CryptohomeClient { MOCK_METHOD4( AsyncTpmAttestationCreateCertRequest, void(attestation::AttestationCertificateProfile certificate_profile, - const std::string& user_email, + const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback)); - MOCK_METHOD4(AsyncTpmAttestationFinishCertRequest, + MOCK_METHOD5(AsyncTpmAttestationFinishCertRequest, void(const std::string& pca_response, attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback)); - MOCK_METHOD3(TpmAttestationDoesKeyExist, + MOCK_METHOD4(TpmAttestationDoesKeyExist, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback)); - MOCK_METHOD3(TpmAttestationGetCertificate, + MOCK_METHOD4(TpmAttestationGetCertificate, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback)); - MOCK_METHOD3(TpmAttestationGetPublicKey, + MOCK_METHOD4(TpmAttestationGetPublicKey, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback)); - MOCK_METHOD3(TpmAttestationRegisterKey, + MOCK_METHOD4(TpmAttestationRegisterKey, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback)); - MOCK_METHOD7(TpmAttestationSignEnterpriseChallenge, + MOCK_METHOD8(TpmAttestationSignEnterpriseChallenge, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& domain, const std::string& device_id, attestation::AttestationChallengeOptions options, const std::string& challenge, const AsyncMethodCallback& callback)); - MOCK_METHOD4(TpmAttestationSignSimpleChallenge, + MOCK_METHOD5(TpmAttestationSignSimpleChallenge, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback)); - MOCK_METHOD3(TpmAttestationGetKeyPayload, + MOCK_METHOD4(TpmAttestationGetKeyPayload, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback)); - MOCK_METHOD4(TpmAttestationSetKeyPayload, + MOCK_METHOD5(TpmAttestationSetKeyPayload, void(attestation::AttestationKeyType key_type, + const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback)); |