summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:05:08 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:05:08 +1100
commita41c8b15bd2137f99e70d792ea66ee98e390726b (patch)
treeae73ee7e48b3ba43e485b7de96668c0227c5e7a5
parentc68d43335f11c6d1659e39433c9c075a97d48f16 (diff)
- djm@cvs.openbsd.org 2001/12/21 08:52:22
[ssh-keygen.1 ssh-keygen.c] Remove default (rsa1) key type; ok markus@
-rw-r--r--ChangeLog6
-rw-r--r--ssh-keygen.111
-rw-r--r--ssh-keygen.c11
3 files changed, 17 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index b6c6d23cf..a7e62cdb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
9 - Add OpenSSL sanity check: verify that header version matches version 9 - Add OpenSSL sanity check: verify that header version matches version
10 reported by library 10 reported by library
11 - (djm) Fix some bugs I introduced into ssh-rand-helper yesterday 11 - (djm) Fix some bugs I introduced into ssh-rand-helper yesterday
12 - OpenBSD CVS Sync
13 - djm@cvs.openbsd.org 2001/12/21 08:52:22
14 [ssh-keygen.1 ssh-keygen.c]
15 Remove default (rsa1) key type; ok markus@
12 16
1320020121 1720020121
14 - (djm) Rework ssh-rand-helper: 18 - (djm) Rework ssh-rand-helper:
@@ -7156,4 +7160,4 @@
7156 - Wrote replacements for strlcpy and mkdtemp 7160 - Wrote replacements for strlcpy and mkdtemp
7157 - Released 1.0pre1 7161 - Released 1.0pre1
7158 7162
7159$Id: ChangeLog,v 1.1724 2002/01/22 11:16:03 djm Exp $ 7163$Id: ChangeLog,v 1.1725 2002/01/22 12:05:08 djm Exp $
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index d8baa43bc..afecb2f07 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.51 2001/11/21 18:49:14 stevesk Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.52 2001/12/21 08:52:22 djm Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -86,10 +86,11 @@
86generates, manages and converts authentication keys for 86generates, manages and converts authentication keys for
87.Xr ssh 1 . 87.Xr ssh 1 .
88.Nm 88.Nm
89defaults to generating a RSA1 key for use by SSH protocol version 1. 89can create RSA keys for use by SSH protocol version 1 and RSA or DSA
90Specifying the 90keys for use by SSH protocol version 2. The type of key to be generated
91is specified with the
91.Fl t 92.Fl t
92option instead creates a key for use by SSH protocol version 2. 93option.
93.Pp 94.Pp
94Normally each user wishing to use SSH 95Normally each user wishing to use SSH
95with RSA or DSA authentication runs this once to create the authentication 96with RSA or DSA authentication runs this once to create the authentication
@@ -202,8 +203,6 @@ for protocol version 1 and
202or 203or
203.Dq dsa 204.Dq dsa
204for protocol version 2. 205for protocol version 2.
205The default is
206.Dq rsa1 .
207.It Fl B 206.It Fl B
208Show the bubblebabble digest of specified private or public key file. 207Show the bubblebabble digest of specified private or public key file.
209.It Fl C Ar comment 208.It Fl C Ar comment
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();