Looking more closely at the generated files, they don't have terminating
newlines...
The base64 routines will properly ignore newlines, since they match isspace().
okay ?
Index: signify.c
===================================================================
RCS file: /build/data/openbsd/cvs/src/usr.bin/signify/signify.c,v
retrieving revision 1.7
diff -u -p -r1.7 signify.c
--- signify.c 2 Jan 2014 16:34:02 -0000 1.7
+++ signify.c 3 Jan 2014 15:27:16 -0000
@@ -170,8 +170,9 @@ writeb64file(const char *filename, const
fd = xopen(filename, O_CREAT|O_EXCL|O_NOFOLLOW|O_RDWR, mode);
snprintf(header, sizeof(header), "signify -- %s\n", comment);
writeall(fd, header, strlen(header), filename);
- if ((rv = b64_ntop(buf, len, b64, sizeof(b64))) == -1)
+ if ((rv = b64_ntop(buf, len, b64, sizeof(b64)-1)) == -1)
errx(1, "b64 encode failed");
+ b64[rv++] = '\n';
writeall(fd, b64, rv, filename);
memset(b64, 0, sizeof(b64));
close(fd);