| 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 /* Testing: ownership testing code and ForceClear. | 6 /* Testing: ownership testing code and ForceClear. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 | 10 |
| 11 #include "tlcl.h" | 11 #include "tlcl.h" |
| 12 | 12 |
| 13 int main(int argc, char** argv) { | 13 int main(int argc, char** argv) { |
| 14 int owned; | 14 int owned; |
| 15 | 15 |
| 16 TlclLibInit(); | 16 TlclLibInit(); |
| 17 TlclStartup(); | 17 TlclStartup(); |
| 18 TlclSelftestfull(); | 18 TlclSelfTestFull(); |
| 19 TlclAssertPhysicalPresence(); | 19 TlclAssertPhysicalPresence(); |
| 20 | 20 |
| 21 owned = TlclIsOwned(); | 21 owned = TlclIsOwned(); |
| 22 printf("tpm is %sowned\n", owned? "" : "NOT "); | 22 printf("tpm is %sowned\n", owned? "" : "NOT "); |
| 23 if (owned) { | 23 if (owned) { |
| 24 TlclForceClear(); | 24 TlclForceClear(); |
| 25 printf("tpm was cleared\n"); | 25 printf("tpm was cleared\n"); |
| 26 } | 26 } |
| 27 | 27 |
| 28 return 0; | 28 return 0; |
| 29 } | 29 } |
| OLD | NEW |