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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "chromeos/attestation/attestation_constants.h" | 15 #include "chromeos/attestation/attestation_constants.h" |
16 #include "chromeos/chromeos_export.h" | 16 #include "chromeos/chromeos_export.h" |
17 #include "chromeos/dbus/dbus_client.h" | 17 #include "chromeos/dbus/dbus_client.h" |
18 #include "chromeos/dbus/dbus_method_call_status.h" | 18 #include "chromeos/dbus/dbus_method_call_status.h" |
19 | 19 |
20 namespace cryptohome { | 20 namespace cryptohome { |
21 | 21 |
22 class AddKeyRequest; | 22 class AddKeyRequest; |
23 class AuthorizationRequest; | 23 class AuthorizationRequest; |
24 class BaseReply; | 24 class BaseReply; |
25 class CheckKeyRequest; | 25 class CheckKeyRequest; |
26 class FlushAndSignBootAttributesRequest; | 26 class FlushAndSignBootAttributesRequest; |
27 class GetBootAttributeRequest; | 27 class GetBootAttributeRequest; |
28 class GetKeyDataRequest; | 28 class GetKeyDataRequest; |
29 class MountRequest; | 29 class MountRequest; |
30 class RemoveFirmwareManagementParametersRequest; | |
30 class RemoveKeyRequest; | 31 class RemoveKeyRequest; |
31 class SetBootAttributeRequest; | 32 class SetBootAttributeRequest; |
33 class SetFirmwareManagementParametersRequest; | |
32 class UpdateKeyRequest; | 34 class UpdateKeyRequest; |
33 | 35 |
34 class Identification; | 36 class Identification; |
35 | 37 |
36 } // namespace cryptohome | 38 } // namespace cryptohome |
37 | 39 |
38 namespace chromeos { | 40 namespace chromeos { |
39 | 41 |
40 // CryptohomeClient is used to communicate with the Cryptohome service. | 42 // CryptohomeClient is used to communicate with the Cryptohome service. |
41 // All method should be called from the origin thread (UI thread) which | 43 // All method should be called from the origin thread (UI thread) which |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 | 550 |
549 // Asynchronously calls FlushAndSignBootAttributes method. |callback| is | 551 // Asynchronously calls FlushAndSignBootAttributes method. |callback| is |
550 // called after method call, and with reply protobuf. | 552 // called after method call, and with reply protobuf. |
551 // FlushAndSignBootAttributes makes all pending boot attribute settings | 553 // FlushAndSignBootAttributes makes all pending boot attribute settings |
552 // available, and have them signed by a special TPM key. This method always | 554 // available, and have them signed by a special TPM key. This method always |
553 // fails after any user, publuc, or guest session starts. | 555 // fails after any user, publuc, or guest session starts. |
554 virtual void FlushAndSignBootAttributes( | 556 virtual void FlushAndSignBootAttributes( |
555 const cryptohome::FlushAndSignBootAttributesRequest& request, | 557 const cryptohome::FlushAndSignBootAttributesRequest& request, |
556 const ProtobufMethodCallback& callback) = 0; | 558 const ProtobufMethodCallback& callback) = 0; |
557 | 559 |
560 // Asynchronously calls RemoveFirmwareManagementParameters method. |callback| | |
561 // is called after method call, and with reply protobuf. | |
562 // RemoveFirmwareManagementParameters removes the firmware management | |
563 // parameters from TPM. | |
564 virtual void RemoveFirmwareManagementParametersInTpm( | |
Thiemo Nagel
2017/03/23 17:23:52
Nit: FromTpm would probably be better language.
igorcov
2017/03/24 13:29:15
Done.
| |
565 const cryptohome::RemoveFirmwareManagementParametersRequest& request, | |
Thiemo Nagel
2017/03/23 17:23:52
The request parameter seems to serve no purpose.
igorcov
2017/03/24 13:29:15
It is used, being passed to cryptohome_proxy for C
| |
566 const ProtobufMethodCallback& callback) = 0; | |
567 | |
568 // Asynchronously calls SetFirmwareManagementParameters method. |callback| | |
569 // is called after method call, and with reply protobuf. |request| contains | |
570 // the flags to be set. SetFirmwareManagementParameters creates the firmware | |
571 // management parameters in TPM and sets flags included in the request. | |
572 virtual void SetFirmwareManagementParametersInTpm( | |
573 const cryptohome::SetFirmwareManagementParametersRequest& request, | |
574 const ProtobufMethodCallback& callback) = 0; | |
575 | |
558 protected: | 576 protected: |
559 // Create() should be used instead. | 577 // Create() should be used instead. |
560 CryptohomeClient(); | 578 CryptohomeClient(); |
561 | 579 |
562 private: | 580 private: |
563 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); | 581 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); |
564 }; | 582 }; |
565 | 583 |
566 } // namespace chromeos | 584 } // namespace chromeos |
567 | 585 |
568 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 586 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
OLD | NEW |