When adding a key to a keyring fails because a key with the same name hint already exists, print which keyring and which hint is duplicate. This also removes the string "fit" from the error message which seems to be a remnant of days when only FIT images used keys.
Signed-off-by: Sascha Hauer <[email protected]> --- crypto/public-keys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/public-keys.c b/crypto/public-keys.c index a2d31f4bc2..ecf255bbb4 100644 --- a/crypto/public-keys.c +++ b/crypto/public-keys.c @@ -29,7 +29,8 @@ int public_key_add(struct public_key *key) } if (public_key_get(key->key_name_hint, key->keyring)) { - pr_warn("Aborting addition of public key: Duplicate fit name hint\n"); + pr_warn("Cannot add key: key_name_hint %s already exists in keyring %s\n", + key->key_name_hint, key->keyring); return -EEXIST; } -- 2.47.3
