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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 UINT32 sigSize; | 41 UINT32 sigSize; |
42 BYTE *sig; | 42 BYTE *sig; |
43 TSS_RESULT result; | 43 TSS_RESULT result; |
44 | 44 |
45 int i; | 45 int i; |
46 | 46 |
47 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) | 47 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) |
48 return TCSERR(TSS_E_INTERNAL_ERROR); | 48 return TCSERR(TSS_E_INTERNAL_ERROR); |
49 | 49 |
50 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); | 50 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext); |
51 | 51 |
52 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm)) | 52 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hKey, 0, &data->comm)) |
53 return TCSERR(TSS_E_INTERNAL_ERROR); | 53 return TCSERR(TSS_E_INTERNAL_ERROR); |
54 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &areaToSignSize, 0, &data->comm)
) | 54 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &areaToSignSize, 0, &data->comm)
) |
55 return TCSERR(TSS_E_INTERNAL_ERROR); | 55 return TCSERR(TSS_E_INTERNAL_ERROR); |
56 | 56 |
57 areaToSign = calloc(1, areaToSignSize); | 57 areaToSign = calloc(1, areaToSignSize); |
58 if (areaToSign == NULL) { | 58 if (areaToSign == NULL) { |
59 LogError("malloc of %d bytes failed.", areaToSignSize); | 59 LogError("malloc of %d bytes failed.", areaToSignSize); |
60 return TCSERR(TSS_E_OUTOFMEMORY); | 60 return TCSERR(TSS_E_OUTOFMEMORY); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 free(sig); | 97 free(sig); |
98 return TCSERR(TSS_E_INTERNAL_ERROR); | 98 return TCSERR(TSS_E_INTERNAL_ERROR); |
99 } | 99 } |
100 free(sig); | 100 free(sig); |
101 } else | 101 } else |
102 initData(&data->comm, 0); | 102 initData(&data->comm, 0); |
103 | 103 |
104 data->comm.hdr.u.result = result; | 104 data->comm.hdr.u.result = result; |
105 return TSS_SUCCESS; | 105 return TSS_SUCCESS; |
106 } | 106 } |
OLD | NEW |