From 3dc93cd8a6b9be3cec47639301d7e5cdf06bdde4 Mon Sep 17 00:00:00 2001 From: djm Date: Tue, 22 Jan 2002 12:05:08 +0000 Subject: [PATCH] - djm@cvs.openbsd.org 2001/12/21 08:52:22 [ssh-keygen.1 ssh-keygen.c] Remove default (rsa1) key type; ok markus@ --- ChangeLog | 4 ++++ ssh-keygen.1 | 11 +++++------ ssh-keygen.c | 11 +++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01d2da49..88114f09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ - Add OpenSSL sanity check: verify that header version matches version reported by library - (djm) Fix some bugs I introduced into ssh-rand-helper yesterday + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2001/12/21 08:52:22 + [ssh-keygen.1 ssh-keygen.c] + Remove default (rsa1) key type; ok markus@ 20020121 - (djm) Rework ssh-rand-helper: diff --git a/ssh-keygen.1 b/ssh-keygen.1 index d8baa43b..afecb2f0 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keygen.1,v 1.51 2001/11/21 18:49:14 stevesk Exp $ +.\" $OpenBSD: ssh-keygen.1,v 1.52 2001/12/21 08:52:22 djm Exp $ .\" .\" -*- nroff -*- .\" @@ -86,10 +86,11 @@ generates, manages and converts authentication keys for .Xr ssh 1 . .Nm -defaults to generating a RSA1 key for use by SSH protocol version 1. -Specifying the +can create RSA keys for use by SSH protocol version 1 and RSA or DSA +keys for use by SSH protocol version 2. The type of key to be generated +is specified with the .Fl t -option instead creates a key for use by SSH protocol version 2. +option. .Pp Normally each user wishing to use SSH with RSA or DSA authentication runs this once to create the authentication @@ -202,8 +203,6 @@ for protocol version 1 and or .Dq dsa for protocol version 2. -The default is -.Dq rsa1 . .It Fl B Show the bubblebabble digest of specified private or public key file. .It Fl C Ar comment diff --git a/ssh-keygen.c b/ssh-keygen.c index ccd73778..9e3a12a5 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 #include @@ -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(); -- 2.45.1