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

Side by Side Diff: src/tcs/tcsi_own.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/tcs_pbg.c ('k') | src/tcs/tcsi_random.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 7 * (C) Copyright International Business Machines Corp. 2004
8 * 8 *
9 */ 9 */
10 10
(...skipping 23 matching lines...) Expand all
34 UINT32 srkInfoSize, /*in */ 34 UINT32 srkInfoSize, /*in */
35 BYTE * srkInfo, /*in */ 35 BYTE * srkInfo, /*in */
36 TPM_AUTH * ownerAuth, /* in, out */ 36 TPM_AUTH * ownerAuth, /* in, out */
37 UINT32 * srkKeySize, /*out */ 37 UINT32 * srkKeySize, /*out */
38 BYTE ** srkKey) /*out */ 38 BYTE ** srkKey) /*out */
39 { 39 {
40 UINT64 offset; 40 UINT64 offset;
41 UINT32 paramSize; 41 UINT32 paramSize;
42 TSS_RESULT result; 42 TSS_RESULT result;
43 TSS_KEY srkKeyContainer; 43 TSS_KEY srkKeyContainer;
44 BYTE fake_pubkey[256] = { 0, }, fake_srk[2048] = { 0, };
44 BYTE oldAuthDataUsage; 45 BYTE oldAuthDataUsage;
45 BYTE txBlob[TSS_TPM_TXBLOB_SIZE]; 46 BYTE txBlob[TSS_TPM_TXBLOB_SIZE];
46 47
47 if ((result = ctx_verify_context(hContext))) 48 if ((result = ctx_verify_context(hContext)))
48 goto done; 49 goto done;
49 50
50 if ((result = auth_mgr_check(hContext, &ownerAuth->AuthHandle))) 51 if ((result = auth_mgr_check(hContext, &ownerAuth->AuthHandle)))
51 goto done; 52 goto done;
52 53
53 /* Check on the Atmel Bug Patch */ 54 /* Check on the Atmel Bug Patch */
(...skipping 24 matching lines...) Expand all
78 goto done; 79 goto done;
79 } 80 }
80 81
81 if (srkKeyContainer.authDataUsage != oldAuthDataUsage) { 82 if (srkKeyContainer.authDataUsage != oldAuthDataUsage) {
82 LogDebug("AuthDataUsage was changed by TPM. Atmel Bug. Fixing it in PS"); 83 LogDebug("AuthDataUsage was changed by TPM. Atmel Bug. Fixing it in PS");
83 srkKeyContainer.authDataUsage = oldAuthDataUsage; 84 srkKeyContainer.authDataUsage = oldAuthDataUsage;
84 } 85 }
85 86
86 #ifdef TSS_BUILD_PS 87 #ifdef TSS_BUILD_PS
87 { 88 {
88 BYTE fake_pubkey[256] = { 0, }, fake_srk[2048] = { 0, };
89 BYTE *save; 89 BYTE *save;
90 90
91 /* Once the key file is created, it stays forever. There could be 91 /* Once the key file is created, it stays forever. There could be
92 * migratable keys in the hierarchy that are still usefu l to someone. 92 * migratable keys in the hierarchy that are still usefu l to someone.
93 */ 93 */
94 result = ps_remove_key(&SRK_UUID); 94 result = ps_remove_key(&SRK_UUID);
95 if (result != TSS_SUCCESS && result != TCSERR(TSS_E_PS_K EY_NOTFOUND)) { 95 if (result != TSS_SUCCESS && result != TCSERR(TSS_E_PS_K EY_NOTFOUND)) {
96 destroy_key_refs(&srkKeyContainer); 96 destroy_key_refs(&srkKeyContainer);
97 LogError("Error removing SRK from key file."); 97 LogError("Error removing SRK from key file.");
98 *srkKeySize = 0; 98 *srkKeySize = 0;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 result = UnloadBlob_Header(txBlob, &paramSize); 160 result = UnloadBlob_Header(txBlob, &paramSize);
161 if (!result) { 161 if (!result) {
162 result = tpm_rsp_parse(TPM_ORD_OwnerClear, txBlob, paramSize, ow nerAuth); 162 result = tpm_rsp_parse(TPM_ORD_OwnerClear, txBlob, paramSize, ow nerAuth);
163 } 163 }
164 LogResult("Ownerclear", result); 164 LogResult("Ownerclear", result);
165 done: 165 done:
166 auth_mgr_release_auth(ownerAuth, NULL, hContext); 166 auth_mgr_release_auth(ownerAuth, NULL, hContext);
167 return result; 167 return result;
168 } 168 }
169 169
OLDNEW
« no previous file with comments | « src/tcs/tcs_pbg.c ('k') | src/tcs/tcsi_random.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698