pcrlist.sh 385 B

1234567891011121314151617181920212223242526272829
  1. # SPDX-License-Identifier: BSD-3-Clause
  2. source helpers.sh
  3. cleanup() {
  4. rm -f pcrs.out
  5. if [ "$1" != "no-shut-down" ]; then
  6. shut_down
  7. fi
  8. }
  9. trap cleanup EXIT
  10. start_up
  11. cleanup "no-shut-down"
  12. tpm2 pcrread > pcrs.out
  13. yaml_verify pcrs.out
  14. tpm2 pcrread -Q 0x04
  15. tpm2 pcrread -Q -o pcrs.out 0x04:17,18,19+sha256:0,17,18,19
  16. test -e pcrs.out
  17. tpm2 pcrread -Q
  18. exit 0