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

Side by Side Diff: src/tcs/rpc/tcstp/rpc_aik.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_admin.c ('k') | src/tcs/rpc/tcstp/rpc_audit.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 BYTE *prgbPlatCred = NULL; 49 BYTE *prgbPlatCred = NULL;
50 UINT32 pcConfCredSize; 50 UINT32 pcConfCredSize;
51 BYTE *prgbConfCred = NULL; 51 BYTE *prgbConfCred = NULL;
52 TSS_RESULT result; 52 TSS_RESULT result;
53 53
54 int i; 54 int i;
55 55
56 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 56 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
57 return TCSERR(TSS_E_INTERNAL_ERROR); 57 return TCSERR(TSS_E_INTERNAL_ERROR);
58 58
59 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 59 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
60 60
61 if (getData(TCSD_PACKET_TYPE_ENCAUTH, 1, &identityAuth, 0, &data->comm)) 61 if (getData(TCSD_PACKET_TYPE_ENCAUTH, 1, &identityAuth, 0, &data->comm))
62 return TCSERR(TSS_E_INTERNAL_ERROR); 62 return TCSERR(TSS_E_INTERNAL_ERROR);
63 if (getData(TCSD_PACKET_TYPE_DIGEST, 2, &privCAHash, 0, &data->comm)) 63 if (getData(TCSD_PACKET_TYPE_DIGEST, 2, &privCAHash, 0, &data->comm))
64 return TCSERR(TSS_E_INTERNAL_ERROR); 64 return TCSERR(TSS_E_INTERNAL_ERROR);
65 65
66 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &idKeyInfoSize, 0, &data->comm)) 66 if (getData(TCSD_PACKET_TYPE_UINT32, 3, &idKeyInfoSize, 0, &data->comm))
67 return TCSERR(TSS_E_INTERNAL_ERROR); 67 return TCSERR(TSS_E_INTERNAL_ERROR);
68 idKeyInfo = (BYTE *) calloc(1, idKeyInfoSize); 68 idKeyInfo = (BYTE *) calloc(1, idKeyInfoSize);
69 if (idKeyInfo == NULL) { 69 if (idKeyInfo == NULL) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 TCS_KEY_HANDLE idKeyHandle; 161 TCS_KEY_HANDLE idKeyHandle;
162 TPM_AUTH *pIdKeyAuth = NULL, *pOwnerAuth = NULL, auth1, auth2; 162 TPM_AUTH *pIdKeyAuth = NULL, *pOwnerAuth = NULL, auth1, auth2;
163 UINT32 SymmetricKeySize, blobSize; 163 UINT32 SymmetricKeySize, blobSize;
164 BYTE *SymmetricKey, *blob; 164 BYTE *SymmetricKey, *blob;
165 TSS_RESULT result; 165 TSS_RESULT result;
166 UINT32 i; 166 UINT32 i;
167 167
168 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 168 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
169 return TCSERR(TSS_E_INTERNAL_ERROR); 169 return TCSERR(TSS_E_INTERNAL_ERROR);
170 170
171 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 171 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
172 172
173 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &idKeyHandle, 0, &data->comm)) 173 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &idKeyHandle, 0, &data->comm))
174 return TCSERR(TSS_E_INTERNAL_ERROR); 174 return TCSERR(TSS_E_INTERNAL_ERROR);
175 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &blobSize, 0, &data->comm)) 175 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &blobSize, 0, &data->comm))
176 return TCSERR(TSS_E_INTERNAL_ERROR); 176 return TCSERR(TSS_E_INTERNAL_ERROR);
177 177
178 if ((blob = malloc(blobSize)) == NULL) 178 if ((blob = malloc(blobSize)) == NULL)
179 return TCSERR(TSS_E_OUTOFMEMORY); 179 return TCSERR(TSS_E_OUTOFMEMORY);
180 180
181 if (getData(TCSD_PACKET_TYPE_PBYTE, 3, blob, blobSize, &data->comm)) { 181 if (getData(TCSD_PACKET_TYPE_PBYTE, 3, blob, blobSize, &data->comm)) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm)) 253 if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
254 return TCSERR(TSS_E_INTERNAL_ERROR); 254 return TCSERR(TSS_E_INTERNAL_ERROR);
255 255
256 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &CredType, 0, &data->comm)) 256 if (getData(TCSD_PACKET_TYPE_UINT32, 1, &CredType, 0, &data->comm))
257 return TCSERR(TSS_E_INTERNAL_ERROR); 257 return TCSERR(TSS_E_INTERNAL_ERROR);
258 258
259 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &CredAccessMode, 0, &data->comm) ) 259 if (getData(TCSD_PACKET_TYPE_UINT32, 2, &CredAccessMode, 0, &data->comm) )
260 return TCSERR(TSS_E_INTERNAL_ERROR); 260 return TCSERR(TSS_E_INTERNAL_ERROR);
261 261
262 » LogDebugFn("thread %zd context %x", THREAD_ID, hContext); 262 » LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
263 263
264 result = TCS_GetCredential_Internal(hContext, CredType, CredAccessMode, 264 result = TCS_GetCredential_Internal(hContext, CredType, CredAccessMode,
265 &CredSize, &CredData); 265 &CredSize, &CredData);
266 266
267 if (result == TSS_SUCCESS) { 267 if (result == TSS_SUCCESS) {
268 initData(&data->comm, 2); 268 initData(&data->comm, 2);
269 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &CredSize, 0, &data->com m)) 269 if (setData(TCSD_PACKET_TYPE_UINT32, 0, &CredSize, 0, &data->com m))
270 goto internal_error; 270 goto internal_error;
271 if (setData(TCSD_PACKET_TYPE_PBYTE, 1, CredData, CredSize, &data ->comm)) 271 if (setData(TCSD_PACKET_TYPE_PBYTE, 1, CredData, CredSize, &data ->comm))
272 goto internal_error; 272 goto internal_error;
273 273
274 free(CredData); 274 free(CredData);
275 } else 275 } else
276 initData(&data->comm, 0); 276 initData(&data->comm, 0);
277 277
278 data->comm.hdr.u.result = result; 278 data->comm.hdr.u.result = result;
279 return TSS_SUCCESS; 279 return TSS_SUCCESS;
280 280
281 internal_error: 281 internal_error:
282 free(CredData); 282 free(CredData);
283 return TCSERR(TSS_E_INTERNAL_ERROR); 283 return TCSERR(TSS_E_INTERNAL_ERROR);
284 } 284 }
285 #endif 285 #endif
OLDNEW
« no previous file with comments | « src/tcs/rpc/tcstp/rpc_admin.c ('k') | src/tcs/rpc/tcstp/rpc_audit.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698