summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonrad Lipinski <k.lipinski2@samsung.com>2019-11-25 14:45:23 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2019-11-25 14:45:23 +0000
commit1b487879aa3f82790b2e131e9f3181e22b0d1e20 (patch)
tree1174fd792f357fbd07b03137804e92a868c67e2a
parent63bd2290f6c242cd093bec9ee5ad270054bb2f89 (diff)
parent62c7a35a85e0d335051d3de5db8012f9aedd3743 (diff)
downloadkey-manager-ta-sandbox/wangbiao/rpm_upgrade.tar.gz
key-manager-ta-sandbox/wangbiao/rpm_upgrade.tar.bz2
key-manager-ta-sandbox/wangbiao/rpm_upgrade.zip
Merge "Remove unused KM_ImportKey function" into tizensandbox/wangbiao/rpm_upgrade
-rw-r--r--ta/include/internal.h2
-rw-r--r--ta/src/internal.c27
2 files changed, 0 insertions, 29 deletions
diff --git a/ta/include/internal.h b/ta/include/internal.h
index d962f74..87357f6 100644
--- a/ta/include/internal.h
+++ b/ta/include/internal.h
@@ -83,8 +83,6 @@ TEE_Result KM_SaveKey(void *data, size_t data_size, TEE_ObjectHandle key, void *
TEE_Result KM_OpenKey(void *objId, size_t objId_size, TEE_ObjectHandle *hndl);
-TEE_Result KM_ImportKey(TEE_ObjectHandle hndl, uint32_t tee_key_type, void *buffer,
- uint32_t *buffer_size);
void KM_DestroyKey(void *objId, uint32_t objId_size);
diff --git a/ta/src/internal.c b/ta/src/internal.c
index f844cd8..3e60cd8 100644
--- a/ta/src/internal.c
+++ b/ta/src/internal.c
@@ -997,33 +997,6 @@ TEE_Result KM_OpenKey(void *objId, size_t objId_size, TEE_ObjectHandle *hndl)
return ret;
}
-TEE_Result KM_ImportKey(TEE_ObjectHandle hndl, uint32_t tee_key_type, void *buffer,
- uint32_t *buffer_size)
-{
- TEE_Result ret = TEE_SUCCESS;
- if (NULL == buffer) {
- LOG("Buffer ptr is NULL.");
- return TEE_ERROR_BAD_PARAMETERS;
- }
-
- switch (tee_key_type) {
- case TEE_TYPE_DES:
- case TEE_TYPE_DES3:
- case TEE_TYPE_AES:
- ret = TEE_GetObjectBufferAttribute(hndl, TEE_ATTR_SECRET_VALUE, buffer, buffer_size);
- break;
- case TEE_TYPE_RSA_KEYPAIR:
- // TODO copy generated key for RSA
- default:
- LOG("Can't generate key. Unknown key type=%d.", tee_key_type);
- ret = TEE_ERROR_BAD_PARAMETERS;
- }
- if (TEE_SUCCESS != ret) {
- LOG("Getting object has failed with=%x for type=%d", ret, tee_key_type);
- }
- return ret;
-}
-
void KM_DestroyKey(void *objId, uint32_t objId_size)
{
TEE_Result ret = TEE_SUCCESS;