- deraadt@cvs.openbsd.org 2002/03/30 17:45:46
[scp.c]
stretch banners
+ - (bal) OpenBSD CVS Sync (now for the real sync)
+ - markus@cvs.openbsd.org 2002/03/27 22:21:45
+ [ssh-keygen.c]
+ try to import keys with extra trailing === (seen with ssh.com < 2.0.12)
20020401
- (stevesk) [monitor.c] PAM should work again; will *not* work with
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.97 2002/03/25 17:34:27 markus Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.98 2002/03/27 22:21:45 markus Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
{
Key *k;
int blen;
+ u_int len;
char line[1024], *p;
u_char blob[8096];
char encoded[8096];
*p = '\0';
strlcat(encoded, line, sizeof(encoded));
}
+ len = strlen(encoded);
+ if (((len % 4) == 3) &&
+ (encoded[len-1] == '=') &&
+ (encoded[len-2] == '=') &&
+ (encoded[len-3] == '='))
+ encoded[len-3] = '\0';
blen = uudecode(encoded, blob, sizeof(blob));
if (blen < 0) {
fprintf(stderr, "uudecode failed.\n");