u-boot/test/py/tests/test_efi_secboot
Weizhao Ouyang 3b7d26eb2b efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check
According to UEFI v2.10 spec section 8.2.6, if a caller invokes the
SetVariables() service, it will produce a digest from hash(VariableName,
VendorGuid, Attributes, TimeStamp, DataNew_variable_content), then the
firmware that implements the SetVariable() service will compare the
digest with the result of applying the signer’s public key to the
signature. For EFI variable append write, efitools sign-efi-sig-list has
an option "-a" to add EFI_VARIABLE_APPEND_WRITE attr, and u-boot will
drop this attribute in efi_set_variable_int(). So if a caller uses
"sign-efi-sig-list -a" to create the authenticated variable, this append
write will fail in the u-boot due to "hash check failed".

This patch resumes writing the EFI_VARIABLE_APPEND_WRITE attr to ensure
that the hash check is correct. And also update the "test_efi_secboot"
test case to compliance with the change.

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2024-06-10 15:01:44 +02:00
..
conftest.py efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check 2024-06-10 15:01:44 +02:00
defs.py test: fix pydoc issues for EFI tests 2023-05-04 09:57:43 +02:00
forge_image.sh test/py: efi_secboot: add a test for a forged signed image 2022-07-05 14:37:16 +02:00
openssl.cnf test/py: efi_secboot: add test for intermediate certificates 2020-08-13 22:37:36 +02:00
test_authvar.py efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check 2024-06-10 15:01:44 +02:00
test_signed.py efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check 2024-06-10 15:01:44 +02:00
test_signed_intca.py efi_loader: improve error handling in try_load_entry() 2024-05-01 07:38:29 +02:00
test_unsigned.py efi_loader: improve error handling in try_load_entry() 2024-05-01 07:38:29 +02:00