summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/ssh-keygen.17
-rw-r--r--usr.bin/ssh/ssh-keygen.c11
2 files changed, 12 insertions, 6 deletions
diff --git a/usr.bin/ssh/ssh-keygen.1 b/usr.bin/ssh/ssh-keygen.1
index 36249b28879..24daa1081aa 100644
--- a/usr.bin/ssh/ssh-keygen.1
+++ b/usr.bin/ssh/ssh-keygen.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ssh-keygen.1,v 1.76 2008/06/11 21:01:35 grunk Exp $
+.\" $OpenBSD: ssh-keygen.1,v 1.77 2008/06/11 22:20:46 grunk Exp $
.\"
.\" -*- nroff -*-
.\"
@@ -257,7 +257,10 @@ RFC 4716 SSH Public Key File Format.
This option allows importing keys from several commercial
SSH implementations.
.It Fl l
-Show fingerprint and ASCII art representation of specified public key file.
+Show fingerprint of specified public key file.
+If invoked along with
+.Fl v ,
+an ASCII art representation of the key is supplied with the fingerprint.
Private RSA1 keys are also supported.
For RSA and DSA keys
.Nm
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index 3fe661eca1d..dd3f229e730 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.168 2008/06/11 21:38:25 grunk Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.169 2008/06/11 22:20:46 grunk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -64,6 +64,8 @@ int change_comment = 0;
int quiet = 0;
+int log_level = SYSLOG_LEVEL_INFO;
+
/* Flag indicating that we want to hash a known_hosts file */
int hash_hosts = 0;
/* Flag indicating that we want lookup a host in known_hosts file */
@@ -516,7 +518,8 @@ do_fingerprint(struct passwd *pw)
fp = key_fingerprint(public, fptype, rep);
ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
printf("%u %s %s\n", key_size(public), fp, comment);
- verbose("%s", ra);
+ if (log_level >= SYSLOG_LEVEL_VERBOSE)
+ printf("%s\n", ra);
key_free(public);
xfree(comment);
xfree(ra);
@@ -580,7 +583,8 @@ do_fingerprint(struct passwd *pw)
ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
printf("%u %s %s\n", key_size(public), fp,
comment ? comment : "no comment");
- verbose("%s\n", ra);
+ if (log_level >= SYSLOG_LEVEL_VERBOSE)
+ printf("%s\n", ra);
xfree(ra);
xfree(fp);
key_free(public);
@@ -1070,7 +1074,6 @@ main(int argc, char **argv)
int opt, type, fd, download = 0;
u_int32_t memory = 0, generator_wanted = 0, trials = 100;
int do_gen_candidates = 0, do_screen_candidates = 0;
- int log_level = SYSLOG_LEVEL_INFO;
BIGNUM *start = NULL;
FILE *f;
const char *errstr;