mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
spl: spl_fit.c: enable check of signature for config node in spl/tpl
This commit add the support of signature check for config node in spl/tpl when the function spl_load_simple_fit is used. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a282ada198
commit
7d5b1bf6b8
1 changed files with 10 additions and 0 deletions
|
@ -558,6 +558,16 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
|
|||
if (spl_load_simple_fit_skip_processing())
|
||||
return 0;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPL_FIT_SIGNATURE)) {
|
||||
int conf_offset = fit_find_config_node(fit);
|
||||
|
||||
printf("## Checking hash(es) for config %s ... ",
|
||||
fit_get_name(fit, conf_offset, NULL));
|
||||
if (fit_config_verify(fit, conf_offset))
|
||||
return -EPERM;
|
||||
puts("OK\n");
|
||||
}
|
||||
|
||||
/* find the node holding the images information */
|
||||
images = fdt_path_offset(fit, FIT_IMAGES_PATH);
|
||||
if (images < 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue