mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
tools, rsa: Further minor cleanups on top of c236ebd
and 2b9ec7
[NOTE: I took v1 of these patches in, and then v2 came out, this commit is squashing the minor deltas from v1 -> v2 of updates toc236ebd
and2b9ec76
into this commit - trini] - Added an additional NULL check, as suggested by Simon Glass to fit_image_process_sig - Re-formatted the comment blocks Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org> [For merging the chnages from v2 back onto v1] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
335b4e53c9
commit
713fb2dcb2
2 changed files with 12 additions and 5 deletions
|
@ -420,8 +420,10 @@ static int fdt_add_bignum(void *blob, int noffset, const char *prop_name,
|
|||
BN_rshift(num, num, 32); /* N = N/B */
|
||||
}
|
||||
|
||||
/* We try signing with successively increasing size values, so this
|
||||
* might fail several times */
|
||||
/*
|
||||
* We try signing with successively increasing size values, so this
|
||||
* might fail several times
|
||||
*/
|
||||
ret = fdt_setprop(blob, noffset, prop_name, buf, size);
|
||||
if (ret)
|
||||
return -FDT_ERR_NOSPACE;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue