]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2: add Tpm2PCRValue struct and associated functions
authorDan Streetman <ddstreet@ieee.org>
Wed, 12 Jul 2023 01:23:36 +0000 (21:23 -0400)
committerDan Streetman <ddstreet@ieee.org>
Fri, 4 Aug 2023 14:57:05 +0000 (10:57 -0400)
commit323eb4803a29a9cc255aa16ef7cab3a00429b146
treec9f2e69743f52e8fe440e698ea863ed9fc23a077
parent13b551744b9df9ea08d7e06dee57a8cea7b48d1b
tpm2: add Tpm2PCRValue struct and associated functions

Add a new struct that can represent a PCR index, hash, and value all
together. This replaces code (e.g. the tpm2_pcr_read() parameters) that
required using both a TPML_PCR_SELECTION as well as array of TPM2B_DIGEST
entries, which was difficult to correlate the selection hash/index to each
digest.
src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c
src/cryptsetup/cryptsetup.c
src/shared/tpm2-util.c
src/shared/tpm2-util.h