OLD | NEW |
1 /* | 1 /* |
2 * The Initial Developer of the Original Code is Intel Corporation. | 2 * The Initial Developer of the Original Code is Intel Corporation. |
3 * Portions created by Intel Corporation are Copyright (C) 2007 Intel Corporatio
n. | 3 * Portions created by Intel Corporation are Copyright (C) 2007 Intel Corporatio
n. |
4 * All Rights Reserved. | 4 * All Rights Reserved. |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License as published by | 7 * it under the terms of the GNU General Public License as published by |
8 * the Free Software Foundation; either version 2 of the License, or | 8 * the Free Software Foundation; either version 2 of the License, or |
9 * (at your option) any later version. | 9 * (at your option) any later version. |
10 * | 10 * |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 result = Tspi_Policy_SetSecret(hPolicy, TESTSUITE_OWNER_SECRET_MODE, | 149 result = Tspi_Policy_SetSecret(hPolicy, TESTSUITE_OWNER_SECRET_MODE, |
150 TESTSUITE_OWNER_SECRET_LEN, TESTSUITE_OW
NER_SECRET); | 150 TESTSUITE_OWNER_SECRET_LEN, TESTSUITE_OW
NER_SECRET); |
151 if (result != TSS_SUCCESS) | 151 if (result != TSS_SUCCESS) |
152 { | 152 { |
153 print_error("Tspi_Policy_SetSecret", result); | 153 print_error("Tspi_Policy_SetSecret", result); |
154 print_error_exit(nameOfFunction, err_string(result)); | 154 print_error_exit(nameOfFunction, err_string(result)); |
155 Tspi_Context_FreeMemory(hContext, NULL); | 155 Tspi_Context_FreeMemory(hContext, NULL); |
156 Tspi_Context_Close(hContext); | 156 Tspi_Context_Close(hContext); |
157 exit(result); | 157 exit(result); |
158 } | 158 } |
| 159 |
| 160 Tspi_TPM_SetStatus(hTPM, TSS_TPMSTATUS_RESETLOCK, 1); |
159 #endif | 161 #endif |
160 | 162 |
161 /* Set the index to be defined. */ | 163 /* Set the index to be defined. */ |
162 result = Tspi_SetAttribUint32(hNVStore, TSS_TSPATTRIB_NV_INDEX, 0,0x0001
1101); | 164 result = Tspi_SetAttribUint32(hNVStore, TSS_TSPATTRIB_NV_INDEX, 0,0x0001
1101); |
163 if (result != TSS_SUCCESS) | 165 if (result != TSS_SUCCESS) |
164 { | 166 { |
165 print_error("Tspi_SetAttribUint32 for setting NV index", result)
; | 167 print_error("Tspi_SetAttribUint32 for setting NV index", result)
; |
166 print_error_exit(nameOfFunction, err_string(result)); | 168 print_error_exit(nameOfFunction, err_string(result)); |
167 Tspi_Context_FreeMemory(hContext, NULL); | 169 Tspi_Context_FreeMemory(hContext, NULL); |
168 Tspi_Context_Close(hContext); | 170 Tspi_Context_Close(hContext); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 240 } |
239 else{ | 241 else{ |
240 print_error("Tspi_NV_DefineSpace", result); | 242 print_error("Tspi_NV_DefineSpace", result); |
241 print_end_test(nameOfFunction); | 243 print_end_test(nameOfFunction); |
242 Tspi_Context_FreeMemory(hContext, NULL); | 244 Tspi_Context_FreeMemory(hContext, NULL); |
243 Tspi_Context_Close(hContext); | 245 Tspi_Context_Close(hContext); |
244 exit(result); | 246 exit(result); |
245 } | 247 } |
246 #endif | 248 #endif |
247 } | 249 } |
OLD | NEW |