| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /* This program mimicks the TPM usage from read-only firmware. It exercises | 6 /* This program mimicks the TPM usage from read-only firmware. It exercises |
| 7 * the TPM functionality needed in the read-only firmware. It is meant to be | 7 * the TPM functionality needed in the read-only firmware. It is meant to be |
| 8 * integrated with the rest of the read-only firmware. It is also provided as | 8 * integrated with the rest of the read-only firmware. It is also provided as |
| 9 * a test. | 9 * a test. |
| 10 */ | 10 */ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (TlclWrite(INDEX0, (uint8_t*) &index_0, sizeof(index_0) != TPM_SUCCESS)) { | 97 if (TlclWrite(INDEX0, (uint8_t*) &index_0, sizeof(index_0) != TPM_SUCCESS)) { |
| 98 error("could not write index 0\n"); | 98 error("could not write index 0\n"); |
| 99 } | 99 } |
| 100 TlclWriteLock(INDEX0); | 100 TlclWriteLock(INDEX0); |
| 101 if (TlclWrite(INDEX0, (uint8_t*) &index_0, sizeof(index_0)) == TPM_SUCCESS) { | 101 if (TlclWrite(INDEX0, (uint8_t*) &index_0, sizeof(index_0)) == TPM_SUCCESS) { |
| 102 error("index 0 is not locked\n"); | 102 error("index 0 is not locked\n"); |
| 103 } | 103 } |
| 104 | 104 |
| 105 /* Done for now. | 105 /* Done for now. |
| 106 */ | 106 */ |
| 107 printf("Test completed successfully\n"); | 107 printf("TEST SUCCEEDED\n"); |
| 108 exit(0); | 108 exit(0); |
| 109 } | 109 } |
| OLD | NEW |