diff options
author | Heinrich Schuchardt | 2021-08-28 12:13:05 +0200 |
---|---|---|
committer | Tom Rini | 2021-09-14 09:07:18 -0400 |
commit | d607dfd878700648a7cc07ab40b2faf77df29acd (patch) | |
tree | 5f157bfa9dc5bcb75ed152d07f28a044687434ac /lib/rsa | |
parent | 5c25757326ba2481490ebe0f0d59f5933e31d45d (diff) |
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: 824ee745fbca ("lib/rsa: Use the 'keyfile' argument from mkimage")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/rsa')
-rw-r--r-- | lib/rsa/rsa-sign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 085dc89bf7b..0e0a890fd15 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -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); |