Commit 7a224e783ad2b325977253139aede1f5f38b1778

Authored by Dmitry Kasatkin
Committed by David Howells
1 parent 8dd609805b

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: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

crypto/asymmetric_keys/x509_public_key.c
... ... @@ -35,7 +35,7 @@
35 35  
36 36 if (strncmp(str, "id:", 3) == 0) {
37 37 struct asymmetric_key_id *p;
38   - p = asymmetric_key_hex_to_key_id(str);
  38 + p = asymmetric_key_hex_to_key_id(str + 3);
39 39 if (p == ERR_PTR(-EINVAL))
40 40 pr_err("Unparsable hex string in ca_keys\n");
41 41 else if (!IS_ERR(p))