Page MenuHome GnuPG

pipe-through of clearsigned documents adds an extra newline
Closed, ResolvedPublic


Piping a clearsinged document through gpg should output the body of the message.
Currently, it adds an extra newline to the end of the output, the effect of
which is that the output does not verify with the signature, if detached.

In the attached archive, there are three files:
cleasigned.asc - a cleasigned test document
signature.asc - the signature detached from clearsigned.asc
body.asc - the plaintext body of the signed message

The following would work:
gpg --verify clearsigned.asc
gpg --verify signature.asc body.asc

gpg < clearsigned.asc > body.txt
would result in a body.txt that is NOT identical to body.asc, the difference
being an extra newline.


gpg (GnuPG) 1.4.10

Event Timeline

nagydani added projects: gnupg, Bug Report.
nagydani added a subscriber: nagydani.

nagydani renamed this task from pipe-though of clearsigned documents adds an extra newline to pipe-through of clearsigned documents adds an extra newline.Jul 16 2012, 2:05 AM
werner added a subscriber: werner.

That's a known limitation of the protocol. We need this to allow for empty
mesages. Clearsigned messages are anyway only a compromise.

How would not emitting an extra LF interfere with empty messages?
Has this decision been debated? If so, could you point me to the discussion?
Thank you in advance!

I would need to look it up myself. This has been implemented back in 1998 or 99.

werner claimed this task.