summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-03-03 12:19:30 +0100
committerTom Rini <trini@ti.com>2014-03-21 16:40:38 -0400
commit29a23f9d6c533f8371be3ae0268c4c75866291b2 (patch)
treecb7e69f6a7903ac5f63c03f99aa4f34b9fd151d7 /test
parent6bf4ca076f8c7a3c1c5abd1cbb059516f7af15df (diff)
downloadu-boot-imx-29a23f9d6c533f8371be3ae0268c4c75866291b2.zip
u-boot-imx-29a23f9d6c533f8371be3ae0268c4c75866291b2.tar.gz
u-boot-imx-29a23f9d6c533f8371be3ae0268c4c75866291b2.tar.bz2
tools, fit_check_sign: verify a signed fit image
add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/vboot/vboot_test.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/vboot/vboot_test.sh b/test/vboot/vboot_test.sh
index 3e2856e..3c6efa7 100755
--- a/test/vboot/vboot_test.sh
+++ b/test/vboot/vboot_test.sh
@@ -47,6 +47,7 @@ O=$(readlink -f ${O})
dtc="-I dts -O dtb -p 2000"
uboot="${O}/u-boot"
mkimage="${O}/tools/mkimage"
+fit_check_sign="${O}/tools/fit_check_sign"
keys="${dir}/dev-keys"
echo ${mkimage} -D "${dtc}"
@@ -99,6 +100,25 @@ function do_test {
run_uboot "signed config" "dev+"
+ echo check signed config on the host
+ if ! ${fit_check_sign} -f test.fit -k sandbox-u-boot.dtb >${tmp}; then
+ echo
+ echo "Verified boot key check on host failed, output follows:"
+ cat ${tmp}
+ false
+ else
+ if ! grep -q "dev+" ${tmp}; then
+ echo
+ echo "Verified boot key check failed, output follows:"
+ cat ${tmp}
+ false
+ else
+ echo "OK"
+ fi
+ fi
+
+ run_uboot "signed config" "dev+"
+
# Increment the first byte of the signature, which should cause failure
sig=$(fdtget -t bx test.fit /configurations/conf@1/signature@1 value)
newbyte=$(printf %x $((0x${sig:0:2} + 1)))