=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keygen.c,v retrieving revision 1.24 retrieving revision 1.26 diff -u -r1.24 -r1.26 --- src/usr.bin/ssh/ssh-keygen.c 2000/05/03 02:52:56 1.24 +++ src/usr.bin/ssh/ssh-keygen.c 2000/05/30 17:32:06 1.26 @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$Id: ssh-keygen.c,v 1.24 2000/05/03 02:52:56 deraadt Exp $"); +RCSID("$Id: ssh-keygen.c,v 1.26 2000/05/30 17:32:06 markus Exp $"); #include #include @@ -144,6 +144,7 @@ char blob[8096]; char encoded[8096]; struct stat st; + int escaped = 0; FILE *fp; if (!have_identity) @@ -159,14 +160,21 @@ } encoded[0] = '\0'; while (fgets(line, sizeof(line), fp)) { + if (!(p = strchr(line, '\n'))) { + fprintf(stderr, "input line too long.\n"); + exit(1); + } + if (p > line && p[-1] == '\\') + escaped++; if (strncmp(line, "----", 4) == 0 || strstr(line, ": ") != NULL) { fprintf(stderr, "ignore: %s", line); continue; } - if (!(p = strchr(line, '\n'))) { - fprintf(stderr, "input line too long.\n"); - exit(1); + if (escaped) { + escaped--; + fprintf(stderr, "escaped: %s", line); + continue; } *p = '\0'; strlcat(encoded, line, sizeof(encoded)); @@ -508,7 +516,7 @@ extern int optind; extern char *optarg; - OpenSSL_add_all_algorithms(); + SSLeay_add_all_algorithms(); /* we need this for the home * directory. */ pw = getpwuid(getuid());