]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: Fix spec ID event creation
authorRuchika Gupta <ruchika.gupta@linaro.org>
Tue, 14 Sep 2021 06:44:31 +0000 (12:14 +0530)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 28 Sep 2021 15:50:55 +0000 (18:50 +0300)
commit8ca5a330e2ff0d86ffdd02efd2cbcb22fc26b643
treeef6420bf3394a1114afe8c40fd31c646d1376a57
parent2f99e10c3dfb21555fb11606e9128a74cd0aad67
efi_loader: Fix spec ID event creation

TCG EFI Protocol Specification defines the number_of_algorithms
field in spec ID event to be equal to the number of active
algorithms supported by the TPM device. In current implementation,
this field is populated with the count of all algorithms supported
by the TPM which leads to incorrect spec ID event creation.

Similarly, the algorithm array in spec ID event should be a variable
length array with length being equal to the number_of_algorithms field.
In current implementation this is defined as a fixed length array
which has been fixed.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
CC: Masahisa Kojima <masahisa.kojima@linaro.org>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/efi_tcg2.h
lib/efi_loader/efi_tcg2.c