tpm2: change tpm2_parse_pcr_argument() parameters to parse to Tpm2PCRValue array

In order to allow users to specify expected PCR values, change the
tpm2_parse_pcr_argument() to parse the text argument into an array of
Tpm2PCRValue objects, which provide not only the selected PCR indexes, but also
(optionally) the hash algorithm and hash value for each PCR index.
This commit is contained in:
Dan Streetman
2023-08-04 10:57:07 -04:00
parent 6e8fb3ad5f
commit 07c0406117
7 changed files with 358 additions and 125 deletions
+1 -1
View File
@@ -399,7 +399,7 @@ static int parse_one_option(const char *option) {
} else if ((val = startswith(option, "tpm2-pcrs="))) {
r = tpm2_parse_pcr_argument(val, &arg_tpm2_pcr_mask);
r = tpm2_parse_pcr_argument_to_mask(val, &arg_tpm2_pcr_mask);
if (r < 0)
return r;