]> git.proxmox.com Git - swtpm.git/commit
test: Recreate TPM 1.2 state files with header
authorStefan Berger <stefanb@linux.ibm.com>
Fri, 6 May 2022 20:47:42 +0000 (16:47 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 9 May 2022 14:15:08 +0000 (10:15 -0400)
commitcafdcfe71a9c10048323858f3aff9cce13d7f5e4
tree8d939b3679f9dc3e9b2e221acedd4f25cb45319b
parent3d2747a1be514571006724877c07b8305d5cd28e
test: Recreate TPM 1.2 state files with header

Recreate TPM 1.2 state files with similar content but with the state
file header. The older versions of the state files were created before
the header was introduced in v0.1. The goal is to be able to get rid
of code supporting pre-v0.1 files that had no header.

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/tpmstate2/tpm-00.permall
tests/data/tpmstate2/tpm-00.volatilestate