diff options
author | 2003-05-11 16:56:48 +0000 | |
---|---|---|
committer | 2003-05-11 16:56:48 +0000 | |
commit | d706417a069bc65413ace4330cbe48ecf1a0f840 (patch) | |
tree | 147ae99ccade9d6980c12086ef0658ccbf01ba5d /usr.bin/ssh/ssh-keygen.c | |
parent | Document \s (diff) | |
download | wireguard-openbsd-d706417a069bc65413ace4330cbe48ecf1a0f840.tar.xz wireguard-openbsd-d706417a069bc65413ace4330cbe48ecf1a0f840.zip |
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 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 7aa530bec7a..67c5173c156 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.103 2003/04/08 20:21:29 itojun Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.104 2003/05/11 16:56:48 markus Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -159,6 +159,10 @@ do_convert_to_ssh2(struct passwd *pw) exit(1); } } + if (k->type == KEY_RSA1) { + fprintf(stderr, "version 1 keys are not supported\n"); + exit(1); + } if (key_to_blob(k, &blob, &len) <= 0) { fprintf(stderr, "key_to_blob failed\n"); exit(1); |