Commit d4016589 authored by Dmitry Kasatkin's avatar Dmitry Kasatkin Committed by David Howells

KEYS: output last portion of fingerprint in /proc/keys

Previous version of KEYS used to output last 4 bytes of fingerprint.
Now it outputs 8 last bytes of raw subject, which does not make any
visual meaning at all. This patch restores old behavior.
Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 7a224e78
...@@ -233,14 +233,14 @@ static void asymmetric_key_describe(const struct key *key, struct seq_file *m) ...@@ -233,14 +233,14 @@ static void asymmetric_key_describe(const struct key *key, struct seq_file *m)
seq_puts(m, ": "); seq_puts(m, ": ");
subtype->describe(key, m); subtype->describe(key, m);
if (kids && kids->id[0]) { if (kids && kids->id[1]) {
kid = kids->id[0]; kid = kids->id[1];
seq_putc(m, ' '); seq_putc(m, ' ');
n = kid->len; n = kid->len;
p = kid->data; p = kid->data;
if (n > 8) { if (n > 4) {
p += n - 8; p += n - 4;
n = 8; n = 4;
} }
seq_printf(m, "%*phN", n, p); seq_printf(m, "%*phN", n, p);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment