srajiv/tpm-tools — pull request #4 by shpedoikal (2012-04-23 19:57:23+00:00)
Title:  tpm_nvdefinespace: add support for PCR sealing

This patch adds the ability to seal an NVRAM area to PCR states for
both reading and writing. PCR indices are passed in two ways.

1. Repeatedly using the -r (read PCR state) and -w (write PCR state)
options. This will cause tpm_nvdefine to read the current PCR value from
the TPM and use that to lock the NV area for reading or writing.

2. Using the -f option to pass a file containing PCR values. The format
of the file is this:

[r/w] [PCR index] [Hash value in ascii hex]

example:
r 12 00112233445566778899AABBCCDDEEFF001122233
w 15 00112233445566778899AABBCCDDEEFF001122233

This would lock the NVRAM area such that PCR 12 must have the listed
hash value in order to be read, and PCR 15 such that it must have the
same hash value to be written.

Signed-off-by: Kent Yoder