All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Kopytin <Roman.Kopytin@kaspersky.com>
To: <u-boot@lists.denx.de>
Cc: Roman Kopytin <Roman.Kopytin@kaspersky.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool
Date: Mon, 8 Nov 2021 18:28:44 +0300	[thread overview]
Message-ID: <20211108152844.3656459-3-Roman.Kopytin@kaspersky.com> (raw)
In-Reply-To: <20211108152844.3656459-1-Roman.Kopytin@kaspersky.com>

Signed-off-by: Roman Kopytin <Roman.Kopytin@kaspersky.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 test/py/tests/test_vboot.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index 6dff6779d1..cf7416b39a 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -230,6 +230,13 @@ def test_vboot(u_boot_console, sha_algo, padding, sign_options, required,
         cons.log.action('%s: Check signed config on the host' % sha_algo)
 
         util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', dtb])
+        
+        # Create a fresh .dtb without the public keys
+        dtc('sandbox-u-boot.dts')
+        # Then add the dev key via the fdt_add_pubkey tool
+        util.run_and_log(cons, [fdt_add_pubkey, '-a', '%s,rsa2048' % sha_algo,
+                                '-k', tmpdir, '-n', 'dev', '-r', 'conf', dtb])
+        util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', dtb])
 
         if full_test:
             # Make sure that U-Boot checks that the config is in the list of
@@ -370,6 +377,7 @@ def test_vboot(u_boot_console, sha_algo, padding, sign_options, required,
     fit = '%stest.fit' % tmpdir
     mkimage = cons.config.build_dir + '/tools/mkimage'
     fit_check_sign = cons.config.build_dir + '/tools/fit_check_sign'
+    fdt_add_pubkey = cons.config.build_dir + '/tools/fdt_add_pubkey'
     dtc_args = '-I dts -O dtb -i %s' % tmpdir
     dtb = '%ssandbox-u-boot.dtb' % tmpdir
     sig_node = '/configurations/conf-1/signature'
-- 
2.25.1


  parent reply	other threads:[~2021-11-08 15:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 15:28 [PATCH 0/2] RFC: add fdt_add_pubkey tool Roman Kopytin
2021-11-08 15:28 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin
2021-11-10  0:58   ` Simon Glass
2021-11-10  7:03     ` Roman Kopytin
2021-11-10  7:41       ` Jan Kiszka
2021-11-10  6:39   ` Jan Kiszka
2021-11-10  7:39   ` Jan Kiszka
2021-11-10  8:26     ` Roman Kopytin
2021-11-10 19:21       ` Jan Kiszka
2021-11-11  5:26         ` Roman Kopytin
2021-11-11  7:18           ` Jan Kiszka
2021-11-10 21:15   ` Jan Kiszka
2021-11-08 15:28 ` Roman Kopytin [this message]
2021-11-10  0:58   ` [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool Simon Glass
2021-11-09  9:16 ` [PATCH 0/2] RFC: add " Jan Kiszka
2021-11-09  9:37   ` Roman Kopytin
2021-11-09 10:07     ` Jan Kiszka
2021-11-09 12:43       ` François Ozog
2021-11-09 12:58         ` Jan Kiszka
2021-11-09 13:16           ` François Ozog
2021-11-09 14:00             ` Jan Kiszka
2021-11-09 17:32               ` François Ozog
2021-11-10  0:58         ` Simon Glass
2021-11-10  0:58       ` Simon Glass
2021-11-10  6:43         ` Jan Kiszka
2021-11-10 16:31           ` Simon Glass
2021-11-10 16:48             ` Jan Kiszka
2021-11-10 17:29               ` François Ozog
2021-11-10 17:44                 ` Jan Kiszka
2021-11-10 19:36               ` Simon Glass
2021-11-10 20:51                 ` Jan Kiszka
2021-11-11  0:31                   ` Simon Glass
2021-11-10  0:58   ` Simon Glass
2021-11-10  6:55     ` Jan Kiszka
2021-11-10  7:20       ` Jan Kiszka
2021-11-10 16:31         ` Simon Glass
2021-11-10 16:49           ` Jan Kiszka
2021-11-10 19:36             ` Simon Glass
2021-11-10 20:58               ` Jan Kiszka
2021-11-11  0:31                 ` Simon Glass
2021-11-10 20:49         ` binman replace broken? (was: Re: [PATCH 0/2] RFC: add fdt_add_pubkey tool) Jan Kiszka
2021-11-11  0:32           ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11  8:15 [PATCH 0/2] RFC: add fdt_add_pubkey tool Roman Kopytin
2021-11-11  8:15 ` [PATCH 2/2] test_vboot.py: include test of " Roman Kopytin
2021-11-08 15:24 [PATCH 0/2] test3 Roman Kopytin
2021-11-08 15:24 ` [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool Roman Kopytin
2021-11-08 15:20 [PATCH 0/2] test2 Roman Kopytin
2021-11-08 15:20 ` [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool Roman Kopytin
2021-11-08 14:58 [PATCH 0/2] test Roman Kopytin
2021-11-08 14:58 ` [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool Roman Kopytin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211108152844.3656459-3-Roman.Kopytin@kaspersky.com \
    --to=roman.kopytin@kaspersky.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.