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. 2004-2007 | 7 * (C) Copyright International Business Machines Corp. 2004-2007 |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 TSS_RESULT | 30 TSS_RESULT |
31 tcs_wrap_PhysicalSetDeactivated(struct tcsd_thread_data *data) | 31 tcs_wrap_PhysicalSetDeactivated(struct tcsd_thread_data *data) |
32 { | 32 { |
33 TCS_CONTEXT_HANDLE hContext; | 33 TCS_CONTEXT_HANDLE hContext; |
34 TSS_BOOL state; | 34 TSS_BOOL state; |
35 TSS_RESULT result; | 35 TSS_RESULT result; |
36 | 36 |
37 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 37 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
38 return TCSERR(TSS_E_INTERNAL_ERROR); | 38 return TCSERR(TSS_E_INTERNAL_ERROR); |
39 | 39 |
40 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 40 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
41 | 41 |
42 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm)) | 42 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm)) |
43 return TCSERR(TSS_E_INTERNAL_ERROR); | 43 return TCSERR(TSS_E_INTERNAL_ERROR); |
44 | 44 |
45 MUTEX_LOCK(tcsp_lock); | 45 MUTEX_LOCK(tcsp_lock); |
46 | 46 |
47 result = TCSP_PhysicalSetDeactivated_Internal(hContext, state); | 47 result = TCSP_PhysicalSetDeactivated_Internal(hContext, state); |
48 | 48 |
49 MUTEX_UNLOCK(tcsp_lock); | 49 MUTEX_UNLOCK(tcsp_lock); |
50 | 50 |
51 initData(&data->comm, 0); | 51 initData(&data->comm, 0); |
52 data->comm.hdr.u.result = result; | 52 data->comm.hdr.u.result = result; |
53 | 53 |
54 return TSS_SUCCESS; | 54 return TSS_SUCCESS; |
55 } | 55 } |
56 | 56 |
57 TSS_RESULT | 57 TSS_RESULT |
58 tcs_wrap_DisableOwnerClear(struct tcsd_thread_data *data) | 58 tcs_wrap_DisableOwnerClear(struct tcsd_thread_data *data) |
59 { | 59 { |
60 TCS_CONTEXT_HANDLE hContext; | 60 TCS_CONTEXT_HANDLE hContext; |
61 TSS_RESULT result; | 61 TSS_RESULT result; |
62 TPM_AUTH auth; | 62 TPM_AUTH auth; |
63 | 63 |
64 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 64 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
65 return TCSERR(TSS_E_INTERNAL_ERROR); | 65 return TCSERR(TSS_E_INTERNAL_ERROR); |
66 | 66 |
67 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 67 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
68 | 68 |
69 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &auth, 0, &data->comm)) | 69 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &auth, 0, &data->comm)) |
70 return TCSERR(TSS_E_INTERNAL_ERROR); | 70 return TCSERR(TSS_E_INTERNAL_ERROR); |
71 | 71 |
72 MUTEX_LOCK(tcsp_lock); | 72 MUTEX_LOCK(tcsp_lock); |
73 | 73 |
74 result = TCSP_DisableOwnerClear_Internal(hContext, &auth); | 74 result = TCSP_DisableOwnerClear_Internal(hContext, &auth); |
75 | 75 |
76 MUTEX_UNLOCK(tcsp_lock); | 76 MUTEX_UNLOCK(tcsp_lock); |
77 | 77 |
(...skipping 11 matching lines...) Expand all Loading... |
89 | 89 |
90 TSS_RESULT | 90 TSS_RESULT |
91 tcs_wrap_ForceClear(struct tcsd_thread_data *data) | 91 tcs_wrap_ForceClear(struct tcsd_thread_data *data) |
92 { | 92 { |
93 TCS_CONTEXT_HANDLE hContext; | 93 TCS_CONTEXT_HANDLE hContext; |
94 TSS_RESULT result; | 94 TSS_RESULT result; |
95 | 95 |
96 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 96 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
97 return TCSERR(TSS_E_INTERNAL_ERROR); | 97 return TCSERR(TSS_E_INTERNAL_ERROR); |
98 | 98 |
99 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 99 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
100 | 100 |
101 MUTEX_LOCK(tcsp_lock); | 101 MUTEX_LOCK(tcsp_lock); |
102 | 102 |
103 result = TCSP_ForceClear_Internal(hContext); | 103 result = TCSP_ForceClear_Internal(hContext); |
104 | 104 |
105 MUTEX_UNLOCK(tcsp_lock); | 105 MUTEX_UNLOCK(tcsp_lock); |
106 | 106 |
107 initData(&data->comm, 0); | 107 initData(&data->comm, 0); |
108 data->comm.hdr.u.result = result; | 108 data->comm.hdr.u.result = result; |
109 | 109 |
110 return TSS_SUCCESS; | 110 return TSS_SUCCESS; |
111 } | 111 } |
112 | 112 |
113 TSS_RESULT | 113 TSS_RESULT |
114 tcs_wrap_DisableForceClear(struct tcsd_thread_data *data) | 114 tcs_wrap_DisableForceClear(struct tcsd_thread_data *data) |
115 { | 115 { |
116 TCS_CONTEXT_HANDLE hContext; | 116 TCS_CONTEXT_HANDLE hContext; |
117 TSS_RESULT result; | 117 TSS_RESULT result; |
118 | 118 |
119 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 119 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
120 return TCSERR(TSS_E_INTERNAL_ERROR); | 120 return TCSERR(TSS_E_INTERNAL_ERROR); |
121 | 121 |
122 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 122 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
123 | 123 |
124 MUTEX_LOCK(tcsp_lock); | 124 MUTEX_LOCK(tcsp_lock); |
125 | 125 |
126 result = TCSP_DisableForceClear_Internal(hContext); | 126 result = TCSP_DisableForceClear_Internal(hContext); |
127 | 127 |
128 MUTEX_UNLOCK(tcsp_lock); | 128 MUTEX_UNLOCK(tcsp_lock); |
129 | 129 |
130 initData(&data->comm, 0); | 130 initData(&data->comm, 0); |
131 data->comm.hdr.u.result = result; | 131 data->comm.hdr.u.result = result; |
132 | 132 |
133 return TSS_SUCCESS; | 133 return TSS_SUCCESS; |
134 } | 134 } |
135 | 135 |
136 TSS_RESULT | 136 TSS_RESULT |
137 tcs_wrap_PhysicalEnable(struct tcsd_thread_data *data) | 137 tcs_wrap_PhysicalEnable(struct tcsd_thread_data *data) |
138 { | 138 { |
139 TCS_CONTEXT_HANDLE hContext; | 139 TCS_CONTEXT_HANDLE hContext; |
140 TSS_RESULT result; | 140 TSS_RESULT result; |
141 | 141 |
142 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 142 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
143 return TCSERR(TSS_E_INTERNAL_ERROR); | 143 return TCSERR(TSS_E_INTERNAL_ERROR); |
144 | 144 |
145 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 145 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
146 | 146 |
147 MUTEX_LOCK(tcsp_lock); | 147 MUTEX_LOCK(tcsp_lock); |
148 | 148 |
149 result = TCSP_PhysicalEnable_Internal(hContext); | 149 result = TCSP_PhysicalEnable_Internal(hContext); |
150 | 150 |
151 MUTEX_UNLOCK(tcsp_lock); | 151 MUTEX_UNLOCK(tcsp_lock); |
152 | 152 |
153 initData(&data->comm, 0); | 153 initData(&data->comm, 0); |
154 data->comm.hdr.u.result = result; | 154 data->comm.hdr.u.result = result; |
155 | 155 |
156 return TSS_SUCCESS; | 156 return TSS_SUCCESS; |
157 } | 157 } |
158 | 158 |
159 TSS_RESULT | 159 TSS_RESULT |
160 tcs_wrap_SetOwnerInstall(struct tcsd_thread_data *data) | 160 tcs_wrap_SetOwnerInstall(struct tcsd_thread_data *data) |
161 { | 161 { |
162 TCS_CONTEXT_HANDLE hContext; | 162 TCS_CONTEXT_HANDLE hContext; |
163 TSS_BOOL state; | 163 TSS_BOOL state; |
164 TSS_RESULT result; | 164 TSS_RESULT result; |
165 | 165 |
166 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 166 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
167 return TCSERR(TSS_E_INTERNAL_ERROR); | 167 return TCSERR(TSS_E_INTERNAL_ERROR); |
168 | 168 |
169 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 169 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
170 | 170 |
171 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm)) | 171 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm)) |
172 return TCSERR(TSS_E_INTERNAL_ERROR); | 172 return TCSERR(TSS_E_INTERNAL_ERROR); |
173 | 173 |
174 MUTEX_LOCK(tcsp_lock); | 174 MUTEX_LOCK(tcsp_lock); |
175 | 175 |
176 result = TCSP_SetOwnerInstall_Internal(hContext, state); | 176 result = TCSP_SetOwnerInstall_Internal(hContext, state); |
177 | 177 |
178 MUTEX_UNLOCK(tcsp_lock); | 178 MUTEX_UNLOCK(tcsp_lock); |
179 | 179 |
180 initData(&data->comm, 0); | 180 initData(&data->comm, 0); |
181 data->comm.hdr.u.result = result; | 181 data->comm.hdr.u.result = result; |
182 | 182 |
183 return TSS_SUCCESS; | 183 return TSS_SUCCESS; |
184 } | 184 } |
185 | 185 |
186 TSS_RESULT | 186 TSS_RESULT |
187 tcs_wrap_OwnerSetDisable(struct tcsd_thread_data *data) | 187 tcs_wrap_OwnerSetDisable(struct tcsd_thread_data *data) |
188 { | 188 { |
189 TCS_CONTEXT_HANDLE hContext; | 189 TCS_CONTEXT_HANDLE hContext; |
190 TSS_BOOL disableState; | 190 TSS_BOOL disableState; |
191 TPM_AUTH ownerAuth; | 191 TPM_AUTH ownerAuth; |
192 TSS_RESULT result; | 192 TSS_RESULT result; |
193 | 193 |
194 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 194 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
195 return TCSERR(TSS_E_INTERNAL_ERROR); | 195 return TCSERR(TSS_E_INTERNAL_ERROR); |
196 | 196 |
197 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 197 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
198 | 198 |
199 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &disableState, 0, &data->comm)) | 199 if (getData(TCSD_PACKET_TYPE_BOOL, 1, &disableState, 0, &data->comm)) |
200 return TCSERR(TSS_E_INTERNAL_ERROR); | 200 return TCSERR(TSS_E_INTERNAL_ERROR); |
201 | 201 |
202 if (getData(TCSD_PACKET_TYPE_AUTH, 2, &ownerAuth, 0, &data->comm)) | 202 if (getData(TCSD_PACKET_TYPE_AUTH, 2, &ownerAuth, 0, &data->comm)) |
203 return TCSERR(TSS_E_INTERNAL_ERROR); | 203 return TCSERR(TSS_E_INTERNAL_ERROR); |
204 | 204 |
205 MUTEX_LOCK(tcsp_lock); | 205 MUTEX_LOCK(tcsp_lock); |
206 | 206 |
207 result = TCSP_OwnerSetDisable_Internal(hContext, disableState, &ownerAut
h); | 207 result = TCSP_OwnerSetDisable_Internal(hContext, disableState, &ownerAut
h); |
(...skipping 14 matching lines...) Expand all Loading... |
222 | 222 |
223 TSS_RESULT | 223 TSS_RESULT |
224 tcs_wrap_PhysicalDisable(struct tcsd_thread_data *data) | 224 tcs_wrap_PhysicalDisable(struct tcsd_thread_data *data) |
225 { | 225 { |
226 TCS_CONTEXT_HANDLE hContext; | 226 TCS_CONTEXT_HANDLE hContext; |
227 TSS_RESULT result; | 227 TSS_RESULT result; |
228 | 228 |
229 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 229 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
230 return TCSERR(TSS_E_INTERNAL_ERROR); | 230 return TCSERR(TSS_E_INTERNAL_ERROR); |
231 | 231 |
232 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 232 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
233 | 233 |
234 MUTEX_LOCK(tcsp_lock); | 234 MUTEX_LOCK(tcsp_lock); |
235 | 235 |
236 result = TCSP_PhysicalDisable_Internal(hContext); | 236 result = TCSP_PhysicalDisable_Internal(hContext); |
237 | 237 |
238 MUTEX_UNLOCK(tcsp_lock); | 238 MUTEX_UNLOCK(tcsp_lock); |
239 | 239 |
240 initData(&data->comm, 0); | 240 initData(&data->comm, 0); |
241 data->comm.hdr.u.result = result; | 241 data->comm.hdr.u.result = result; |
242 | 242 |
243 return TSS_SUCCESS; | 243 return TSS_SUCCESS; |
244 } | 244 } |
245 | 245 |
246 TSS_RESULT | 246 TSS_RESULT |
247 tcs_wrap_PhysicalPresence(struct tcsd_thread_data *data) | 247 tcs_wrap_PhysicalPresence(struct tcsd_thread_data *data) |
248 { | 248 { |
249 TCS_CONTEXT_HANDLE hContext; | 249 TCS_CONTEXT_HANDLE hContext; |
250 TSS_RESULT result; | 250 TSS_RESULT result; |
251 TCPA_PHYSICAL_PRESENCE phyPresFlags; | 251 TCPA_PHYSICAL_PRESENCE phyPresFlags; |
252 | 252 |
253 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 253 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
254 return TCSERR(TSS_E_INTERNAL_ERROR); | 254 return TCSERR(TSS_E_INTERNAL_ERROR); |
255 | 255 |
256 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 256 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
257 | 257 |
258 if (getData(TCSD_PACKET_TYPE_UINT16, 1, &phyPresFlags, 0, &data->comm)) | 258 if (getData(TCSD_PACKET_TYPE_UINT16, 1, &phyPresFlags, 0, &data->comm)) |
259 return TCSERR(TSS_E_INTERNAL_ERROR); | 259 return TCSERR(TSS_E_INTERNAL_ERROR); |
260 | 260 |
261 MUTEX_LOCK(tcsp_lock); | 261 MUTEX_LOCK(tcsp_lock); |
262 | 262 |
263 result = TCSP_PhysicalPresence_Internal(hContext, phyPresFlags); | 263 result = TCSP_PhysicalPresence_Internal(hContext, phyPresFlags); |
264 | 264 |
265 MUTEX_UNLOCK(tcsp_lock); | 265 MUTEX_UNLOCK(tcsp_lock); |
266 | 266 |
267 initData(&data->comm, 0); | 267 initData(&data->comm, 0); |
268 data->comm.hdr.u.result = result; | 268 data->comm.hdr.u.result = result; |
269 | 269 |
270 return TSS_SUCCESS; | 270 return TSS_SUCCESS; |
271 } | 271 } |
272 | 272 |
273 TSS_RESULT | 273 TSS_RESULT |
274 tcs_wrap_SetTempDeactivated(struct tcsd_thread_data *data) | 274 tcs_wrap_SetTempDeactivated(struct tcsd_thread_data *data) |
275 { | 275 { |
276 TCS_CONTEXT_HANDLE hContext; | 276 TCS_CONTEXT_HANDLE hContext; |
277 TSS_RESULT result; | 277 TSS_RESULT result; |
278 | 278 |
279 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 279 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
280 return TCSERR(TSS_E_INTERNAL_ERROR); | 280 return TCSERR(TSS_E_INTERNAL_ERROR); |
281 | 281 |
282 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 282 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
283 | 283 |
284 MUTEX_LOCK(tcsp_lock); | 284 MUTEX_LOCK(tcsp_lock); |
285 | 285 |
286 result = TCSP_SetTempDeactivated_Internal(hContext); | 286 result = TCSP_SetTempDeactivated_Internal(hContext); |
287 | 287 |
288 MUTEX_UNLOCK(tcsp_lock); | 288 MUTEX_UNLOCK(tcsp_lock); |
289 | 289 |
290 initData(&data->comm, 0); | 290 initData(&data->comm, 0); |
291 data->comm.hdr.u.result = result; | 291 data->comm.hdr.u.result = result; |
292 | 292 |
293 return TSS_SUCCESS; | 293 return TSS_SUCCESS; |
294 } | 294 } |
295 | 295 |
296 #ifdef TSS_BUILD_TSS12 | 296 #ifdef TSS_BUILD_TSS12 |
297 TSS_RESULT | 297 TSS_RESULT |
298 tcs_wrap_SetTempDeactivated2(struct tcsd_thread_data *data) | 298 tcs_wrap_SetTempDeactivated2(struct tcsd_thread_data *data) |
299 { | 299 { |
300 TCS_CONTEXT_HANDLE hContext; | 300 TCS_CONTEXT_HANDLE hContext; |
301 TPM_AUTH operatorAuth, nullAuth, *pAuth; | 301 TPM_AUTH operatorAuth, nullAuth, *pAuth; |
302 TSS_RESULT result; | 302 TSS_RESULT result; |
303 | 303 |
304 memset(&operatorAuth, 0, sizeof(TPM_AUTH)); | 304 memset(&operatorAuth, 0, sizeof(TPM_AUTH)); |
305 memset(&nullAuth, 0, sizeof(TPM_AUTH)); | 305 memset(&nullAuth, 0, sizeof(TPM_AUTH)); |
306 | 306 |
307 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 307 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
308 return TCSERR(TSS_E_INTERNAL_ERROR); | 308 return TCSERR(TSS_E_INTERNAL_ERROR); |
309 | 309 |
310 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 310 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
311 | 311 |
312 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &operatorAuth, 0, &data->comm)) | 312 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &operatorAuth, 0, &data->comm)) |
313 return TCSERR(TSS_E_INTERNAL_ERROR); | 313 return TCSERR(TSS_E_INTERNAL_ERROR); |
314 | 314 |
315 if (memcmp(&nullAuth, &operatorAuth, sizeof(TPM_AUTH))) | 315 if (memcmp(&nullAuth, &operatorAuth, sizeof(TPM_AUTH))) |
316 pAuth = &operatorAuth; | 316 pAuth = &operatorAuth; |
317 else | 317 else |
318 pAuth = NULL; | 318 pAuth = NULL; |
319 | 319 |
320 MUTEX_LOCK(tcsp_lock); | 320 MUTEX_LOCK(tcsp_lock); |
(...skipping 20 matching lines...) Expand all Loading... |
341 TSS_RESULT | 341 TSS_RESULT |
342 tcs_wrap_ResetLockValue(struct tcsd_thread_data *data) | 342 tcs_wrap_ResetLockValue(struct tcsd_thread_data *data) |
343 { | 343 { |
344 TCS_CONTEXT_HANDLE hContext; | 344 TCS_CONTEXT_HANDLE hContext; |
345 TPM_AUTH ownerAuth; | 345 TPM_AUTH ownerAuth; |
346 TSS_RESULT result; | 346 TSS_RESULT result; |
347 | 347 |
348 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 348 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
349 return TCSERR(TSS_E_INTERNAL_ERROR); | 349 return TCSERR(TSS_E_INTERNAL_ERROR); |
350 | 350 |
351 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 351 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
352 | 352 |
353 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &ownerAuth, 0, &data->comm)) | 353 if (getData(TCSD_PACKET_TYPE_AUTH, 1, &ownerAuth, 0, &data->comm)) |
354 return TCSERR(TSS_E_INTERNAL_ERROR); | 354 return TCSERR(TSS_E_INTERNAL_ERROR); |
355 | 355 |
356 MUTEX_LOCK(tcsp_lock); | 356 MUTEX_LOCK(tcsp_lock); |
357 | 357 |
358 result = TCSP_ResetLockValue_Internal(hContext, &ownerAuth); | 358 result = TCSP_ResetLockValue_Internal(hContext, &ownerAuth); |
359 | 359 |
360 MUTEX_UNLOCK(tcsp_lock); | 360 MUTEX_UNLOCK(tcsp_lock); |
361 | 361 |
(...skipping 14 matching lines...) Expand all Loading... |
376 tcs_wrap_FlushSpecific(struct tcsd_thread_data *data) | 376 tcs_wrap_FlushSpecific(struct tcsd_thread_data *data) |
377 { | 377 { |
378 TCS_CONTEXT_HANDLE hContext; | 378 TCS_CONTEXT_HANDLE hContext; |
379 TCS_HANDLE hResHandle; | 379 TCS_HANDLE hResHandle; |
380 TPM_RESOURCE_TYPE resourceType; | 380 TPM_RESOURCE_TYPE resourceType; |
381 TSS_RESULT result; | 381 TSS_RESULT result; |
382 | 382 |
383 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 383 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
384 return TCSERR(TSS_E_INTERNAL_ERROR); | 384 return TCSERR(TSS_E_INTERNAL_ERROR); |
385 | 385 |
386 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 386 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
387 | 387 |
388 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hResHandle, 0, &data->comm)) | 388 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hResHandle, 0, &data->comm)) |
389 return TCSERR(TSS_E_INTERNAL_ERROR); | 389 return TCSERR(TSS_E_INTERNAL_ERROR); |
390 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &resourceType, 0, &data->comm)) | 390 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &resourceType, 0, &data->comm)) |
391 return TCSERR(TSS_E_INTERNAL_ERROR); | 391 return TCSERR(TSS_E_INTERNAL_ERROR); |
392 | 392 |
393 MUTEX_LOCK(tcsp_lock); | 393 MUTEX_LOCK(tcsp_lock); |
394 | 394 |
395 result = TCSP_FlushSpecific_Internal(hContext, hResHandle, resourceType)
; | 395 result = TCSP_FlushSpecific_Internal(hContext, hResHandle, resourceType)
; |
396 | 396 |
397 MUTEX_UNLOCK(tcsp_lock); | 397 MUTEX_UNLOCK(tcsp_lock); |
398 | 398 |
399 initData(&data->comm, 0); | 399 initData(&data->comm, 0); |
400 data->comm.hdr.u.result = result; | 400 data->comm.hdr.u.result = result; |
401 | 401 |
402 return TSS_SUCCESS; | 402 return TSS_SUCCESS; |
403 } | 403 } |
404 #endif | 404 #endif |
OLD | NEW |