tpm: Don't create an EventLog if algorithms are misconfigured
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 24 Dec 2024 16:01:08 +0000 (08:01 -0800)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 7 Jan 2025 13:45:51 +0000 (15:45 +0200)
commit8dc886ce314282de9d65fac1e8c68ee40d30f678
tree2149d32d6448b69d0a4930d938d7f24912a21d1b
parent27891e85f3cb3912c737bf36276f830d9d02d6c8
tpm: Don't create an EventLog if algorithms are misconfigured

We already check the active banks vs what U-Boot was compiled with when
trying to extend a PCR and we refuse to do so if the TPM active ones
don't match the ones U-Boot supports.

Do the same thing for the EventLog creation since extending will fail
anyway and print a message so the user can figure out the missing
algorithms.

Co-developed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/tpm-v2.h
lib/tpm-v2.c
lib/tpm_tcg2.c