diff options
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 11 |
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 | ||
73 | int quiet = 0; | 73 | int quiet = 0; |
74 | 74 | ||
75 | int 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 */ |
76 | int hash_hosts = 0; | 78 | int 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; |