diff mbox series

[5/5] test: capsule: Remove logic to add public key ESL

Message ID 20230815162623.1824357-6-sughosh.ganu@linaro.org
State Superseded
Headers show
Series capsule: Embed the public key ESL as part of build | expand

Commit Message

Sughosh Ganu Aug. 15, 2023, 4:26 p.m. UTC
The public key EFI Signature List(ESL) needed for capsule
authentication is now embedded into the platform's DTB as part of the
build. Remove the superfluous logic from the test setup.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since RFC series:
* New patch

 test/py/tests/test_efi_capsule/conftest.py   | 28 +++++---------------
 test/py/tests/test_efi_capsule/signature.dts | 10 -------
 2 files changed, 7 insertions(+), 31 deletions(-)
 delete mode 100644 test/py/tests/test_efi_capsule/signature.dts
diff mbox series

Patch

diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index 7eead9bc64..67761a9708 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -49,33 +49,19 @@  def efi_capsule_data(request, u_boot_config):
             check_call('cp %s/capsule_pub_key_bad.crt %s/SIGNER2.crt'
                        % (key_dir, data_dir), shell=True)
 
-            # Update dtb adding capsule certificate
-            check_call('cd %s; '
-                       'cp %s/test/py/tests/test_efi_capsule/signature.dts .'
-                       % (data_dir, u_boot_config.source_dir), shell=True)
+        if capsule_auth_enabled:
             check_call('cd %s; '
-                       'dtc -@ -I dts -O dtb -o signature.dtbo signature.dts; '
-                       'fdtoverlay -i %s/arch/sandbox/dts/test.dtb '
-                            '-o test_sig.dtb signature.dtbo'
+                       'cp %s/arch/sandbox/dts/test.dtb test_sig.dtb'
                        % (data_dir, u_boot_config.build_dir), shell=True)
-
         # Update dtb to add the version information
         check_call('cd %s; '
                    'cp %s/test/py/tests/test_efi_capsule/version.dts .'
                    % (data_dir, u_boot_config.source_dir), shell=True)
-        if capsule_auth_enabled:
-            check_call('cd %s; '
-                       'dtc -@ -I dts -O dtb -o version.dtbo version.dts; '
-                       'fdtoverlay -i test_sig.dtb '
-                            '-o test_ver.dtb version.dtbo'
-                       % (data_dir), shell=True)
-        else:
-            check_call('cd %s; '
-                       'dtc -@ -I dts -O dtb -o version.dtbo version.dts; '
-                       'fdtoverlay -i %s/arch/sandbox/dts/test.dtb '
-                            '-o test_ver.dtb version.dtbo'
-                       % (data_dir, u_boot_config.build_dir), shell=True)
-
+        check_call('cd %s; '
+                   'dtc -@ -I dts -O dtb -o version.dtbo version.dts; '
+                   'fdtoverlay -i %s/arch/sandbox/dts/test.dtb '
+                   '-o test_ver.dtb version.dtbo'
+                   % (data_dir, u_boot_config.build_dir), shell=True)
 
         check_call('cp %s/u-boot_bin_env.itb %s ' % (u_boot_config.build_dir, data_dir), shell=True)
         check_call('cp %s/Test* %s ' % (u_boot_config.build_dir, data_dir), shell=True)
diff --git a/test/py/tests/test_efi_capsule/signature.dts b/test/py/tests/test_efi_capsule/signature.dts
deleted file mode 100644
index 078cfc76c9..0000000000
--- a/test/py/tests/test_efi_capsule/signature.dts
+++ /dev/null
@@ -1,10 +0,0 @@ 
-// SPDX-License-Identifier: GPL-2.0+
-
-/dts-v1/;
-/plugin/;
-
-&{/} {
-	signature {
-		capsule-key = /incbin/("SIGNER.esl");
-	};
-};