Skip to content

Commit 9536b79

Browse files
JuergenReppSITAndreas Fuchs
authored andcommitted
FAPI: Fix execution of policy callback for reading PCR registers.
For Policy PCR current PCR registers of the TPM registers can be used to compute the policy digest. The counter in the computed PCR list was not set. Thus a empty PCR list was used for the policy digest computation. Signed-off-by: Juergen Repp <[email protected]>
1 parent 8484239 commit 9536b79

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tss2-fapi/ifapi_policy_callbacks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ ifapi_read_pcr(
373373

374374
/* Initialize digest list with pcr values from TPM */
375375
i_pcr = 0;
376+
(*pcr_values)->count = pcr_digests->count;
376377
for (i = 0; i < out_selection->count; i++) {
377378
for (pcr = 0; pcr < TPM2_MAX_PCRS; pcr++) {
378379
uint8_t byte_idx = pcr / 8;

0 commit comments

Comments
 (0)