Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: src/tcs/rpc/tcstp/rpc_audit.c

Issue 3581012: Upgrade from trousers 0.3.3 to 0.3.6 and from testsuite 0.2 to 0.3. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/trousers.git
Patch Set: git cl push Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_aik.c ('k') | src/tcs/rpc/tcstp/rpc_auth.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Licensed Materials - Property of IBM 3 * Licensed Materials - Property of IBM
4 * 4 *
5 * trousers - An open source TCG Software Stack 5 * trousers - An open source TCG Software Stack
6 * 6 *
7 * (C) Copyright International Business Machines Corp. 2007 7 * (C) Copyright International Business Machines Corp. 2007
8 * 8 *
9 */ 9 */
10 10
(...skipping 21 matching lines...) Expand all
32 { 32 {
33 TCS_CONTEXT_HANDLE hContext; 33 TCS_CONTEXT_HANDLE hContext;
34 TPM_AUTH ownerAuth; 34 TPM_AUTH ownerAuth;
35 UINT32 ulOrdinal; 35 UINT32 ulOrdinal;
36 TSS_BOOL bAuditState; 36 TSS_BOOL bAuditState;
37 TSS_RESULT result; 37 TSS_RESULT result;
38 38
39 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 39 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
40 return TCSERR(TSS_E_INTERNAL_ERROR); 40 return TCSERR(TSS_E_INTERNAL_ERROR);
41 41
42 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 42 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
43 43
44 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &ulOrdinal, 0, &data->comm)) 44 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &ulOrdinal, 0, &data->comm))
45 return TCSERR(TSS_E_INTERNAL_ERROR); 45 return TCSERR(TSS_E_INTERNAL_ERROR);
46 46
47 if (getData(TCSD_PACKET_TYPE_BOOL, 2, &bAuditState, 0, &data->comm)) 47 if (getData(TCSD_PACKET_TYPE_BOOL, 2, &bAuditState, 0, &data->comm))
48 return TCSERR(TSS_E_INTERNAL_ERROR); 48 return TCSERR(TSS_E_INTERNAL_ERROR);
49 49
50 if (getData(TCSD_PACKET_TYPE_AUTH, 3, &ownerAuth, 0, &data->comm)) 50 if (getData(TCSD_PACKET_TYPE_AUTH, 3, &ownerAuth, 0, &data->comm))
51 return TCSERR(TSS_E_INTERNAL_ERROR); 51 return TCSERR(TSS_E_INTERNAL_ERROR);
52 52
(...skipping 24 matching lines...) Expand all
77 UINT32 counterValueSize; 77 UINT32 counterValueSize;
78 BYTE *counterValue; 78 BYTE *counterValue;
79 TSS_BOOL more; 79 TSS_BOOL more;
80 UINT32 ordSize; 80 UINT32 ordSize;
81 UINT32 *ordList; 81 UINT32 *ordList;
82 TSS_RESULT result; 82 TSS_RESULT result;
83 83
84 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 84 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
85 return TCSERR(TSS_E_INTERNAL_ERROR); 85 return TCSERR(TSS_E_INTERNAL_ERROR);
86 86
87 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 87 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
88 88
89 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &startOrdinal, 0, &data->comm)) 89 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &startOrdinal, 0, &data->comm))
90 return TCSERR(TSS_E_INTERNAL_ERROR); 90 return TCSERR(TSS_E_INTERNAL_ERROR);
91 91
92 MUTEX_LOCK(tcsp_lock); 92 MUTEX_LOCK(tcsp_lock);
93 93
94 result = TCSP_GetAuditDigest_Internal(hContext, startOrdinal, &auditDige st, &counterValueSize, &counterValue, 94 result = TCSP_GetAuditDigest_Internal(hContext, startOrdinal, &auditDige st, &counterValueSize, &counterValue,
95 &more, &ordSize, &ordList); 95 &more, &ordSize, &ordList);
96 96
97 MUTEX_UNLOCK(tcsp_lock); 97 MUTEX_UNLOCK(tcsp_lock);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 BYTE *sig; 151 BYTE *sig;
152 TSS_RESULT result; 152 TSS_RESULT result;
153 int i; 153 int i;
154 154
155 memset(&privAuth, 0, sizeof(TPM_AUTH)); 155 memset(&privAuth, 0, sizeof(TPM_AUTH));
156 memset(&nullAuth, 0, sizeof(TPM_AUTH)); 156 memset(&nullAuth, 0, sizeof(TPM_AUTH));
157 157
158 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 158 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
159 return TCSERR(TSS_E_INTERNAL_ERROR); 159 return TCSERR(TSS_E_INTERNAL_ERROR);
160 160
161 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 161 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
162 162
163 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &keyHandle, 0, &data->comm)) 163 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &keyHandle, 0, &data->comm))
164 return TCSERR(TSS_E_INTERNAL_ERROR); 164 return TCSERR(TSS_E_INTERNAL_ERROR);
165 if (getData(TCSD_PACKET_TYPE_BOOL, 2, &closeAudit, 0, &data->comm)) 165 if (getData(TCSD_PACKET_TYPE_BOOL, 2, &closeAudit, 0, &data->comm))
166 return TCSERR(TSS_E_INTERNAL_ERROR); 166 return TCSERR(TSS_E_INTERNAL_ERROR);
167 if (getData(TCSD_PACKET_TYPE_NONCE, 3, &antiReplay, 0, &data->comm)) 167 if (getData(TCSD_PACKET_TYPE_NONCE, 3, &antiReplay, 0, &data->comm))
168 return TCSERR(TSS_E_INTERNAL_ERROR); 168 return TCSERR(TSS_E_INTERNAL_ERROR);
169 if (getData(TCSD_PACKET_TYPE_AUTH, 4, &privAuth, 0, &data->comm)) 169 if (getData(TCSD_PACKET_TYPE_AUTH, 4, &privAuth, 0, &data->comm))
170 return TCSERR(TSS_E_INTERNAL_ERROR); 170 return TCSERR(TSS_E_INTERNAL_ERROR);
171 171
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return TCSERR(TSS_E_INTERNAL_ERROR); 221 return TCSERR(TSS_E_INTERNAL_ERROR);
222 } 222 }
223 free(sig); 223 free(sig);
224 } else 224 } else
225 initData(&data->comm, 0); 225 initData(&data->comm, 0);
226 226
227 data->comm.hdr.u.result = result; 227 data->comm.hdr.u.result = result;
228 228
229 return TSS_SUCCESS; 229 return TSS_SUCCESS;
230 } 230 }
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_aik.c ('k') | src/tcs/rpc/tcstp/rpc_auth.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698