Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: src/tcs/rpc/tcstp/rpc_seal.c

Issue 3581012: Upgrade from trousers 0.3.3 to 0.3.6 and from testsuite 0.2 to 0.3. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/trousers.git
Patch Set: git cl push Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_random.c ('k') | src/tcs/rpc/tcstp/rpc_selftest.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 BYTE *outData; 42 BYTE *outData;
43 43
44 int i = 0; 44 int i = 0;
45 45
46 memset(&emptyAuth, 0, sizeof(TPM_AUTH)); 46 memset(&emptyAuth, 0, sizeof(TPM_AUTH));
47 memset(&pubAuth, 0, sizeof(TPM_AUTH)); 47 memset(&pubAuth, 0, sizeof(TPM_AUTH));
48 48
49 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &hContext, 0, &data->comm)) 49 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &hContext, 0, &data->comm))
50 return TCSERR(TSS_E_INTERNAL_ERROR); 50 return TCSERR(TSS_E_INTERNAL_ERROR);
51 51
52 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 52 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
53 53
54 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &keyHandle, 0, &data->comm)) 54 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &keyHandle, 0, &data->comm))
55 return TCSERR(TSS_E_INTERNAL_ERROR); 55 return TCSERR(TSS_E_INTERNAL_ERROR);
56 if (getData(TCSD_PACKET_TYPE_ENCAUTH, i++, &KeyUsageAuth, 0, &data->comm )) 56 if (getData(TCSD_PACKET_TYPE_ENCAUTH, i++, &KeyUsageAuth, 0, &data->comm ))
57 return TCSERR(TSS_E_INTERNAL_ERROR); 57 return TCSERR(TSS_E_INTERNAL_ERROR);
58 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &PCRInfoSize, 0, &data->comm)) 58 if (getData(TCSD_PACKET_TYPE_UINT32, i++, &PCRInfoSize, 0, &data->comm))
59 return TCSERR(TSS_E_INTERNAL_ERROR); 59 return TCSERR(TSS_E_INTERNAL_ERROR);
60 60
61 if (PCRInfoSize > 0) { 61 if (PCRInfoSize > 0) {
62 PCRInfo = calloc(1, PCRInfoSize); 62 PCRInfo = calloc(1, PCRInfoSize);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 UINT32 outDataSize; 164 UINT32 outDataSize;
165 BYTE *outData; 165 BYTE *outData;
166 TSS_RESULT result; 166 TSS_RESULT result;
167 167
168 memset(&emptyAuth, 0, sizeof(TPM_AUTH)); 168 memset(&emptyAuth, 0, sizeof(TPM_AUTH));
169 169
170 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 170 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
171 return TCSERR(TSS_E_INTERNAL_ERROR); 171 return TCSERR(TSS_E_INTERNAL_ERROR);
172 172
173 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 173 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
174 174
175 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &parentHandle, 0, &data->comm)) 175 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &parentHandle, 0, &data->comm))
176 return TCSERR(TSS_E_INTERNAL_ERROR); 176 return TCSERR(TSS_E_INTERNAL_ERROR);
177 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &inDataSize, 0, &data->comm)) 177 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &inDataSize, 0, &data->comm))
178 return TCSERR(TSS_E_INTERNAL_ERROR); 178 return TCSERR(TSS_E_INTERNAL_ERROR);
179 179
180 inData = calloc(1, inDataSize); 180 inData = calloc(1, inDataSize);
181 if (inData == NULL) { 181 if (inData == NULL) {
182 LogError("malloc of %d bytes failed.", inDataSize); 182 LogError("malloc of %d bytes failed.", inDataSize);
183 return TCSERR(TSS_E_OUTOFMEMORY); 183 return TCSERR(TSS_E_OUTOFMEMORY);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return TCSERR(TSS_E_INTERNAL_ERROR); 242 return TCSERR(TSS_E_INTERNAL_ERROR);
243 } 243 }
244 free(outData); 244 free(outData);
245 } else 245 } else
246 initData(&data->comm, 0); 246 initData(&data->comm, 0);
247 247
248 data->comm.hdr.u.result = result; 248 data->comm.hdr.u.result = result;
249 249
250 return TSS_SUCCESS; 250 return TSS_SUCCESS;
251 } 251 }
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_random.c ('k') | src/tcs/rpc/tcstp/rpc_selftest.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698