Merge "Delete KM1"

This commit is contained in:
Shawn Willden 2021-10-09 00:46:52 +00:00 committed by Gerrit Code Review
commit 13274fa22d
4 changed files with 9 additions and 25 deletions

View file

@ -12,7 +12,7 @@ LOCAL_SRC_FILES := \
LOCAL_SHARED_LIBRARIES := \
liblog \
libsoftkeymasterdevice \
libpuresoftkeymasterdevice \
libcrypto \
libkeymaster_portable \
libpuresoftkeymasterdevice \

View file

@ -22,7 +22,6 @@
#include <log/log.h>
#include <AndroidKeymaster3Device.h>
#include <hardware/keymaster1.h>
#include <hardware/keymaster2.h>
#include <hardware/keymaster_defs.h>
@ -32,18 +31,6 @@ namespace keymaster {
namespace V3_0 {
namespace implementation {
static int get_keymaster1_dev(keymaster1_device_t** dev, const hw_module_t* mod) {
int rc = keymaster1_open(mod, dev);
if (rc) {
ALOGE("Error %d opening keystore keymaster1 device", rc);
if (*dev) {
(*dev)->common.close(&(*dev)->common);
*dev = nullptr;
}
}
return rc;
}
static int get_keymaster2_dev(keymaster2_device_t** dev, const hw_module_t* mod) {
int rc = keymaster2_open(mod, dev);
if (rc) {
@ -63,14 +50,8 @@ static IKeymasterDevice* createKeymaster3Device() {
return ::keymaster::ng::CreateKeymasterDevice();
}
if (mod->module_api_version < KEYMASTER_MODULE_API_VERSION_1_0) {
if (mod->module_api_version < KEYMASTER_MODULE_API_VERSION_2_0) {
return nullptr;
} else if (mod->module_api_version == KEYMASTER_MODULE_API_VERSION_1_0) {
keymaster1_device_t* dev = nullptr;
if (get_keymaster1_dev(&dev, mod)) {
return nullptr;
}
return ::keymaster::ng::CreateKeymasterDevice(dev);
} else {
keymaster2_device_t* dev = nullptr;
if (get_keymaster2_dev(&dev, mod)) {

View file

@ -36,7 +36,10 @@ cc_test {
static_libs: [
"android.hardware.keymaster@3.0",
"libcrypto_static",
"libsoftkeymasterdevice",
"libpuresoftkeymasterdevice",
],
test_suites: [
"general-tests",
"vts",
],
test_suites: ["general-tests", "vts"],
}

View file

@ -32,7 +32,7 @@ cc_benchmark {
static_libs: [
"android.hardware.keymaster@4.0",
"libkeymaster4support",
"libsoftkeymasterdevice",
"libchrome"
"libpuresoftkeymasterdevice",
"libchrome",
],
}