summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander von Gernler <grunk@cvs.openbsd.org>2008-06-12 21:14:47 +0000
committerAlexander von Gernler <grunk@cvs.openbsd.org>2008-06-12 21:14:47 +0000
commitb968e3a1ed9e061efbc002012da6c2823e1eb96d (patch)
tree0864b3c72009a8178809a67781c79e24ac0395a6
parent638e435ef344e49d84d5d312be1d337f1ab4d74b (diff)
make ssh-keygen -lf show the key type just as ssh-add -l would do it
ok djm@ markus@
-rw-r--r--usr.bin/ssh/ssh-keygen.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index dd3f229e730..eb1dc1fd924 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.169 2008/06/11 22:20:46 grunk Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.170 2008/06/12 21:14:46 grunk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -517,7 +517,8 @@ do_fingerprint(struct passwd *pw)
if (public != NULL) {
fp = key_fingerprint(public, fptype, rep);
ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
- printf("%u %s %s\n", key_size(public), fp, comment);
+ printf("%u %s %s (%s)\n", key_size(public), fp, comment,
+ key_type(public));
if (log_level >= SYSLOG_LEVEL_VERBOSE)
printf("%s\n", ra);
key_free(public);
@@ -581,8 +582,8 @@ do_fingerprint(struct passwd *pw)
comment = *cp ? cp : comment;
fp = key_fingerprint(public, fptype, rep);
ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
- printf("%u %s %s\n", key_size(public), fp,
- comment ? comment : "no comment");
+ printf("%u %s %s (%s)\n", key_size(public), fp,
+ comment ? comment : "no comment", key_type(public));
if (log_level >= SYSLOG_LEVEL_VERBOSE)
printf("%s\n", ra);
xfree(ra);
@@ -611,7 +612,8 @@ print_host(FILE *f, const char *name, Key *public, int hash)
rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;
fp = key_fingerprint(public, fptype, rep);
ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
- printf("%u %s %s\n%s\n", key_size(public), fp, name, ra);
+ printf("%u %s %s (%s)\n%s\n", key_size(public), fp, name,
+ key_type(public), ra);
xfree(ra);
xfree(fp);
} else {