Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a224e78 authored by Dmitry Kasatkin's avatar Dmitry Kasatkin Committed by David Howells
Browse files

KEYS: strip 'id:' from ca_keyid



The 'id:' prefix must be stripped for asymmetric_key_hex_to_key_id() to be
able to process ca_keyid.

Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 8dd60980
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@ static int __init ca_keys_setup(char *str)


	if (strncmp(str, "id:", 3) == 0) {
	if (strncmp(str, "id:", 3) == 0) {
		struct asymmetric_key_id *p;
		struct asymmetric_key_id *p;
		p = asymmetric_key_hex_to_key_id(str);
		p = asymmetric_key_hex_to_key_id(str + 3);
		if (p == ERR_PTR(-EINVAL))
		if (p == ERR_PTR(-EINVAL))
			pr_err("Unparsable hex string in ca_keys\n");
			pr_err("Unparsable hex string in ca_keys\n");
		else if (!IS_ERR(p))
		else if (!IS_ERR(p))