uint32_t algo, uint32_t key_bits_size,
TEE_OperationHandle *oper_hndl);
-TEE_Result KM_CreateOperationWithKeyId(void *key_id, uint32_t key_id_size, uint32_t mode,
- uint32_t algo, TEE_OperationHandle *oper_hndl);
-
TEE_Result KM_CreateDigestOperation(uint32_t algo, TEE_OperationHandle *oper_hndl);
TEE_Result KM_SaveKey(void *data, size_t data_size, TEE_ObjectHandle key, void *objId,
return ret;
}
-TEE_Result KM_CreateOperationWithKeyId(void *key_id, uint32_t key_id_size, uint32_t mode,
- uint32_t algo, TEE_OperationHandle *oper_hndl)
-{
- TEE_Result ret = TEE_SUCCESS;
- TEE_ObjectHandle key = TEE_HANDLE_NULL;
- TEE_ObjectInfo keyInfo;
- uint32_t ks = 0;
-
- ret = KM_OpenKey(key_id, key_id_size, &ks, &key);
- if (TEE_SUCCESS != ret) {
- LOG("Failed to open key: %x", ret);
- return ret;
- }
-
- TEE_GetObjectInfo(key, &keyInfo);
-
- ret = KM_CreateOperation(key, algo, mode, oper_hndl);
- TEE_CloseObject(key);
-
- if (TEE_SUCCESS != ret) {
- LOG("Failed to create operation with key id: %x", ret);
- }
- return ret;
-}
-
TEE_Result KM_CreateDigestOperation(uint32_t algo, TEE_OperationHandle *oper_hndl)
{
TEE_Result ret = TEE_SUCCESS;