| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 #ifdef CLEAR_TEST_INDEX | 273 #ifdef CLEAR_TEST_INDEX |
| 274 Tspi_Context_GetTpmObject(hContext, &hTPM); | 274 Tspi_Context_GetTpmObject(hContext, &hTPM); |
| 275 Tspi_GetPolicyObject(hTPM, TSS_POLICY_USAGE, &hPolicy); | 275 Tspi_GetPolicyObject(hTPM, TSS_POLICY_USAGE, &hPolicy); |
| 276 Tspi_Policy_SetSecret(hPolicy, TESTSUITE_OWNER_SECRET_MODE, | 276 Tspi_Policy_SetSecret(hPolicy, TESTSUITE_OWNER_SECRET_MODE, |
| 277 TESTSUITE_OWNER_SECRET_LEN, TESTSUITE_OWNER_SECRET); | 277 TESTSUITE_OWNER_SECRET_LEN, TESTSUITE_OWNER_SECRET); |
| 278 Tspi_NV_ReleaseSpace(hNVStore); | 278 Tspi_NV_ReleaseSpace(hNVStore); |
| 279 #endif | 279 #endif |
| 280 | 280 |
| 281 #ifdef NV_LOCKED | 281 #ifdef NV_LOCKED |
| 282 if (TSS_ERROR_CODE(result)== TPM_E_AUTH_CONFLICT) | 282 if (TSS_ERROR_CODE(result) != TPM_E_AUTH_CONFLICT) |
| 283 #else | 283 #else |
| 284 if (result== TSS_SUCCESS) | 284 if (result != TSS_SUCCESS) |
| 285 #endif | 285 #endif |
| 286 { | 286 { |
| 287 print_error("Tspi_NV_ReadValue", result); | 287 print_error("Tspi_NV_ReadValue", result); |
| 288 Tspi_Context_FreeMemory(hContext, NULL); | 288 Tspi_Context_FreeMemory(hContext, NULL); |
| 289 Tspi_Context_Close(hContext); | 289 Tspi_Context_Close(hContext); |
| 290 exit(result); | 290 exit(result); |
| 291 } | 291 } |
| 292 | 292 |
| 293 result = Testsuite_Transport_Final(hContext, hSigningKey); | 293 result = Testsuite_Transport_Final(hContext, hSigningKey); |
| 294 » if (result != TSS_SUCCESS) | 294 » if (result == TSS_SUCCESS) |
| 295 { | 295 { |
| 296 print_success(nameOfFunction, result); | 296 print_success(nameOfFunction, result); |
| 297 print_end_test(nameOfFunction); | 297 print_end_test(nameOfFunction); |
| 298 Tspi_Context_FreeMemory(hContext, NULL); | 298 Tspi_Context_FreeMemory(hContext, NULL); |
| 299 Tspi_Context_Close(hContext); | 299 Tspi_Context_Close(hContext); |
| 300 exit(0); | 300 exit(0); |
| 301 } else { | 301 } else { |
| 302 print_error(nameOfFunction, result); | 302 print_error(nameOfFunction, result); |
| 303 print_end_test(nameOfFunction); | 303 print_end_test(nameOfFunction); |
| 304 Tspi_Context_FreeMemory(hContext, NULL); | 304 Tspi_Context_FreeMemory(hContext, NULL); |
| 305 Tspi_Context_Close(hContext); | 305 Tspi_Context_Close(hContext); |
| 306 if ( result == TSS_SUCCESS ) | 306 if ( result == TSS_SUCCESS ) |
| 307 exit(-1); | 307 exit(-1); |
| 308 exit(result); | 308 exit(result); |
| 309 } | 309 } |
| 310 } | 310 } |
| OLD | NEW |