Measure into the TPM even if SecureBoot is off in shim_lock verify

Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
This commit is contained in:
Tamas K Lengyel 2017-11-06 09:42:18 -07:00 committed by Peter Jones
parent 829d3c8265
commit 555ef92650

6
shim.c
View File

@ -1809,9 +1809,6 @@ EFI_STATUS shim_verify (void *buffer, UINT32 size)
loader_is_participating = 1;
in_protocol = 1;
if (!secure_mode())
goto done;
status = read_header(buffer, size, &context);
if (status != EFI_SUCCESS)
goto done;
@ -1823,6 +1820,9 @@ EFI_STATUS shim_verify (void *buffer, UINT32 size)
/* Measure the binary into the TPM */
tpm_log_pe((EFI_PHYSICAL_ADDRESS)(UINTN)buffer, size, sha1hash, 4);
if (!secure_mode())
goto done;
status = verify_buffer(buffer, size, &context, sha256hash, sha1hash);
done: