diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh-keygen.c | 9 |
2 files changed, 13 insertions, 2 deletions
@@ -3,6 +3,10 @@ | |||
3 | - deraadt@cvs.openbsd.org 2002/03/30 17:45:46 | 3 | - deraadt@cvs.openbsd.org 2002/03/30 17:45:46 |
4 | [scp.c] | 4 | [scp.c] |
5 | stretch banners | 5 | stretch banners |
6 | - (bal) OpenBSD CVS Sync (now for the real sync) | ||
7 | - markus@cvs.openbsd.org 2002/03/27 22:21:45 | ||
8 | [ssh-keygen.c] | ||
9 | try to import keys with extra trailing === (seen with ssh.com < 2.0.12) | ||
6 | 10 | ||
7 | 20020401 | 11 | 20020401 |
8 | - (stevesk) [monitor.c] PAM should work again; will *not* work with | 12 | - (stevesk) [monitor.c] PAM should work again; will *not* work with |
@@ -8110,4 +8114,4 @@ | |||
8110 | - Wrote replacements for strlcpy and mkdtemp | 8114 | - Wrote replacements for strlcpy and mkdtemp |
8111 | - Released 1.0pre1 | 8115 | - Released 1.0pre1 |
8112 | 8116 | ||
8113 | $Id: ChangeLog,v 1.2007 2002/04/02 20:17:43 mouring Exp $ | 8117 | $Id: ChangeLog,v 1.2008 2002/04/02 20:26:26 mouring Exp $ |
diff --git a/ssh-keygen.c b/ssh-keygen.c index 1a8a73129..250e53e14 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" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.97 2002/03/25 17:34:27 markus Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.98 2002/03/27 22:21:45 markus Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -290,6 +290,7 @@ do_convert_from_ssh2(struct passwd *pw) | |||
290 | { | 290 | { |
291 | Key *k; | 291 | Key *k; |
292 | int blen; | 292 | int blen; |
293 | u_int len; | ||
293 | char line[1024], *p; | 294 | char line[1024], *p; |
294 | u_char blob[8096]; | 295 | u_char blob[8096]; |
295 | char encoded[8096]; | 296 | char encoded[8096]; |
@@ -334,6 +335,12 @@ do_convert_from_ssh2(struct passwd *pw) | |||
334 | *p = '\0'; | 335 | *p = '\0'; |
335 | strlcat(encoded, line, sizeof(encoded)); | 336 | strlcat(encoded, line, sizeof(encoded)); |
336 | } | 337 | } |
338 | len = strlen(encoded); | ||
339 | if (((len % 4) == 3) && | ||
340 | (encoded[len-1] == '=') && | ||
341 | (encoded[len-2] == '=') && | ||
342 | (encoded[len-3] == '=')) | ||
343 | encoded[len-3] = '\0'; | ||
337 | blen = uudecode(encoded, blob, sizeof(blob)); | 344 | blen = uudecode(encoded, blob, sizeof(blob)); |
338 | if (blen < 0) { | 345 | if (blen < 0) { |
339 | fprintf(stderr, "uudecode failed.\n"); | 346 | fprintf(stderr, "uudecode failed.\n"); |