| 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-2006 | 7 * (C) Copyright International Business Machines Corp. 2004-2006 |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 tcs_wrap_OIAP(struct tcsd_thread_data *data) | 31 tcs_wrap_OIAP(struct tcsd_thread_data *data) |
| 32 { | 32 { |
| 33 TCS_CONTEXT_HANDLE hContext; | 33 TCS_CONTEXT_HANDLE hContext; |
| 34 TCS_AUTHHANDLE authHandle; | 34 TCS_AUTHHANDLE authHandle; |
| 35 TCPA_NONCE n0; | 35 TCPA_NONCE n0; |
| 36 TSS_RESULT result; | 36 TSS_RESULT result; |
| 37 | 37 |
| 38 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 38 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 39 return TCSERR(TSS_E_INTERNAL_ERROR); | 39 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 40 | 40 |
| 41 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 41 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
| 42 | 42 |
| 43 MUTEX_LOCK(tcsp_lock); | 43 MUTEX_LOCK(tcsp_lock); |
| 44 | 44 |
| 45 result = auth_mgr_oiap(hContext, &authHandle, &n0); | 45 result = auth_mgr_oiap(hContext, &authHandle, &n0); |
| 46 | 46 |
| 47 MUTEX_UNLOCK(tcsp_lock); | 47 MUTEX_UNLOCK(tcsp_lock); |
| 48 | 48 |
| 49 if (result == TSS_SUCCESS) { | 49 if (result == TSS_SUCCESS) { |
| 50 initData(&data->comm, 2); | 50 initData(&data->comm, 2); |
| 51 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &authHandle, 0, &data->c
omm)) { | 51 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &authHandle, 0, &data->c
omm)) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 TCPA_NONCE nonceOddOSAP; | 70 TCPA_NONCE nonceOddOSAP; |
| 71 | 71 |
| 72 TCS_AUTHHANDLE authHandle; | 72 TCS_AUTHHANDLE authHandle; |
| 73 TCPA_NONCE nonceEven; | 73 TCPA_NONCE nonceEven; |
| 74 TCPA_NONCE nonceEvenOSAP; | 74 TCPA_NONCE nonceEvenOSAP; |
| 75 TSS_RESULT result; | 75 TSS_RESULT result; |
| 76 | 76 |
| 77 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 77 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 78 return TCSERR(TSS_E_INTERNAL_ERROR); | 78 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 79 | 79 |
| 80 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 80 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
| 81 | 81 |
| 82 if (getData(TCSD_PACKET_TYPE_UINT16, 1, &entityType, 0, &data->comm)) | 82 if (getData(TCSD_PACKET_TYPE_UINT16, 1, &entityType, 0, &data->comm)) |
| 83 return TCSERR(TSS_E_INTERNAL_ERROR); | 83 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 84 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &entityValue, 0, &data->comm)) | 84 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &entityValue, 0, &data->comm)) |
| 85 return TCSERR(TSS_E_INTERNAL_ERROR); | 85 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 86 if (getData(TCSD_PACKET_TYPE_NONCE, 3, &nonceOddOSAP, 0, &data->comm)) | 86 if (getData(TCSD_PACKET_TYPE_NONCE, 3, &nonceOddOSAP, 0, &data->comm)) |
| 87 return TCSERR(TSS_E_INTERNAL_ERROR); | 87 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 88 | 88 |
| 89 MUTEX_LOCK(tcsp_lock); | 89 MUTEX_LOCK(tcsp_lock); |
| 90 | 90 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 104 if (setData(TCSD_PACKET_TYPE_NONCE, 2, &nonceEvenOSAP, 0, &data-
>comm)) { | 104 if (setData(TCSD_PACKET_TYPE_NONCE, 2, &nonceEvenOSAP, 0, &data-
>comm)) { |
| 105 return TCSERR(TSS_E_INTERNAL_ERROR); | 105 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 106 } | 106 } |
| 107 } else | 107 } else |
| 108 initData(&data->comm, 0); | 108 initData(&data->comm, 0); |
| 109 | 109 |
| 110 data->comm.hdr.u.result = result; | 110 data->comm.hdr.u.result = result; |
| 111 | 111 |
| 112 return TSS_SUCCESS; | 112 return TSS_SUCCESS; |
| 113 } | 113 } |
| OLD | NEW |