3
* Licensed Materials - Property of IBM
5
* trousers - An open source TCG Software Stack
7
* (C) Copyright International Business Machines Corp. 2007
16
#include "trousers/tss.h"
17
#include "trousers/trousers.h"
18
#include "trousers_types.h"
20
#include "hosttable.h"
21
#include "tcsd_wrap.h"
22
#include "rpc_tcstp_tsp.h"
26
RPC_SetOperatorAuth_TP(struct host_table_entry *hte,
27
TCPA_SECRET *operatorAuth) /* in */
31
initData(&hte->comm, 2);
32
hte->comm.hdr.u.ordinal = TCSD_ORD_SETOPERATORAUTH;
33
LogDebugFn("TCS Context: 0x%x", hte->tcsContext);
35
if (setData(TCSD_PACKET_TYPE_UINT32, 0, &hte->tcsContext, 0, &hte->comm))
36
return TSPERR(TSS_E_INTERNAL_ERROR);
37
if (setData(TCSD_PACKET_TYPE_SECRET, 1, operatorAuth, 0, &hte->comm))
38
return TSPERR(TSS_E_INTERNAL_ERROR);
40
result = sendTCSDPacket(hte);
42
if (result == TSS_SUCCESS)
43
result = hte->comm.hdr.u.result;