diff options
author | 2003-12-22 09:16:57 +0000 | |
---|---|---|
committer | 2003-12-22 09:16:57 +0000 | |
commit | 916f2936058c57504d96e861e2ad554fc141c802 (patch) | |
tree | 80e005bf2cfb978214b08134650a6c235d304846 /usr.bin/ssh/ssh-keygen.c | |
parent | spelling (diff) | |
download | wireguard-openbsd-916f2936058c57504d96e861e2ad554fc141c802.tar.xz wireguard-openbsd-916f2936058c57504d96e861e2ad554fc141c802.zip |
tidy up moduli generation debugging, add -v (verbose/debug) option to
ssh-keygen; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index be8ef77e971..f3b55587034 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.112 2003/11/23 23:18:45 djm Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.113 2003/12/22 09:16:58 djm Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -793,6 +793,7 @@ main(int ac, char **av) int opt, type, fd, download = 0, memory = 0; int 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; @@ -814,7 +815,7 @@ main(int ac, char **av) } while ((opt = getopt(ac, av, - "degiqpclBRxXyb:f:t:U:D:P:N:C:r:g:T:G:M:S:a:W:")) != -1) { + "degiqpclBRvxXyb:f:t:U:D:P:N:C:r:g:T:G:M:S:a:W:")) != -1) { switch (opt) { case 'b': bits = atoi(optarg); @@ -882,6 +883,15 @@ main(int ac, char **av) case 'U': reader_id = optarg; break; + case 'v': + if (log_level == SYSLOG_LEVEL_INFO) + log_level = SYSLOG_LEVEL_DEBUG1; + else { + if (log_level >= SYSLOG_LEVEL_DEBUG1 && + log_level < SYSLOG_LEVEL_DEBUG3) + log_level++; + } + break; case 'r': resource_record_hostname = optarg; break; @@ -923,6 +933,10 @@ main(int ac, char **av) usage(); } } + + /* reinit */ + log_init(av[0], log_level, SYSLOG_FACILITY_USER, 1); + if (optind < ac) { printf("Too many arguments.\n"); usage(); |