diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-13 08:57:27 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-13 08:57:27 +1000 |
commit | b68fb4ad2118483c84c02633029e86fc20f15bf1 (patch) | |
tree | 19b0af17f81e51da7c53d66ac9a04bc2fab2fe18 /ssh-keygen.c | |
parent | babc1d5f73dec4d7636d4fefac02e86c2bb69143 (diff) |
- grunk@cvs.openbsd.org 2008/06/12 21:14:46
[ssh-keygen.c]
make ssh-keygen -lf show the key type just as ssh-add -l would do it
ok djm@ markus@
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 02bd530a0..eca758c6e 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.169 2008/06/11 22:20:46 grunk Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.170 2008/06/12 21:14:46 grunk Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -525,7 +525,8 @@ do_fingerprint(struct passwd *pw) | |||
525 | if (public != NULL) { | 525 | if (public != NULL) { |
526 | fp = key_fingerprint(public, fptype, rep); | 526 | fp = key_fingerprint(public, fptype, rep); |
527 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); | 527 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); |
528 | printf("%u %s %s\n", key_size(public), fp, comment); | 528 | printf("%u %s %s (%s)\n", key_size(public), fp, comment, |
529 | key_type(public)); | ||
529 | if (log_level >= SYSLOG_LEVEL_VERBOSE) | 530 | if (log_level >= SYSLOG_LEVEL_VERBOSE) |
530 | printf("%s\n", ra); | 531 | printf("%s\n", ra); |
531 | key_free(public); | 532 | key_free(public); |
@@ -589,8 +590,8 @@ do_fingerprint(struct passwd *pw) | |||
589 | comment = *cp ? cp : comment; | 590 | comment = *cp ? cp : comment; |
590 | fp = key_fingerprint(public, fptype, rep); | 591 | fp = key_fingerprint(public, fptype, rep); |
591 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); | 592 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); |
592 | printf("%u %s %s\n", key_size(public), fp, | 593 | printf("%u %s %s (%s)\n", key_size(public), fp, |
593 | comment ? comment : "no comment"); | 594 | comment ? comment : "no comment", key_type(public)); |
594 | if (log_level >= SYSLOG_LEVEL_VERBOSE) | 595 | if (log_level >= SYSLOG_LEVEL_VERBOSE) |
595 | printf("%s\n", ra); | 596 | printf("%s\n", ra); |
596 | xfree(ra); | 597 | xfree(ra); |
@@ -619,7 +620,8 @@ print_host(FILE *f, const char *name, Key *public, int hash) | |||
619 | rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX; | 620 | rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX; |
620 | fp = key_fingerprint(public, fptype, rep); | 621 | fp = key_fingerprint(public, fptype, rep); |
621 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); | 622 | ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); |
622 | printf("%u %s %s\n%s\n", key_size(public), fp, name, ra); | 623 | printf("%u %s %s (%s)\n%s\n", key_size(public), fp, name, |
624 | key_type(public), ra); | ||
623 | xfree(ra); | 625 | xfree(ra); |
624 | xfree(fp); | 626 | xfree(fp); |
625 | } else { | 627 | } else { |