summaryrefslogtreecommitdiff
path: root/src/boot/measure.c
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2023-02-06 11:31:59 -0500
committerDan Streetman <ddstreet@ieee.org>2023-03-09 10:46:19 -0500
commitc69bd0abdbd06ee89068227c67890358f5764c3d (patch)
treeee678937f2d5ebd3d06e5fe4bb91ed1dd648678c /src/boot/measure.c
parentaa07a4fa353d758562c4bec8c7d3b1d44b55e573 (diff)
downloadsystemd-c69bd0abdbd06ee89068227c67890358f5764c3d.tar.gz
tpm2: add/rename functions to manage pcr selections
This renames some functions to match other to/from_string() naming, and allows better management of TPML_PCR_SELECTION and TPMS_PCR_SELECTION structs.
Diffstat (limited to 'src/boot/measure.c')
-rw-r--r--src/boot/measure.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/boot/measure.c b/src/boot/measure.c
index 18838686a9..072f38f200 100644
--- a/src/boot/measure.c
+++ b/src/boot/measure.c
@@ -870,7 +870,9 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
return log_error_errno(tpmalg, "Unsupported PCR bank");
TPML_PCR_SELECTION pcr_selection;
- tpm2_pcr_mask_to_selection(1 << TPM_PCR_INDEX_KERNEL_IMAGE, tpmalg, &pcr_selection);
+ tpm2_tpml_pcr_selection_from_mask(1 << TPM_PCR_INDEX_KERNEL_IMAGE,
+ tpmalg,
+ &pcr_selection);
rc = sym_Esys_PolicyPCR(
c->esys_context,