tpm: Log TPM 2 digest structure in little endian format

The parameters for extending the PCRs of a TPM 2 are written in
big endian format when sent to the TPM. However, the log needs
to be written in little endian format, so we cannot just copy
the structure into the log as-is. To support the little endian
format in the log, we extend the function writing the TPM 2
digest structure with a parameter that allows us to choose the
endianess of a few parameters. We then rewrite the digest structure
in little endian format for the log.

Signed-off-by: Stefan Berger <>
1 file changed
tree: 99c5bf5482e007a099f384f9d038d4721aeebe1e
  1. docs/
  2. scripts/
  3. src/
  4. vgasrc/
  5. .gitignore
  8. Makefile