rpc_oper.c
来自「TCG软件栈 linux系统上使用 为可信应用软件提供和 TPM通信的 接」· C语言 代码 · 共 58 行
C
58 行
/* * Licensed Materials - Property of IBM * * trousers - An open source TCG Software Stack * * (C) Copyright International Business Machines Corp. 2007 * */#include <stdlib.h>#include <stdio.h>#include <syslog.h>#include <string.h>#include <netdb.h>#include "trousers/tss.h"#include "trousers_types.h"#include "tcs_tsp.h"#include "tcs_utils.h"#include "tcs_int_literals.h"#include "capabilities.h"#include "tcslog.h"#include "tcsd_wrap.h"#include "tcsd.h"#include "tcs_utils.h"#include "rpc_tcstp_tcs.h"TSS_RESULTtcs_wrap_SetOperatorAuth(struct tcsd_thread_data *data){ TCS_CONTEXT_HANDLE hContext; TCPA_SECRET operatorAuth; TSS_RESULT result; if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) return TCSERR(TSS_E_INTERNAL_ERROR); LogDebugFn("thread %zd context %x", THREAD_ID, hContext); if (getData(TCSD_PACKET_TYPE_SECRET, 1, &operatorAuth, 0, &data->comm)) return TCSERR(TSS_E_INTERNAL_ERROR); MUTEX_LOCK(tcsp_lock); result = TCSP_SetOperatorAuth_Internal(hContext, &operatorAuth); MUTEX_UNLOCK(tcsp_lock); initData(&data->comm, 0); data->comm.hdr.u.result = result; return TSS_SUCCESS;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?