diff options
| author | Dmitry Kasatkin <d.kasatkin@samsung.com> | 2014-10-06 12:25:45 -0400 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2014-10-06 12:33:27 -0400 |
| commit | d4016589855156b6afe5e9bc8ef85ce43f27e704 (patch) | |
| tree | 12ea977ca08adaf3d1a4936eed28d519918feb77 /crypto | |
| parent | 7a224e783ad2b325977253139aede1f5f38b1778 (diff) | |
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: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/asymmetric_keys/asymmetric_type.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c index 052e944bb109..bcbbbd794e1d 100644 --- a/crypto/asymmetric_keys/asymmetric_type.c +++ b/crypto/asymmetric_keys/asymmetric_type.c | |||
| @@ -233,14 +233,14 @@ static void asymmetric_key_describe(const struct key *key, struct seq_file *m) | |||
| 233 | seq_puts(m, ": "); | 233 | seq_puts(m, ": "); |
| 234 | subtype->describe(key, m); | 234 | subtype->describe(key, m); |
| 235 | 235 | ||
| 236 | if (kids && kids->id[0]) { | 236 | if (kids && kids->id[1]) { |
| 237 | kid = kids->id[0]; | 237 | kid = kids->id[1]; |
| 238 | seq_putc(m, ' '); | 238 | seq_putc(m, ' '); |
| 239 | n = kid->len; | 239 | n = kid->len; |
| 240 | p = kid->data; | 240 | p = kid->data; |
| 241 | if (n > 8) { | 241 | if (n > 4) { |
| 242 | p += n - 8; | 242 | p += n - 4; |
| 243 | n = 8; | 243 | n = 4; |
| 244 | } | 244 | } |
| 245 | seq_printf(m, "%*phN", n, p); | 245 | seq_printf(m, "%*phN", n, p); |
| 246 | } | 246 | } |
