]> andersk Git - openssh.git/blobdiff - ssh-keygen.c
- djm@cvs.openbsd.org 2001/12/21 08:52:22
[openssh.git] / ssh-keygen.c
index ccd737781e8173323d0a29bf2a6478287d721241..9e3a12a54f2cf49bd1fddce325f59c9e21712d2d 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.86 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.87 2001/12/21 08:52:22 djm Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/pem.h>
@@ -73,8 +73,7 @@ int convert_to_ssh2 = 0;
 int convert_from_ssh2 = 0;
 int print_public = 0;
 
-/* default to RSA for SSH-1 */
-char *key_type_name = "rsa1";
+char *key_type_name = NULL;
 
 /* argv0 */
 #ifdef HAVE___PROGNAME
@@ -835,7 +834,7 @@ usage(void)
 int
 main(int ac, char **av)
 {
-       char dotsshdir[16 * 1024], comment[1024], *passphrase1, *passphrase2;
+       char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
        char *reader_id = NULL;
        Key *private, *public;
        struct passwd *pw;
@@ -937,6 +936,10 @@ main(int ac, char **av)
                printf("Too many arguments.\n");
                usage();
        }
+       if (key_type_name == NULL) {
+               printf("You must specify a key type (-t).\n");
+               usage();
+       }
        if (change_passphrase && change_comment) {
                printf("Can only have one of -p and -c.\n");
                usage();
This page took 0.034199 seconds and 4 git commands to generate.