| 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 23 matching lines...) Expand all Loading... |
| 34 TPM_HANDLE hDAA; | 34 TPM_HANDLE hDAA; |
| 35 BYTE stage; | 35 BYTE stage; |
| 36 UINT32 inputSize0, inputSize1, outputSize, i; | 36 UINT32 inputSize0, inputSize1, outputSize, i; |
| 37 BYTE *inputData0 = NULL, *inputData1 = NULL,*outputData; | 37 BYTE *inputData0 = NULL, *inputData1 = NULL,*outputData; |
| 38 TSS_RESULT result; | 38 TSS_RESULT result; |
| 39 TPM_AUTH ownerAuth, *pOwnerAuth; | 39 TPM_AUTH ownerAuth, *pOwnerAuth; |
| 40 | 40 |
| 41 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 41 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 42 return TCSERR(TSS_E_INTERNAL_ERROR); | 42 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 43 | 43 |
| 44 » LogDebugFn("thread %zd hDAA %x", THREAD_ID, hDAA); | 44 » LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA); |
| 45 | 45 |
| 46 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm)) | 46 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm)) |
| 47 return TCSERR(TSS_E_INTERNAL_ERROR); | 47 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 48 | 48 |
| 49 if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm)) | 49 if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm)) |
| 50 return TCSERR(TSS_E_INTERNAL_ERROR); | 50 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 51 LogDebug("getData 2 (stage=%d)", (int)stage); | 51 LogDebug("getData 2 (stage=%d)", (int)stage); |
| 52 | 52 |
| 53 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &inputSize0, 0, &data->comm)) | 53 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &inputSize0, 0, &data->comm)) |
| 54 return TCSERR(TSS_E_INTERNAL_ERROR); | 54 return TCSERR(TSS_E_INTERNAL_ERROR); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 TPM_HANDLE hDAA; | 138 TPM_HANDLE hDAA; |
| 139 BYTE stage; | 139 BYTE stage; |
| 140 UINT32 inputSize0, inputSize1, outputSize, i; | 140 UINT32 inputSize0, inputSize1, outputSize, i; |
| 141 BYTE *inputData0 = NULL, *inputData1 = NULL,*outputData; | 141 BYTE *inputData0 = NULL, *inputData1 = NULL,*outputData; |
| 142 TSS_RESULT result; | 142 TSS_RESULT result; |
| 143 TPM_AUTH ownerAuth, *pOwnerAuth; | 143 TPM_AUTH ownerAuth, *pOwnerAuth; |
| 144 | 144 |
| 145 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 145 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 146 return TCSERR(TSS_E_INTERNAL_ERROR); | 146 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 147 | 147 |
| 148 » LogDebugFn("thread %zd hDAA %x", THREAD_ID, hDAA); | 148 » LogDebugFn("thread %ld hDAA %x", THREAD_ID, hDAA); |
| 149 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm)) | 149 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hDAA, 0, &data->comm)) |
| 150 return TCSERR(TSS_E_INTERNAL_ERROR); | 150 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 151 | 151 |
| 152 if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm)) | 152 if (getData(TCSD_PACKET_TYPE_BYTE, 2, &stage, 0, &data->comm)) |
| 153 return TCSERR(TSS_E_INTERNAL_ERROR); | 153 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 154 LogDebugFn("getData 2 (stage=%d)", (int)stage); | 154 LogDebugFn("getData 2 (stage=%d)", (int)stage); |
| 155 | 155 |
| 156 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &inputSize0, 0, &data->comm)) | 156 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &inputSize0, 0, &data->comm)) |
| 157 return TCSERR(TSS_E_INTERNAL_ERROR); | 157 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 158 LogDebug("getData 3 inputSize0=%d", inputSize0); | 158 LogDebug("getData 3 inputSize0=%d", inputSize0); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 free(outputData); | 230 free(outputData); |
| 231 return TCSERR(TSS_E_INTERNAL_ERROR); | 231 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 232 } | 232 } |
| 233 free(outputData); | 233 free(outputData); |
| 234 } else | 234 } else |
| 235 initData(&data->comm, 0); | 235 initData(&data->comm, 0); |
| 236 | 236 |
| 237 data->comm.hdr.u.result = result; | 237 data->comm.hdr.u.result = result; |
| 238 return TSS_SUCCESS; | 238 return TSS_SUCCESS; |
| 239 } | 239 } |
| OLD | NEW |