]> git.ipfire.org Git - thirdparty/grub.git/commit
tpm2_key_protector: Add grub-emu support
authorGary Lin <glin@suse.com>
Fri, 15 Nov 2024 07:34:59 +0000 (15:34 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 28 Nov 2024 20:50:56 +0000 (21:50 +0100)
commit76a2bcb99754ee5b4159c35f66042e392139b815
tree5eda53e7d7d1f2f66ae1d07707ebca1fb2b950bc
parent135e0bc8863965eabc70f3c539c39135e0a00791
tpm2_key_protector: Add grub-emu support

As a preparation to test tpm2_key_protector with grub-emu, the new
option, --tpm-device, is introduced to specify the TPM device for
grub-emu so that grub-emu can access an emulated TPM device from
the host.

Since grub-emu can directly access the device on host, it's easy to
implement the essential TCG2 command submission function with the
read/write functions and enable tpm2_key_protector module for grub-emu,
so that we can further test TPM2 key unsealing with grub-emu.

Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
grub-core/Makefile.core.def
grub-core/kern/emu/main.c
grub-core/kern/emu/misc.c
grub-core/lib/tss2/tcg2_emu.c [new file with mode: 0644]
include/grub/emu/misc.h