mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
tools: image: fix "algo" property of public key for verified boot
The "algo_name" points to a property in a blob being edited. The pointer becomes stale when fit_image_write_sig() inserts signatures. Then crypto->add_verify_data() writes wrong data to the public key destination. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
ac122efdb6
commit
1d88a99d1b
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ static int fit_image_setup_sig(struct image_sign_info *info,
|
||||||
info->keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL);
|
info->keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL);
|
||||||
info->fit = fit;
|
info->fit = fit;
|
||||||
info->node_offset = noffset;
|
info->node_offset = noffset;
|
||||||
info->name = algo_name;
|
info->name = strdup(algo_name);
|
||||||
info->checksum = image_get_checksum_algo(algo_name);
|
info->checksum = image_get_checksum_algo(algo_name);
|
||||||
info->crypto = image_get_crypto_algo(algo_name);
|
info->crypto = image_get_crypto_algo(algo_name);
|
||||||
info->require_keys = require_keys;
|
info->require_keys = require_keys;
|
||||||
|
|
Loading…
Reference in a new issue