summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-05-14 13:45:22 +1000
committerDamien Miller <djm@mindrot.org>2003-05-14 13:45:22 +1000
commitdb2747259c1a433a504085f733768d0d209eb50d (patch)
treedb6e017b80fd5b2981f6e57ccf443a6cf5130c4c /ssh-keygen.c
parent3155432cd97e4dd380f11222407be0299714ce4a (diff)
- markus@cvs.openbsd.org 2003/05/11 16:56:48
[authfile.c ssh-keygen.c] change key_load_public to try to read a public from: rsa1 private or rsa1 public and ssh2 keys. this makes ssh-keygen -e fail for ssh1 keys more gracefully for example; report from itojun (netbsd pr 20550).
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 4bd79af6a..1d08c7cec 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.103 2003/04/08 20:21:29 itojun Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.104 2003/05/11 16:56:48 markus Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -163,6 +163,10 @@ do_convert_to_ssh2(struct passwd *pw)
163 exit(1); 163 exit(1);
164 } 164 }
165 } 165 }
166 if (k->type == KEY_RSA1) {
167 fprintf(stderr, "version 1 keys are not supported\n");
168 exit(1);
169 }
166 if (key_to_blob(k, &blob, &len) <= 0) { 170 if (key_to_blob(k, &blob, &len) <= 0) {
167 fprintf(stderr, "key_to_blob failed\n"); 171 fprintf(stderr, "key_to_blob failed\n");
168 exit(1); 172 exit(1);