OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |