ietf-openpgp
[Top] [All Lists]

Re: Outstanding question - rule on cleartext signing last line

2005-12-27 02:34:36

vedaal(_at_)hush(_dot_)com wrote:
i really can't see any bug in gnupg about this

gnupg clearsigns exactly what the user gives it

if the user gives it text with no empty line after it,
then the signature block begins right after the text

if the user wants a blank line and includes the line return, then gnupg signs after the empty line

they are *not* identical or interchangeable

here are two, one with the empty line, and one without:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 test
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

My results do not agree.  If there is no terminating
newline, GPG adds it (as it must).  If there is a
terminating line, GPG does not add one.  I'm using
FreeBSD and 1.4.2.

iang




galland$ echo "test" > test
galland$ cat test
test
galland$ gpg -ats -u DSS3 test
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information

You need a passphrase to unlock the secret key for
user: "Ian Grigg DSS3 <iang(_at_)systemics(_dot_)com>"
1024-bit DSA key, ID DABCCA96, created 2000-03-26

galland$ cat test.asc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

test
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDsQM/4yubUNq8ypYRAvt0AJ9Mz6HniSHDC50tCwbkfhzfHYPbNACeIcgV
TNCBA1EqsEB2sC186c1PLwo=
=imH/
-----END PGP SIGNATURE-----
galland$ cat test
test
galland$ echo -n "test" > test
galland$ cat test
galland$ gpg -ats -u DSS3 test
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information

You need a passphrase to unlock the secret key for
user: "Ian Grigg DSS3 <iang(_at_)systemics(_dot_)com>"
1024-bit DSA key, ID DABCCA96, created 2000-03-26

File `test.asc' exists. Overwrite? (y/N) y
galland$ cat test.asc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

test
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDsQN44yubUNq8ypYRAppqAKDuyDjAe5OilDaA8M4QhCNhyM7b+wCgqO59
81J/3jX2/rahh9p2knSXOO8=
=QjIF
-----END PGP SIGNATURE-----