summaryrefslogtreecommitdiffstats
path: root/tools/image-host.c
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 /tools/image-host.c
parent6bf4ca076f8c7a3c1c5abd1cbb059516f7af15df (diff)
downloadtalos-obmc-uboot-29a23f9d6c533f8371be3ae0268c4c75866291b2.tar.gz
talos-obmc-uboot-29a23f9d6c533f8371be3ae0268c4c75866291b2.zip
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 'tools/image-host.c')
-rw-r--r--tools/image-host.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index 8e185ec5df..651f1c2f8b 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -695,3 +695,18 @@ int fit_add_verification_data(const char *keydir, void *keydest, void *fit,
return 0;
}
+
+#ifdef CONFIG_FIT_SIGNATURE
+int fit_check_sign(const void *working_fdt, const void *key)
+{
+ int cfg_noffset;
+ int ret;
+
+ cfg_noffset = fit_conf_get_node(working_fdt, NULL);
+ if (!cfg_noffset)
+ return -1;
+
+ ret = fit_config_verify(working_fdt, cfg_noffset);
+ return ret;
+}
+#endif
OpenPOWER on IntegriCloud