lib: optee_client: remove widevine ta from uboot
Change-Id: I9e6e4d6743d0a8e9787c2b01e535d920d4f93008 Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
This commit is contained in:
parent
509ea9e58d
commit
d8100d74a0
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2018 Rockchip Electronics Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
#ifndef _WIDEVINE_TA_H_
|
||||
#define _WIDEVINE_TA_H_
|
||||
|
||||
extern const uint8_t widevine_keybox_data[];
|
||||
extern const uint32_t widevine_keybox_size;
|
||||
|
||||
#endif /* _WIDEVINE_TA_H_ */
|
||||
|
|
@ -12,11 +12,6 @@ obj-y += tee_smc-arm64.o
|
|||
|
||||
ifdef CONFIG_OPTEE_V1
|
||||
obj-y += OpteeClientRkFs.o
|
||||
|
||||
obj-y += c11fe8ac-b997-48cf-a28de2a55e5240ef.o
|
||||
lib/optee_clientApi/c11fe8ac-b997-48cf-a28de2a55e5240ef.o: lib/optee_clientApi/c11fe8ac-b997-48cf-a28de2a55e5240ef.c
|
||||
lib/optee_clientApi/c11fe8ac-b997-48cf-a28de2a55e5240ef.c: lib/optee_clientApi/c11fe8ac-b997-48cf-a28de2a55e5240ef.ta
|
||||
$(srctree)/lib/optee_clientApi/tabinary_to_cfile.py --prefix widevine_keybox --TA $< --out $@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_OPTEE_V2
|
||||
|
|
|
|||
|
|
@ -100,23 +100,17 @@ uint32_t rk_send_keybox_to_ta(uint8_t *filename, uint32_t filename_size,
|
|||
TEEC_MEMREF_TEMP_INOUT,
|
||||
TEEC_NONE);
|
||||
|
||||
printf("check: does keybox exised in secure storage...\n");
|
||||
printf("write keybox to secure storage\n");
|
||||
TeecResult = TEEC_InvokeCommand(&TeecSession,
|
||||
122,
|
||||
6,
|
||||
&TeecOperation,
|
||||
&ErrorOrigin);
|
||||
if (TeecResult != TEEC_SUCCESS) {
|
||||
printf("no keybox in secure storage, write keybox to secure storage\n");
|
||||
TeecResult = TEEC_InvokeCommand(&TeecSession,
|
||||
121,
|
||||
&TeecOperation,
|
||||
&ErrorOrigin);
|
||||
if (TeecResult != TEEC_SUCCESS) {
|
||||
printf("send data to TA failed with code 0x%x\n", TeecResult);
|
||||
} else {
|
||||
printf("send data to TA success with code 0x%x\n", TeecResult);
|
||||
}
|
||||
printf("send data to TA failed with code 0x%x\n", TeecResult);
|
||||
} else {
|
||||
printf("send data to TA success with code 0x%x\n", TeecResult);
|
||||
}
|
||||
|
||||
TEEC_ReleaseSharedMemory(&SharedMem0);
|
||||
TEEC_ReleaseSharedMemory(&SharedMem1);
|
||||
TEEC_ReleaseSharedMemory(&SharedMem2);
|
||||
|
|
@ -131,22 +125,19 @@ int write_keybox_to_secure_storage(uint8_t *uboot_data, uint32_t len)
|
|||
{
|
||||
uint32_t key_size;
|
||||
uint32_t data_size;
|
||||
uint32_t object_id;
|
||||
TEEC_Result ret;
|
||||
int rc = 0;
|
||||
|
||||
if (memcmp(uboot_data, WIDEVINE_TAG, 4) == 0) {
|
||||
/* widevine keybox */
|
||||
TEEC_Result ret;
|
||||
|
||||
TEEC_UUID widevine_uuid = { 0xc11fe8ac, 0xb997, 0x48cf,
|
||||
{ 0xa2, 0x8d, 0xe2, 0xa5, 0x5e, 0x52, 0x40, 0xef} };
|
||||
object_id = 101;
|
||||
TEEC_UUID widevine_uuid = { 0x1b484ea5, 0x698b, 0x4142,
|
||||
{ 0x82, 0xb8, 0x3a, 0xcf, 0x16, 0xe9, 0x9e, 0x2a } };
|
||||
|
||||
key_size = *(uboot_data + 4);
|
||||
data_size = *(uboot_data + 8);
|
||||
|
||||
ret = rk_send_keybox_to_ta((uint8_t *)&object_id,
|
||||
sizeof(uint32_t),
|
||||
ret = rk_send_keybox_to_ta((uint8_t *)"widevine_keybox",
|
||||
sizeof("widevine_keybox"),
|
||||
widevine_uuid,
|
||||
uboot_data + 12,
|
||||
key_size,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include <optee_include/teesmc_optee.h>
|
||||
#include <optee_include/tee_rpc_types.h>
|
||||
#include <optee_include/tee_rpc.h>
|
||||
#include <optee_include/c11fe8ac-b997-48cf-a28de2a55e5240ef.h>
|
||||
#ifdef CONFIG_OPTEE_V1
|
||||
#include <optee_include/OpteeClientRkFs.h>
|
||||
#endif
|
||||
|
|
@ -113,8 +112,8 @@ TEEC_Result OpteeRpcCmdLoadTa(t_teesmc32_arg *TeeSmc32Arg)
|
|||
ImageData = (void *)0;
|
||||
ImageSize = 0;
|
||||
} else {
|
||||
ImageData = (void *)widevine_keybox_data;
|
||||
ImageSize = widevine_keybox_size;
|
||||
ImageData = (void *)0;
|
||||
ImageSize = 0;
|
||||
}
|
||||
|
||||
if (Status != 0) {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue