]> git.proxmox.com Git - swtpm.git/commitdiff
test: Recreate TPM 1.2 state files with header
authorStefan Berger <stefanb@linux.ibm.com>
Fri, 6 May 2022 22:08:17 +0000 (18:08 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 9 May 2022 14:15:08 +0000 (10:15 -0400)
Recreate a TPM 1.2 state file with header.

The state of the TPM 1.2 must be initialized with Startup(ST_CLEAR)
and then saved so that the proper error code appears as a result
when running this test.

The PCR values was originally created by extending PCR 10 with
sha1("test"). This was recreated using this sequence:

s=$(echo -en test | sha1sum | cut -d " " -f1 | sed -n 's/\([a-f0-9]\{2\}\)/\\x\1/pg')
echo -en $s > input
tss1extend  -ha 10 -if input

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
tests/data/tpmstate1/tpm-00.permall
tests/data/tpmstate1/tpm-00.volatilestate

index f013eec66beb32b120fbba0e60913eca098f3426..18cae9454f948dcaf6cb6879bd39f3bae4f59492 100644 (file)
Binary files a/tests/data/tpmstate1/tpm-00.permall and b/tests/data/tpmstate1/tpm-00.permall differ
index e9d4aedbaf652531b378db186a7e1c83325ba200..83e4c26c8529b79ec7a1cadd42f93e411a856835 100644 (file)
Binary files a/tests/data/tpmstate1/tpm-00.volatilestate and b/tests/data/tpmstate1/tpm-00.volatilestate differ