mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-24 16:19:22 +00:00
tss2: Add TPM2_PCR_Event command
The TPM2_PCR_Event command is introduced to tss2 to allow the user to extend a specific PCR. The related data structure and unmarshal function are also introduced. However, simply invoking TPM2_PCR_Event does not automatically record the event into the TPM event log. The TPM event log is primarily maintained by the system firmware (e.g., BIOS/UEFI). Therefore, for most standard use cases, the recommended method for extending PCRs and ensuring proper event logging is to utilize the system firmware functions. There are specific scenarios where direct use of TPM2_PCR_Event becomes necessary. For instance, in environments lacking system firmware support for PCR extension, such as the grub-emu, TPM2_PCR_Event serves as the only available method to extend PCRs. Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
e1b9d92a8b
commit
b2549b4d34
6 files changed
+88
No files matched your search
@@ -1118,6 +1118,24 @@ grub_Tss2_MU_TPML_DIGEST_Unmarshal (grub_tpm2_buffer_t buffer,
|
||||
grub_Tss2_MU_TPM2B_DIGEST_Unmarshal (buffer, &digest->digests[i]);
|
||||
}
|
||||
|
||||
void
|
||||
grub_Tss2_MU_TPML_DIGEST_VALUE_Unmarshal (grub_tpm2_buffer_t buffer,
|
||||
TPML_DIGEST_VALUES_t *digests)
|
||||
{
|
||||
grub_uint32_t i;
|
||||
|
||||
grub_tpm2_buffer_unpack_u32 (buffer, &digests->count);
|
||||
|
||||
if (digests->count > TPM_NUM_PCR_BANKS)
|
||||
{
|
||||
buffer->error = true;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < digests->count; i++)
|
||||
grub_Tss2_MU_TPMT_HA_Unmarshal (buffer, &digests->digests[i]);
|
||||
}
|
||||
|
||||
void
|
||||
grub_Tss2_MU_TPMS_SIGNATURE_RSA_Unmarshal (grub_tpm2_buffer_t buffer,
|
||||
TPMS_SIGNATURE_RSA_t *rsa)
|
||||
|
||||
Reference in new issue
Block a user