summaryrefslogtreecommitdiffstats
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 13:05:08 +0100
committerDamien Miller <djm@mindrot.org>2002-01-22 13:05:08 +0100
commita41c8b15bd2137f99e70d792ea66ee98e390726b (patch)
treeae73ee7e48b3ba43e485b7de96668c0227c5e7a5 /ssh-keygen.c
parentmore (diff)
downloadopenssh-a41c8b15bd2137f99e70d792ea66ee98e390726b.tar.xz
openssh-a41c8b15bd2137f99e70d792ea66ee98e390726b.zip
- djm@cvs.openbsd.org 2001/12/21 08:52:22
[ssh-keygen.1 ssh-keygen.c] Remove default (rsa1) key type; ok markus@
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 @@
*/
#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();