From: Dmitry Kasatkin Date: Mon, 6 Oct 2014 16:31:58 +0000 (+0100) Subject: integrity: do zero padding of the key id X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=594081ee7145cc30a3977cb4e218f81213b63dc5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David Howells --- diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c index 37e0d98517a8..4fec1816a2b3 100644 --- a/security/integrity/digsig_asymmetric.c +++ b/security/integrity/digsig_asymmetric.c @@ -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);