summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-13 04:43:15 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-13 04:43:15 +1000
commit35c45535ea1812ecc2d2655f068a103e57f3dfb5 (patch)
tree08104f4eb86db51ef3216d4873ee14866e77e4fe
parenta376a32e8e4b955eb936f96f0900e95e2ea4d2f9 (diff)
- grunk@cvs.openbsd.org 2008/06/11 22:20:46
[ssh-keygen.c ssh-keygen.1] ssh-keygen would write fingerprints to STDOUT, and random art to STDERR, that is not how it was envisioned. Also correct manpage saying that -v is needed along with -l for it to work. spotted by naddy@
-rw-r--r--ChangeLog8
-rw-r--r--ssh-keygen.17
-rw-r--r--ssh-keygen.c11
3 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a2019d231..d9b27bd43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,12 @@
28 [ssh-keygen.c] 28 [ssh-keygen.c]
29 ssh-keygen -lv -f /etc/ssh/ssh_host_rsa_key.pub 29 ssh-keygen -lv -f /etc/ssh/ssh_host_rsa_key.pub
30 would not display you the random art as intended, spotted by canacar@ 30 would not display you the random art as intended, spotted by canacar@
31 - grunk@cvs.openbsd.org 2008/06/11 22:20:46
32 [ssh-keygen.c ssh-keygen.1]
33 ssh-keygen would write fingerprints to STDOUT, and random art to STDERR,
34 that is not how it was envisioned.
35 Also correct manpage saying that -v is needed along with -l for it to work.
36 spotted by naddy@
31 37
3220080611 3820080611
33 - (djm) [channels.c configure.ac] 39 - (djm) [channels.c configure.ac]
@@ -4190,4 +4196,4 @@
4190 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4196 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4191 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4197 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4192 4198
4193$Id: ChangeLog,v 1.4970 2008/06/12 18:42:14 dtucker Exp $ 4199$Id: ChangeLog,v 1.4971 2008/06/12 18:43:15 dtucker Exp $
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index 36249b288..24daa1081 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.76 2008/06/11 21:01:35 grunk Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.77 2008/06/11 22:20:46 grunk Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -257,7 +257,10 @@ RFC 4716 SSH Public Key File Format.
257This option allows importing keys from several commercial 257This option allows importing keys from several commercial
258SSH implementations. 258SSH implementations.
259.It Fl l 259.It Fl l
260Show fingerprint and ASCII art representation of specified public key file. 260Show fingerprint of specified public key file.
261If invoked along with
262.Fl v ,
263an ASCII art representation of the key is supplied with the fingerprint.
261Private RSA1 keys are also supported. 264Private RSA1 keys are also supported.
262For RSA and DSA keys 265For RSA and DSA keys
263.Nm 266.Nm
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 5d90e7a24..02bd530a0 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.168 2008/06/11 21:38:25 grunk Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.169 2008/06/11 22:20: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
@@ -72,6 +72,8 @@ int change_comment = 0;
72 72
73int quiet = 0; 73int quiet = 0;
74 74
75int log_level = SYSLOG_LEVEL_INFO;
76
75/* Flag indicating that we want to hash a known_hosts file */ 77/* Flag indicating that we want to hash a known_hosts file */
76int hash_hosts = 0; 78int hash_hosts = 0;
77/* Flag indicating that we want lookup a host in known_hosts file */ 79/* Flag indicating that we want lookup a host in known_hosts file */
@@ -524,7 +526,8 @@ do_fingerprint(struct passwd *pw)
524 fp = key_fingerprint(public, fptype, rep); 526 fp = key_fingerprint(public, fptype, rep);
525 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); 527 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
526 printf("%u %s %s\n", key_size(public), fp, comment); 528 printf("%u %s %s\n", key_size(public), fp, comment);
527 verbose("%s", ra); 529 if (log_level >= SYSLOG_LEVEL_VERBOSE)
530 printf("%s\n", ra);
528 key_free(public); 531 key_free(public);
529 xfree(comment); 532 xfree(comment);
530 xfree(ra); 533 xfree(ra);
@@ -588,7 +591,8 @@ do_fingerprint(struct passwd *pw)
588 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); 591 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
589 printf("%u %s %s\n", key_size(public), fp, 592 printf("%u %s %s\n", key_size(public), fp,
590 comment ? comment : "no comment"); 593 comment ? comment : "no comment");
591 verbose("%s\n", ra); 594 if (log_level >= SYSLOG_LEVEL_VERBOSE)
595 printf("%s\n", ra);
592 xfree(ra); 596 xfree(ra);
593 xfree(fp); 597 xfree(fp);
594 key_free(public); 598 key_free(public);
@@ -1078,7 +1082,6 @@ main(int argc, char **argv)
1078 int opt, type, fd, download = 0; 1082 int opt, type, fd, download = 0;
1079 u_int32_t memory = 0, generator_wanted = 0, trials = 100; 1083 u_int32_t memory = 0, generator_wanted = 0, trials = 100;
1080 int do_gen_candidates = 0, do_screen_candidates = 0; 1084 int do_gen_candidates = 0, do_screen_candidates = 0;
1081 int log_level = SYSLOG_LEVEL_INFO;
1082 BIGNUM *start = NULL; 1085 BIGNUM *start = NULL;
1083 FILE *f; 1086 FILE *f;
1084 const char *errstr; 1087 const char *errstr;