summaryrefslogtreecommitdiff
path: root/tools/image-host.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-11-12 22:28:11 +0300
committerSimon Glass <sjg@chromium.org>2022-01-26 18:50:44 +0300
commitc033dc8c0c4b744e028e124f88be4829309c75d1 (patch)
tree8b29d79edab956df71ecf9529f34b102842b54be /tools/image-host.c
parent99f844ba3a6b3ddd73742cddf7dee955bbb96c61 (diff)
downloadu-boot-c033dc8c0c4b744e028e124f88be4829309c75d1.tar.xz
image: Return destination node for add_verify_data() method
It is useful to know where the verification data was written. Update the API to return this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/image-host.c')
-rw-r--r--tools/image-host.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index f13a944136..89520915af 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -267,7 +267,7 @@ static int fit_image_process_sig(const char *keydir, const char *keyfile,
*/
if (keydest) {
ret = info.crypto->add_verify_data(&info, keydest);
- if (ret) {
+ if (ret < 0) {
printf("Failed to add verification data for '%s' signature node in '%s' image node\n",
node_name, image_name);
return ret;
@@ -1037,11 +1037,10 @@ static int fit_config_process_sig(const char *keydir, const char *keyfile,
/* Write the public key into the supplied FDT file */
if (keydest) {
ret = info.crypto->add_verify_data(&info, keydest);
- if (ret) {
+ if (ret < 0) {
printf("Failed to add verification data for '%s' signature node in '%s' configuration node\n",
node_name, conf_name);
}
- return ret;
}
return 0;