| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 BYTE *pcrDataOut; | 43 BYTE *pcrDataOut; |
| 44 UINT32 sigSize; | 44 UINT32 sigSize; |
| 45 BYTE *sig; | 45 BYTE *sig; |
| 46 TSS_RESULT result; | 46 TSS_RESULT result; |
| 47 | 47 |
| 48 int i; | 48 int i; |
| 49 | 49 |
| 50 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 50 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
| 51 return TCSERR(TSS_E_INTERNAL_ERROR); | 51 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 52 | 52 |
| 53 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 53 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
| 54 | 54 |
| 55 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm)) | 55 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm)) |
| 56 return TCSERR(TSS_E_INTERNAL_ERROR); | 56 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 57 if (getData(TCSD_PACKET_TYPE_NONCE, 2, &antiReplay, 0, &data->comm)) | 57 if (getData(TCSD_PACKET_TYPE_NONCE, 2, &antiReplay, 0, &data->comm)) |
| 58 return TCSERR(TSS_E_INTERNAL_ERROR); | 58 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 59 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &pcrDataSizeIn, 0, &data->comm)) | 59 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &pcrDataSizeIn, 0, &data->comm)) |
| 60 return TCSERR(TSS_E_INTERNAL_ERROR); | 60 return TCSERR(TSS_E_INTERNAL_ERROR); |
| 61 pcrDataIn = (BYTE *)calloc(1, pcrDataSizeIn); | 61 pcrDataIn = (BYTE *)calloc(1, pcrDataSizeIn); |
| 62 if (pcrDataIn == NULL) { | 62 if (pcrDataIn == NULL) { |
| 63 LogError("malloc of %d bytes failed.", pcrDataSizeIn); | 63 LogError("malloc of %d bytes failed.", pcrDataSizeIn); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 free(pcrDataOut); | 119 free(pcrDataOut); |
| 120 free(sig); | 120 free(sig); |
| 121 } else | 121 } else |
| 122 initData(&data->comm, 0); | 122 initData(&data->comm, 0); |
| 123 | 123 |
| 124 data->comm.hdr.u.result = result; | 124 data->comm.hdr.u.result = result; |
| 125 return TSS_SUCCESS; | 125 return TSS_SUCCESS; |
| 126 } | 126 } |
| OLD | NEW |