From c033dc8c0c4b744e028e124f88be4829309c75d1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 12 Nov 2021 12:28:11 -0700 Subject: 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 --- tools/image-host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/image-host.c') diff --git a/tools/image-host.c b/tools/image-host.c index f13a944..8952091 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; -- cgit v1.1