diff options
Diffstat (limited to 'keymaster/3.0/default/KeymasterDevice.h')
-rw-r--r-- | keymaster/3.0/default/KeymasterDevice.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/keymaster/3.0/default/KeymasterDevice.h b/keymaster/3.0/default/KeymasterDevice.h index e048d5bb..267bf853 100644 --- a/keymaster/3.0/default/KeymasterDevice.h +++ b/keymaster/3.0/default/KeymasterDevice.h | |||
@@ -18,78 +18,14 @@ | |||
18 | #ifndef HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ | 18 | #ifndef HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ |
19 | #define HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ | 19 | #define HIDL_GENERATED_android_hardware_keymaster_V3_0_KeymasterDevice_H_ |
20 | 20 | ||
21 | #include <hardware/keymaster2.h> | ||
22 | |||
23 | #include <android/hardware/keymaster/3.0/IKeymasterDevice.h> | 21 | #include <android/hardware/keymaster/3.0/IKeymasterDevice.h> |
24 | #include <hidl/Status.h> | ||
25 | 22 | ||
26 | #include <hidl/MQDescriptor.h> | ||
27 | namespace android { | 23 | namespace android { |
28 | namespace hardware { | 24 | namespace hardware { |
29 | namespace keymaster { | 25 | namespace keymaster { |
30 | namespace V3_0 { | 26 | namespace V3_0 { |
31 | namespace implementation { | 27 | namespace implementation { |
32 | 28 | ||
33 | using ::android::hardware::keymaster::V3_0::ErrorCode; | ||
34 | using ::android::hardware::keymaster::V3_0::IKeymasterDevice; | ||
35 | using ::android::hardware::keymaster::V3_0::KeyCharacteristics; | ||
36 | using ::android::hardware::keymaster::V3_0::KeyFormat; | ||
37 | using ::android::hardware::keymaster::V3_0::KeyParameter; | ||
38 | using ::android::hardware::keymaster::V3_0::KeyPurpose; | ||
39 | using ::android::hardware::Return; | ||
40 | using ::android::hardware::Void; | ||
41 | using ::android::hardware::hidl_vec; | ||
42 | using ::android::hardware::hidl_string; | ||
43 | using ::android::sp; | ||
44 | |||
45 | class KeymasterDevice : public IKeymasterDevice { | ||
46 | public: | ||
47 | KeymasterDevice(keymaster2_device_t* dev, uint32_t hardware_version, bool hardware_supports_ec, | ||
48 | bool hardware_supports_all_digests) | ||
49 | : keymaster_device_(dev), hardware_version_(hardware_version), | ||
50 | hardware_supports_ec_(hardware_supports_ec), | ||
51 | hardware_supports_all_digests_(hardware_supports_all_digests) {} | ||
52 | virtual ~KeymasterDevice(); | ||
53 | |||
54 | // Methods from ::android::hardware::keymaster::V3_0::IKeymasterDevice follow. | ||
55 | Return<void> getHardwareFeatures(getHardwareFeatures_cb _hidl_cb); | ||
56 | Return<ErrorCode> addRngEntropy(const hidl_vec<uint8_t>& data) override; | ||
57 | Return<void> generateKey(const hidl_vec<KeyParameter>& keyParams, | ||
58 | generateKey_cb _hidl_cb) override; | ||
59 | Return<void> getKeyCharacteristics(const hidl_vec<uint8_t>& keyBlob, | ||
60 | const hidl_vec<uint8_t>& clientId, | ||
61 | const hidl_vec<uint8_t>& appData, | ||
62 | getKeyCharacteristics_cb _hidl_cb) override; | ||
63 | Return<void> importKey(const hidl_vec<KeyParameter>& params, KeyFormat keyFormat, | ||
64 | const hidl_vec<uint8_t>& keyData, importKey_cb _hidl_cb) override; | ||
65 | Return<void> exportKey(KeyFormat exportFormat, const hidl_vec<uint8_t>& keyBlob, | ||
66 | const hidl_vec<uint8_t>& clientId, const hidl_vec<uint8_t>& appData, | ||
67 | exportKey_cb _hidl_cb) override; | ||
68 | Return<void> attestKey(const hidl_vec<uint8_t>& keyToAttest, | ||
69 | const hidl_vec<KeyParameter>& attestParams, | ||
70 | attestKey_cb _hidl_cb) override; | ||
71 | Return<void> upgradeKey(const hidl_vec<uint8_t>& keyBlobToUpgrade, | ||
72 | const hidl_vec<KeyParameter>& upgradeParams, | ||
73 | upgradeKey_cb _hidl_cb) override; | ||
74 | Return<ErrorCode> deleteKey(const hidl_vec<uint8_t>& keyBlob) override; | ||
75 | Return<ErrorCode> deleteAllKeys() override; | ||
76 | Return<ErrorCode> destroyAttestationIds() override; | ||
77 | Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key, | ||
78 | const hidl_vec<KeyParameter>& inParams, begin_cb _hidl_cb) override; | ||
79 | Return<void> update(uint64_t operationHandle, const hidl_vec<KeyParameter>& inParams, | ||
80 | const hidl_vec<uint8_t>& input, update_cb _hidl_cb) override; | ||
81 | Return<void> finish(uint64_t operationHandle, const hidl_vec<KeyParameter>& inParams, | ||
82 | const hidl_vec<uint8_t>& input, const hidl_vec<uint8_t>& signature, | ||
83 | finish_cb _hidl_cb) override; | ||
84 | Return<ErrorCode> abort(uint64_t operationHandle) override; | ||
85 | |||
86 | private: | ||
87 | keymaster2_device_t* keymaster_device_; | ||
88 | uint32_t hardware_version_; | ||
89 | bool hardware_supports_ec_; | ||
90 | bool hardware_supports_all_digests_; | ||
91 | }; | ||
92 | |||
93 | extern "C" IKeymasterDevice* HIDL_FETCH_IKeymasterDevice(const char* name); | 29 | extern "C" IKeymasterDevice* HIDL_FETCH_IKeymasterDevice(const char* name); |
94 | 30 | ||
95 | } // namespace implementation | 31 | } // namespace implementation |