OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "chromeos/attestation/attestation_constants.h" | 13 #include "chromeos/attestation/attestation_constants.h" |
14 #include "chromeos/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
15 #include "chromeos/dbus/dbus_client.h" | 15 #include "chromeos/dbus/dbus_client.h" |
16 #include "chromeos/dbus/dbus_method_call_status.h" | 16 #include "chromeos/dbus/dbus_method_call_status.h" |
17 | 17 |
18 namespace cryptohome { | 18 namespace cryptohome { |
19 | 19 |
20 class AccountIdentifier; | 20 class AccountIdentifier; |
21 class AddKeyRequest; | 21 class AddKeyRequest; |
22 class AuthorizationRequest; | 22 class AuthorizationRequest; |
23 class BaseReply; | 23 class BaseReply; |
24 class CheckKeyRequest; | 24 class CheckKeyRequest; |
25 class FlushAndSignBootAttributesRequest; | 25 class FlushAndSignBootAttributesRequest; |
26 class GetBootAttributeRequest; | 26 class GetBootAttributeRequest; |
| 27 class GetKeyDataRequest; |
27 class MountRequest; | 28 class MountRequest; |
28 class RemoveKeyRequest; | 29 class RemoveKeyRequest; |
29 class SetBootAttributeRequest; | 30 class SetBootAttributeRequest; |
30 class UpdateKeyRequest; | 31 class UpdateKeyRequest; |
31 | 32 |
32 } // namespace cryptohome | 33 } // namespace cryptohome |
33 | 34 |
34 namespace chromeos { | 35 namespace chromeos { |
35 | 36 |
36 // CryptohomeClient is used to communicate with the Cryptohome service. | 37 // CryptohomeClient is used to communicate with the Cryptohome service. |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // For normal GAIA users the |user_id| is a canonical email address. All keys | 448 // For normal GAIA users the |user_id| is a canonical email address. All keys |
448 // where the key name has a prefix matching |key_prefix| will be deleted. All | 449 // where the key name has a prefix matching |key_prefix| will be deleted. All |
449 // meta-data associated with the key, including certificates, will also be | 450 // meta-data associated with the key, including certificates, will also be |
450 // deleted. | 451 // deleted. |
451 virtual void TpmAttestationDeleteKeys( | 452 virtual void TpmAttestationDeleteKeys( |
452 attestation::AttestationKeyType key_type, | 453 attestation::AttestationKeyType key_type, |
453 const std::string& user_id, | 454 const std::string& user_id, |
454 const std::string& key_prefix, | 455 const std::string& key_prefix, |
455 const BoolDBusMethodCallback& callback) = 0; | 456 const BoolDBusMethodCallback& callback) = 0; |
456 | 457 |
| 458 // Asynchronously calls the GetKeyDataEx method. |callback| will be invoked |
| 459 // with the reply protobuf. |
| 460 // GetKeyDataEx returns information about the key specified in |request|. At |
| 461 // present, this does not include any secret information and the call should |
| 462 // not be authenticated (|auth| should be empty). |
| 463 virtual void GetKeyDataEx( |
| 464 const cryptohome::AccountIdentifier& id, |
| 465 const cryptohome::AuthorizationRequest& auth, |
| 466 const cryptohome::GetKeyDataRequest& request, |
| 467 const ProtobufMethodCallback& callback) = 0; |
| 468 |
457 // Asynchronously calls CheckKeyEx method. |callback| is called after method | 469 // Asynchronously calls CheckKeyEx method. |callback| is called after method |
458 // call, and with reply protobuf. | 470 // call, and with reply protobuf. |
459 // CheckKeyEx just checks if authorization information is valid. | 471 // CheckKeyEx just checks if authorization information is valid. |
460 virtual void CheckKeyEx( | 472 virtual void CheckKeyEx( |
461 const cryptohome::AccountIdentifier& id, | 473 const cryptohome::AccountIdentifier& id, |
462 const cryptohome::AuthorizationRequest& auth, | 474 const cryptohome::AuthorizationRequest& auth, |
463 const cryptohome::CheckKeyRequest& request, | 475 const cryptohome::CheckKeyRequest& request, |
464 const ProtobufMethodCallback& callback) = 0; | 476 const ProtobufMethodCallback& callback) = 0; |
465 | 477 |
466 // Asynchronously calls MountEx method. |callback| is called after method | 478 // Asynchronously calls MountEx method. |callback| is called after method |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // Create() should be used instead. | 542 // Create() should be used instead. |
531 CryptohomeClient(); | 543 CryptohomeClient(); |
532 | 544 |
533 private: | 545 private: |
534 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); | 546 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); |
535 }; | 547 }; |
536 | 548 |
537 } // namespace chromeos | 549 } // namespace chromeos |
538 | 550 |
539 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 551 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
OLD | NEW |