CA
如下实现一个简单的CA代码示例,它使用了不同的Params类型
#include <err.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/* OP-TEE TEE client API (built by optee_client) */
#include <tee_client_api.h>
/* To the the UUID (found the the TA's h-file(s)) */
#include <hello_world_ta.h>
#define CMD_TEST_VALUE 0x001
#define CMD_TEST_BUFFER 0x002
#define TA_HELLO_WORLD_UUID {
0xc02ffd4f, 0xa7a3, 0xb1c3,
{
0x92, 0x08, 0x37, 0x06, 0xe4, 0xc8, 0xb1, 0xaf } }
int main(int argc ,char **argv)
{
TEEC_Result res;
TEEC_Context ctx;
TEEC_Session sess;
TEEC_Operation op;
TEEC_UUID uuid = TA_HELLO_WORLD_UUID;
uint32_t err_origin;
/* Initialize a context connecting us to the TEE */
res = TEEC_InitializeContext(NULL<