Skip to content

Commit

Permalink
KEYS: output last portion of fingerprint in /proc/keys
Browse files Browse the repository at this point in the history
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: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
Dmitry Kasatkin authored and David Howells committed Oct 6, 2014
1 parent 7a224e7 commit d401658
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crypto/asymmetric_keys/asymmetric_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ static void asymmetric_key_describe(const struct key *key, struct seq_file *m)
seq_puts(m, ": ");
subtype->describe(key, m);

if (kids && kids->id[0]) {
kid = kids->id[0];
if (kids && kids->id[1]) {
kid = kids->id[1];
seq_putc(m, ' ');
n = kid->len;
p = kid->data;
if (n > 8) {
p += n - 8;
n = 8;
if (n > 4) {
p += n - 4;
n = 4;
}
seq_printf(m, "%*phN", n, p);
}
Expand Down

0 comments on commit d401658

Please sign in to comment.