summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
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 /ssh-keygen.c
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@
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c11
1 files changed, 7 insertions, 4 deletions
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;