Skip to content

Commit

Permalink
integrity: do zero padding of the key id
Browse files Browse the repository at this point in the history
Latest KEYS code return error if hexadecimal string length id odd.
Fix it.

Signed-off-by: Dmitry Kasatkin <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
Dmitry Kasatkin authored and dhowells committed Oct 6, 2014
1 parent d401658 commit 594081e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/integrity/digsig_asymmetric.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 594081e

Please sign in to comment.