Textmode for dummies (me)

Kurt Fitzner kfitzner at excelcia.org
Wed Jan 11 06:39:00 CET 2006


I received a request to add support for --textmode to GPGee and did so.
 I'm about to release a new version and am updating the help file, and I
find that I don't have a clear understanding myself of exactly what
--textmode does.  I'm hoping someone can explain a few things.

The man page for GnuPG states:
 -t, --textmode
 Treat input files as text and store them in the OpenPGP canonical  text
 form  with standard  "CRLF"  line  endings.

The only time this would seem to matter is with clearsigning, as that is
the only time GnuPG writes an input file to its output as text.  So, I
did the following on a Linux box:
  $ gpg --clearsign --textmode test1.txt

The output was stored as test1.txt.asc, but didn't have CRLF line
endings.  The line endings were still native Linux LF-only like the
source file.

So, if --textmode doesn't convert to CRLF during clearsigning, when does
it convert?

Also, I noticed when searching for information, some sample command
lines given with --textmode and --detach-sign.  What is the purpose of
textmode for a detached signature?  The man page further explains that
--textmode sets a text flag in the message.  Does a detached signature
have this text flag?  Is any sort of conversion done on the original
file during verification of a detached signature?

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 372 bytes
Desc: OpenPGP digital signature
Url : /pipermail/attachments/20060110/b33784f7/signature.pgp


More information about the Gnupg-users mailing list