splitting up an inline-signed OpenPGP message

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Sep 6 15:55:01 CEST 2016


Thanks to everyone for their feedback on this.

The answer was indeed that i had one trailing newline too-many.

i didn't need to convert lf → crlf; gpgv is smart enough to see that a
signature is a text signature and handle the line-end munging itself.

The resultant code is attached below, in both a perl and a C version.

Werner, if you're up for shipping the C version as
tools/openpgp-split-clearsigned.c, i'm happy to contribute it to GnuPG.
It seems too small for me to be worth packaging and distributing
independently.  Both versions are GPL v3 or any later version.

     --dkg

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openpgp-split-clearsigned.c
URL: </pipermail/attachments/20160906/bf3a6bee/attachment-0001.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openpgp-split-clearsigned.pl
URL: </pipermail/attachments/20160906/bf3a6bee/attachment-0001.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 930 bytes
Desc: not available
URL: </pipermail/attachments/20160906/bf3a6bee/attachment-0001.sig>


More information about the Gnupg-devel mailing list