summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Chong <victor.chong@linaro.org>2021-02-15 00:34:08 +0900
committervchong <7334750+vchong@users.noreply.github.com>2021-02-25 23:56:44 +0900
commitc4f4ca80d87ee037c245d146a730be677f7d155d (patch)
treebe156bb171120c3c4d40fd16a3c54a82a2aed2fd
parentb45f18f8696ffe005ee2f734b724796ba35fe857 (diff)
downloadapps-c4f4ca80d87ee037c245d146a730be677f7d155d.tar.gz
km: ta: remove redundant TODOs
Remove TODO items that no longer apply or are not necessary anymore. Signed-off-by: Victor Chong <victor.chong@linaro.org> Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Tested-by: Victor Chong <victor.chong@linaro.org>
-rw-r--r--keymaster/3.0/optee_keymaster3_device.cpp6
-rw-r--r--keymaster/ta/auth.c2
-rw-r--r--keymaster/ta/generator.c3
-rw-r--r--keymaster/ta/include/common.h2
-rw-r--r--keymaster/ta/keystore_ta.c3
-rw-r--r--keymaster/ta/parsel.c1
6 files changed, 1 insertions, 16 deletions
diff --git a/keymaster/3.0/optee_keymaster3_device.cpp b/keymaster/3.0/optee_keymaster3_device.cpp
index e01e80d..cc9f4a5 100644
--- a/keymaster/3.0/optee_keymaster3_device.cpp
+++ b/keymaster/3.0/optee_keymaster3_device.cpp
@@ -58,12 +58,6 @@ static inline keymaster_tag_type_t typeFromTag(const keymaster_tag_t tag) {
return keymaster_tag_get_type(tag);
}
-/*
- * legacy_enum_conversion converts enums from hidl to keymaster and back. Currently, this is just a
- * cast to make the compiler happy. One of two things should happen though:
- * TODO The keymaster enums should become aliases for the hidl generated enums so that we have a
- * single point of truth. Then this cast function can go away.
- */
inline static keymaster_tag_t legacy_enum_conversion(const Tag value) {
ALOGD("%s %d", __func__, __LINE__);
return keymaster_tag_t(value);
diff --git a/keymaster/ta/auth.c b/keymaster/ta/auth.c
index 09a8db2..13b33db 100644
--- a/keymaster/ta/auth.c
+++ b/keymaster/ta/auth.c
@@ -91,8 +91,6 @@ static TEE_Result TA_GetClientIdentity(TEE_Identity *identity)
{
TEE_Result res = TEE_SUCCESS;
- // TODO: remove cast when OP-TEE changes name parameter type
- // to const char *
res = TEE_GetPropertyAsIdentity(TEE_PROPSET_CURRENT_CLIENT,
(char *)"gpd.client.identity", identity);
diff --git a/keymaster/ta/generator.c b/keymaster/ta/generator.c
index c738e34..0026fd1 100644
--- a/keymaster/ta/generator.c
+++ b/keymaster/ta/generator.c
@@ -27,9 +27,6 @@ uint32_t attributes_rsa[KM_ATTR_COUNT_RSA] = {
TEE_ATTR_RSA_EXPONENT1,
TEE_ATTR_RSA_EXPONENT2,
TEE_ATTR_RSA_COEFFICIENT};
-// https://github.com/linaro-swg/kmgk/pull/9/commits/a82eb8df6079cd523cd811fd6f23d07b40486935#r284733434
-// TODO: check proper order of a EC key attributes
-// was curve, x, y, private
uint32_t attributes_ec[KM_ATTR_COUNT_EC] = {
TEE_ATTR_ECC_CURVE,
TEE_ATTR_ECC_PRIVATE_VALUE,
diff --git a/keymaster/ta/include/common.h b/keymaster/ta/include/common.h
index 95a8667..6ec971f 100644
--- a/keymaster/ta/include/common.h
+++ b/keymaster/ta/include/common.h
@@ -18,7 +18,7 @@
#ifndef KEYMASTER_COMMON_H
#define KEYMASTER_COMMON_H
-#define SIZE_LENGTH sizeof(size_t) //TODO: find all of those macros and refactor them
+#define SIZE_LENGTH sizeof(size_t)
/* AKMS stands for android keymaster serailzing function */
#define SIZE_LENGTH_AKMS sizeof(uint32_t)
diff --git a/keymaster/ta/keystore_ta.c b/keymaster/ta/keystore_ta.c
index 141c051..4167fb1 100644
--- a/keymaster/ta/keystore_ta.c
+++ b/keymaster/ta/keystore_ta.c
@@ -332,8 +332,6 @@ static keymaster_error_t TA_generateKey(TEE_Param params[TEE_NUM_PARAMS])
goto exit;
}
- //TODO add bind keys to operating system and patch level version
-
TA_serialize_param_set(key_material + key_buffer_size, &params_t);
res = TA_encrypt(key_material, key_blob.key_material_size);
@@ -986,7 +984,6 @@ static keymaster_error_t TA_destroyAttestationIds(TEE_Param params[TEE_NUM_PARAM
out = (uint8_t *) params[1].memref.buffer;
out += TA_serialize_rsp_err(out, &res);
params[1].memref.size = out - (uint8_t *)params[1].memref.buffer;
- /* TODO Delete all keys */
return KM_ERROR_OK;
}
diff --git a/keymaster/ta/parsel.c b/keymaster/ta/parsel.c
index 9dd812d..62d97de 100644
--- a/keymaster/ta/parsel.c
+++ b/keymaster/ta/parsel.c
@@ -212,7 +212,6 @@ int TA_deserialize_auth_set(uint8_t *in, uint8_t *end,
TEE_MemMove(&indirect_data_size, in, sizeof(indirect_data_size));
in += SIZE_LENGTH_AKMS;
- //indirect_data_, todo
DMSG("indirect_data_size:%d", indirect_data_size);
/* Freed when deserialized blob is destroyed by caller */
indirect_base = TEE_Malloc(indirect_data_size, TEE_MALLOC_FILL_ZERO);