integrity: do zero padding of the key id

Latest KEYS code return error if hexadecimal string length id odd.
Fix it.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
Dmitry Kasatkin 2014-10-06 17:31:58 +01:00 committed by David Howells
parent d401658985
commit 594081ee71

View file

@ -28,7 +28,7 @@ static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid)
struct key *key;
char name[12];
sprintf(name, "id:%x", keyid);
sprintf(name, "id:%08x", keyid);
pr_debug("key search: \"%s\"\n", name);