summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-keygen.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2003-12-22 09:16:59 +0000
committerDamien Miller <djm@cvs.openbsd.org>2003-12-22 09:16:59 +0000
commit0664a38fb23eccbea10b85abf60dc52f32ba8a1b (patch)
tree60bccfe6d23879580014465a3ffe3c4a94ee7f08 /usr.bin/ssh/ssh-keygen.c
parent31bc0d13f979a50591c3361b78316a57467ee016 (diff)
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.c18
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();