summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 961fd43e5..1156a010a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.112 2003/11/23 23:18:45 djm Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.113 2003/12/22 09:16:58 djm Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -797,6 +797,7 @@ main(int ac, char **av)
797 int opt, type, fd, download = 0, memory = 0; 797 int opt, type, fd, download = 0, memory = 0;
798 int generator_wanted = 0, trials = 100; 798 int generator_wanted = 0, trials = 100;
799 int do_gen_candidates = 0, do_screen_candidates = 0; 799 int do_gen_candidates = 0, do_screen_candidates = 0;
800 int log_level = SYSLOG_LEVEL_INFO;
800 BIGNUM *start = NULL; 801 BIGNUM *start = NULL;
801 FILE *f; 802 FILE *f;
802 803
@@ -823,7 +824,7 @@ main(int ac, char **av)
823 } 824 }
824 825
825 while ((opt = getopt(ac, av, 826 while ((opt = getopt(ac, av,
826 "degiqpclBRxXyb:f:t:U:D:P:N:C:r:g:T:G:M:S:a:W:")) != -1) { 827 "degiqpclBRvxXyb:f:t:U:D:P:N:C:r:g:T:G:M:S:a:W:")) != -1) {
827 switch (opt) { 828 switch (opt) {
828 case 'b': 829 case 'b':
829 bits = atoi(optarg); 830 bits = atoi(optarg);
@@ -891,6 +892,15 @@ main(int ac, char **av)
891 case 'U': 892 case 'U':
892 reader_id = optarg; 893 reader_id = optarg;
893 break; 894 break;
895 case 'v':
896 if (log_level == SYSLOG_LEVEL_INFO)
897 log_level = SYSLOG_LEVEL_DEBUG1;
898 else {
899 if (log_level >= SYSLOG_LEVEL_DEBUG1 &&
900 log_level < SYSLOG_LEVEL_DEBUG3)
901 log_level++;
902 }
903 break;
894 case 'r': 904 case 'r':
895 resource_record_hostname = optarg; 905 resource_record_hostname = optarg;
896 break; 906 break;
@@ -932,6 +942,10 @@ main(int ac, char **av)
932 usage(); 942 usage();
933 } 943 }
934 } 944 }
945
946 /* reinit */
947 log_init(av[0], log_level, SYSLOG_FACILITY_USER, 1);
948
935 if (optind < ac) { 949 if (optind < ac) {
936 printf("Too many arguments.\n"); 950 printf("Too many arguments.\n");
937 usage(); 951 usage();