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

Side by Side Diff: tpm/tpm_owner.c

Issue 660204: Upgrade to tpm-emulator version 0.7. (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « tpm/tpm_nv_storage.c ('k') | tpm/tpm_startup.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 /* Software-Based Trusted Platform Module (TPM) Emulator for Linux 1 /* Software-based Trusted Platform Module (TPM) Emulator
2 * Copyright (C) 2004 Mario Strasser <mast@gmx.net>, 2 * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net>
3 * Swiss Federal Institute of Technology (ETH) Zurich
4 * 3 *
5 * This module is free software; you can redistribute it and/or modify 4 * This module is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, 6 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version. 7 * or (at your option) any later version.
9 * 8 *
10 * This module is distributed in the hope that it will be useful, 9 * This module is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 12 * GNU General Public License for more details.
14 * 13 *
15 * $Id$ 14 * $Id: tpm_owner.c 374 2010-02-16 14:00:35Z mast $
16 */ 15 */
17 16
18 #include "tpm_emulator.h" 17 #include "tpm_emulator.h"
19 #include "tpm_commands.h" 18 #include "tpm_commands.h"
20 #include "tpm_data.h" 19 #include "tpm_data.h"
21 #include "tpm_handles.h" 20 #include "tpm_handles.h"
22 #include "crypto/rsa.h" 21 #include "crypto/rsa.h"
23 22
24 /* 23 /*
25 * Admin Opt-in ([TPM_Part3], Section 5) 24 * Admin Opt-in ([TPM_Part3], Section 5)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 /* set permanent flags */ 216 /* set permanent flags */
218 tpmData.permanent.flags.owned = FALSE; 217 tpmData.permanent.flags.owned = FALSE;
219 tpmData.permanent.flags.operator = FALSE; 218 tpmData.permanent.flags.operator = FALSE;
220 tpmData.permanent.flags.disableOwnerClear = FALSE; 219 tpmData.permanent.flags.disableOwnerClear = FALSE;
221 tpmData.permanent.flags.ownership = TRUE; 220 tpmData.permanent.flags.ownership = TRUE;
222 tpmData.permanent.flags.disable = FALSE; 221 tpmData.permanent.flags.disable = FALSE;
223 tpmData.permanent.flags.deactivated = FALSE; 222 tpmData.permanent.flags.deactivated = FALSE;
224 tpmData.permanent.flags.maintenanceDone = FALSE; 223 tpmData.permanent.flags.maintenanceDone = FALSE;
225 tpmData.permanent.flags.allowMaintenance = TRUE; 224 tpmData.permanent.flags.allowMaintenance = TRUE;
226 tpmData.permanent.flags.disableFullDALogicInfo = FALSE; 225 tpmData.permanent.flags.disableFullDALogicInfo = FALSE;
227 #ifdef TPM_KEEP_PUBEK_READABLE 226 if (tpmConf & TPM_CONF_KEEP_PUBEK_READABLE) {
228 tpmData.permanent.flags.readPubek = TRUE; 227 tpmData.permanent.flags.readPubek = TRUE;
229 #else 228 } else {
230 tpmData.permanent.flags.readPubek = FALSE; 229 tpmData.permanent.flags.readPubek = FALSE;
231 #endif 230 }
232 /* release all counters */ 231 /* release all counters */
233 for (i = 0; i < TPM_MAX_COUNTERS; i++) 232 for (i = 0; i < TPM_MAX_COUNTERS; i++)
234 memset(&tpmData.permanent.data.counters[i], 0, sizeof(TPM_COUNTER_VALUE)); 233 memset(&tpmData.permanent.data.counters[i], 0, sizeof(TPM_COUNTER_VALUE));
235 /* invalidate family and delegates table */ 234 /* invalidate family and delegates table */
236 for (i = 0; i < TPM_NUM_FAMILY_TABLE_ENTRY; i++) { 235 for (i = 0; i < TPM_NUM_FAMILY_TABLE_ENTRY; i++) {
237 memset(&tpmData.permanent.data.familyTable.famRow[i], 0, 236 memset(&tpmData.permanent.data.familyTable.famRow[i], 0,
238 sizeof(TPM_FAMILY_TABLE_ENTRY)); 237 sizeof(TPM_FAMILY_TABLE_ENTRY));
239 } 238 }
240 for (i = 0; i < TPM_NUM_DELEGATE_TABLE_ENTRY; i++) { 239 for (i = 0; i < TPM_NUM_DELEGATE_TABLE_ENTRY; i++) {
241 memset(&tpmData.permanent.data.delegateTable.delRow[i], 0, 240 memset(&tpmData.permanent.data.delegateTable.delRow[i], 0,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 316
318 TPM_RESULT TSC_ResetEstablishmentBit() 317 TPM_RESULT TSC_ResetEstablishmentBit()
319 { 318 {
320 info("TSC_ResetEstablishmentBit()"); 319 info("TSC_ResetEstablishmentBit()");
321 /* locality must be three or four */ 320 /* locality must be three or four */
322 if (tpmData.stany.flags.localityModifier != 3 321 if (tpmData.stany.flags.localityModifier != 3
323 && tpmData.stany.flags.localityModifier != 4) return TPM_BAD_LOCALITY; 322 && tpmData.stany.flags.localityModifier != 4) return TPM_BAD_LOCALITY;
324 /* as we do not have such a bit we do nothing and just return true */ 323 /* as we do not have such a bit we do nothing and just return true */
325 return TPM_SUCCESS; 324 return TPM_SUCCESS;
326 } 325 }
OLDNEW
« no previous file with comments | « tpm/tpm_nv_storage.c ('k') | tpm/tpm_startup.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698