summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
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 ccd737781..9e3a12a54 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.86 2001/12/19 07:18:56 deraadt Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.87 2001/12/21 08:52:22 djm Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -73,8 +73,7 @@ int convert_to_ssh2 = 0;
73int convert_from_ssh2 = 0; 73int convert_from_ssh2 = 0;
74int print_public = 0; 74int print_public = 0;
75 75
76/* default to RSA for SSH-1 */ 76char *key_type_name = NULL;
77char *key_type_name = "rsa1";
78 77
79/* argv0 */ 78/* argv0 */
80#ifdef HAVE___PROGNAME 79#ifdef HAVE___PROGNAME
@@ -835,7 +834,7 @@ usage(void)
835int 834int
836main(int ac, char **av) 835main(int ac, char **av)
837{ 836{
838 char dotsshdir[16 * 1024], comment[1024], *passphrase1, *passphrase2; 837 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
839 char *reader_id = NULL; 838 char *reader_id = NULL;
840 Key *private, *public; 839 Key *private, *public;
841 struct passwd *pw; 840 struct passwd *pw;
@@ -937,6 +936,10 @@ main(int ac, char **av)
937 printf("Too many arguments.\n"); 936 printf("Too many arguments.\n");
938 usage(); 937 usage();
939 } 938 }
939 if (key_type_name == NULL) {
940 printf("You must specify a key type (-t).\n");
941 usage();
942 }
940 if (change_passphrase && change_comment) { 943 if (change_passphrase && change_comment) {
941 printf("Can only have one of -p and -c.\n"); 944 printf("Can only have one of -p and -c.\n");
942 usage(); 945 usage();