summaryrefslogtreecommitdiff
path: root/test/py/tests/test_efi_secboot/test_signed.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-15 09:01:01 -0400
committerTom Rini <trini@konsulko.com>2020-08-15 09:01:01 -0400
commit789bfb52668ee609b2043de645e2f94bbd24fd1f (patch)
tree168ecaa3ef75f85141d3586b2447c6a8f3a7af32 /test/py/tests/test_efi_secboot/test_signed.py
parentc0192950dfcd82035a928de32c24335f3d2c0f7a (diff)
parenta4bda5ebab8246004caaca2e17bc865d265bf57a (diff)
Merge tag 'efi-2020-10-rc3-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-10-rc3 (2) This series includes bug fixes for: * UEFI secure boot - images with multiple signatures * UEFI secure boot - support for intermediate certificates * corrections for UEFI unit tests * missing loadaddr on MAIX board
Diffstat (limited to 'test/py/tests/test_efi_secboot/test_signed.py')
-rw-r--r--test/py/tests/test_efi_secboot/test_signed.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/test/py/tests/test_efi_secboot/test_signed.py b/test/py/tests/test_efi_secboot/test_signed.py
index 7531bbac6a5..1443ba7b62b 100644
--- a/test/py/tests/test_efi_secboot/test_signed.py
+++ b/test/py/tests/test_efi_secboot/test_signed.py
@@ -157,7 +157,8 @@ class TestEfiSignedImage(object):
u_boot_console.restart_uboot()
disk_img = efi_boot_env
with u_boot_console.log.section('Test Case 5a'):
- # Test Case 5a, rejected if any of signatures is not verified
+ # Test Case 5a, authenticated even if only one of signatures
+ # is verified
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'fatload host 0:1 4000000 db.auth',
@@ -171,8 +172,7 @@ class TestEfiSignedImage(object):
'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed_2sigs ""',
'efidebug boot next 1',
'efidebug test bootmgr'])
- assert '\'HELLO\' failed' in ''.join(output)
- assert 'efi_start_image() returned: 26' in ''.join(output)
+ assert 'Hello, world!' in ''.join(output)
with u_boot_console.log.section('Test Case 5b'):
# Test Case 5b, authenticated if both signatures are verified
@@ -181,19 +181,29 @@ class TestEfiSignedImage(object):
'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize db'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed_2sigs ""',
'efidebug boot next 1',
- 'bootefi bootmgr'])
+ 'efidebug test bootmgr'])
assert 'Hello, world!' in ''.join(output)
with u_boot_console.log.section('Test Case 5c'):
- # Test Case 5c, rejected if any of signatures is revoked
+ # Test Case 5c, not rejected if one of signatures (digest of
+ # certificate) is revoked
output = u_boot_console.run_command_list([
- 'fatload host 0:1 4000000 dbx_hash1.auth',
+ 'fatload host 0:1 4000000 dbx_hash.auth',
'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx'])
assert 'Failed to set EFI variable' not in ''.join(output)
output = u_boot_console.run_command_list([
- 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed_2sigs ""',
+ 'efidebug boot next 1',
+ 'efidebug test bootmgr'])
+ assert 'Hello, world!' in ''.join(output)
+
+ with u_boot_console.log.section('Test Case 5d'):
+ # Test Case 5d, rejected if both of signatures are revoked
+ output = u_boot_console.run_command_list([
+ 'fatload host 0:1 4000000 dbx_hash1.auth',
+ 'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize dbx'])
+ assert 'Failed to set EFI variable' not in ''.join(output)
+ output = u_boot_console.run_command_list([
'efidebug boot next 1',
'efidebug test bootmgr'])
assert '\'HELLO\' failed' in ''.join(output)