From 302d252f2c655b50a8d1223105a0742d456ce206 Mon Sep 17 00:00:00 2001 From: Shawn Willden Date: Tue, 24 Feb 2015 09:17:38 -0700 Subject: Separate keymaster0 and keymaster1 HALs. For now the keymaster1 HAL still includes all of the keymaster0 entry points, and soft_keymaster_device will continue to implement them. In the near future the keymaster0 entry points will be removed, as soon as we can ensure that keystore no longer needs them. Change-Id: I5c54282c12d1c4b8b22ed4929b6e6c724a94ede4 --- tests/keymaster/keymaster_test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/keymaster/keymaster_test.cpp b/tests/keymaster/keymaster_test.cpp index 6b76ccb..e5e1dfd 100644 --- a/tests/keymaster/keymaster_test.cpp +++ b/tests/keymaster/keymaster_test.cpp @@ -35,7 +35,7 @@ #include -#include +#include namespace android { @@ -92,13 +92,13 @@ std::ostream &operator<<(std::ostream &stream, const UniqueBlob& blob) { class UniqueKey : public UniqueBlob { public: - UniqueKey(keymaster_device_t** dev, uint8_t* bytes, size_t length) : + UniqueKey(keymaster0_device_t** dev, uint8_t* bytes, size_t length) : UniqueBlob(bytes, length), mDevice(dev) { } ~UniqueKey() { if (mDevice != NULL && *mDevice != NULL) { - keymaster_device_t* dev = *mDevice; + keymaster0_device_t* dev = *mDevice; if (dev->delete_keypair != NULL) { dev->delete_keypair(dev, get(), length()); } @@ -106,7 +106,7 @@ public: } private: - keymaster_device_t** mDevice; + keymaster0_device_t** mDevice; }; class UniqueReadOnlyBlob { @@ -341,7 +341,7 @@ public: std::cout << "Using keymaster module: " << mod->name << std::endl; - ASSERT_EQ(0, keymaster_open(mod, &sDevice)) + ASSERT_EQ(0, keymaster0_open(mod, &sDevice)) << "Should be able to open the keymaster device"; ASSERT_EQ(KEYMASTER_MODULE_API_VERSION_0_2, mod->module_api_version) @@ -364,14 +364,14 @@ public: } static void TearDownTestCase() { - ASSERT_EQ(0, keymaster_close(sDevice)); + ASSERT_EQ(0, keymaster0_close(sDevice)); } protected: - static keymaster_device_t* sDevice; + static keymaster0_device_t* sDevice; }; -keymaster_device_t* KeymasterBaseTest::sDevice = NULL; +keymaster0_device_t* KeymasterBaseTest::sDevice = NULL; class KeymasterTest : public KeymasterBaseTest { }; -- cgit v1.1