mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
lib/rsa: don't use NULL as key_id
If keydir is not provided but name is we want to use name as key_id.
But with the current coding name is only used on its own if it is NULL
and keydir is provided which never occurs.
Fixes: 824ee745fb
("lib/rsa: Use the 'keyfile' argument from mkimage")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5c25757326
commit
d607dfd878
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name,
|
|||
snprintf(key_id, sizeof(key_id),
|
||||
"%s%s",
|
||||
keydir, name);
|
||||
else if (keydir)
|
||||
else if (name)
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"%s",
|
||||
name);
|
||||
|
|
Loading…
Reference in a new issue