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
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 <UniquePtr.h>
-#include <hardware/keymaster.h>
+#include <hardware/keymaster0.h>
namespace android {
@@ -92,13 +92,13 @@
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 @@
}
private:
- keymaster_device_t** mDevice;
+ keymaster0_device_t** mDevice;
};
class UniqueReadOnlyBlob {
@@ -341,7 +341,7 @@
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 @@
}
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 {
};