mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
Enhance fit_check_sign to check all images
At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> (v1)
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "mkimage.h"
|
||||
#include <bootm.h>
|
||||
#include <image.h>
|
||||
#include <version.h>
|
||||
|
||||
@ -707,16 +708,21 @@ int fit_add_verification_data(const char *keydir, void *keydest, void *fit,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FIT_SIGNATURE
|
||||
int fit_check_sign(const void *working_fdt, const void *key)
|
||||
int fit_check_sign(const void *fit, const void *key)
|
||||
{
|
||||
int cfg_noffset;
|
||||
int ret;
|
||||
|
||||
cfg_noffset = fit_conf_get_node(working_fdt, NULL);
|
||||
cfg_noffset = fit_conf_get_node(fit, NULL);
|
||||
if (!cfg_noffset)
|
||||
return -1;
|
||||
|
||||
ret = fit_config_verify(working_fdt, cfg_noffset);
|
||||
printf("Verifying Hash Integrity ... ");
|
||||
ret = fit_config_verify(fit, cfg_noffset);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = bootm_host_load_images(fit, cfg_noffset);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user