diff options
author | Dan Streetman <ddstreet@ieee.org> | 2023-07-13 04:36:37 +0200 |
---|---|---|
committer | Dan Streetman <ddstreet@ieee.org> | 2023-08-04 16:57:07 +0200 |
commit | 07c040611751facf075dab7a72ab4935142dda3c (patch) | |
tree | 2cb05be077c0f7d364e7b7d15634073f7ecf31f3 /src/creds | |
parent | tpm2: change tpm2_calculate_policy_pcr(), tpm2_calculate_sealing_policy() to ... (diff) | |
download | systemd-07c040611751facf075dab7a72ab4935142dda3c.tar.xz systemd-07c040611751facf075dab7a72ab4935142dda3c.zip |
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.
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/creds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c index 679b0750de..36531d7d18 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -860,7 +860,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_TPM2_PCRS: /* For fixed hash PCR policies only */ - r = tpm2_parse_pcr_argument(optarg, &arg_tpm2_pcr_mask); + r = tpm2_parse_pcr_argument_to_mask(optarg, &arg_tpm2_pcr_mask); if (r < 0) return r; @@ -874,7 +874,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_TPM2_PUBLIC_KEY_PCRS: /* For public key PCR policies only */ - r = tpm2_parse_pcr_argument(optarg, &arg_tpm2_public_key_pcr_mask); + r = tpm2_parse_pcr_argument_to_mask(optarg, &arg_tpm2_public_key_pcr_mask); if (r < 0) return r; |