diff options
Diffstat (limited to 'tests/tpm_lite/tpmtest_earlyextend.c')
-rw-r--r-- | tests/tpm_lite/tpmtest_earlyextend.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/tpm_lite/tpmtest_earlyextend.c b/tests/tpm_lite/tpmtest_earlyextend.c new file mode 100644 index 00000000..837960c1 --- /dev/null +++ b/tests/tpm_lite/tpmtest_earlyextend.c @@ -0,0 +1,26 @@ +/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Test of early use of TPM_Extend. + */ + +#include <stdio.h> +#include <stdint.h> +#include <stdlib.h> + +#include "tlcl.h" +#include "tlcl_tests.h" + +int main(int argc, char** argv) { + uint8_t value_in[20]; + uint8_t value_out[20]; + + TlclLibInit(); + TPM_CHECK(TlclStartup()); + TPM_CHECK(TlclContinueSelfTest()); + TPM_CHECK(TlclExtend(1, value_in, value_out)); + printf("TEST SUCCEEDED\n"); + exit(0); +} |