Commit d607dfd8 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬 Committed by Tom Rini
Browse files

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: 824ee745

 ("lib/rsa: Use the 'keyfile' argument from mkimage")
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <>
Reviewed-by: Simon Glass's avatarSimon Glass <>
parent 5c257573
......@@ -269,7 +269,7 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name,
snprintf(key_id, sizeof(key_id),
keydir, name);
else if (keydir)
else if (name)
snprintf(key_id, sizeof(key_id),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment