diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/image-host.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index 399ec94..1104695 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -238,11 +238,16 @@ static int fit_image_process_sig(const char *keydir, void *keydest, /* Get keyname again, as FDT has changed and invalidated our pointer */ info.keyname = fdt_getprop(fit, noffset, "key-name-hint", NULL); - ret = info.algo->add_verify_data(&info, keydest); + if (keydest) + ret = info.algo->add_verify_data(&info, keydest); + else + return -1; - /* Write the public key into the supplied FDT file; this might fail + /* + * Write the public key into the supplied FDT file; this might fail * several times, since we try signing with successively increasing - * size values */ + * size values + */ if (keydest && ret) return ret; |