Canonnical text formatting and --digest-algo=sha1?
Cory Cohen
cfc at cert.org
Fri Nov 21 13:09:09 CET 2003
This looks like a problem with the handling of cannonical text format
and trailing tabs. Comments? Is it a bug, and if so can it be fixed?
#!/bin/sh
# Create a GnuPG keyring
rm -rf .gpg
mkdir .gpg
echo "load-extension idea" >.gpg/options
export GNUPGHOME=.gpg
# Import a PGP 2.x self-signed key
# Passphrase is "testing"
/usr/bin/gpg --import <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)
mQBNAz++PfIAAAECAOcd0eIyuUcLGJU0XhZ+n53nvS9FCX2rNEMf8fwGj67Q0BTB
s+bd9uiikAZK15EuNmrZkgoNuICS6VYLgO01blEABRG0ElRlc3QgS2V5IDx0ZXN0
a2V5PokAVQMFEz++UdfpVguA7TVuUQEBOlACAOFIAFGwhfGcQT+B9z9EOmQIOPGJ
R9zqIP+8V/17T2iGS1f4o1uoxj8XEA7zU2enw8hLhn3vigJgXo1SHUP7oyk=
=n9MF
-----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v1.2.1 (GNU/Linux)
lQEAAz++PfIAAAECAOcd0eIyuUcLGJU0XhZ+n53nvS9FCX2rNEMf8fwGj67Q0BTB
s+bd9uiikAZK15EuNmrZkgoNuICS6VYLgO01blEABREBvVD5gVmPxW8B/sj+82ut
a8tDFxNt9Dz2xjvPDlWsFakeMYlPtuWyslErTuBqFz5SkMx6MqPAozBRB5tnH0P4
XbUGTkUYPS7f9rcBAOEJXiAZSu1G72BXVDEFJ/6LT/Lp5j5Hy4FfUeml/CQ0AQCs
vuHMiH4TOoh+pISRMcJ18a1w4wwl6gD8MsrdoKIDuAEA0f+yPGydeW3jvFIj7GQV
wB2F4hD+g/sdL2gF6QMDZoVQBbQSVGVzdCBLZXkgPHRlc3RrZXk+
=xCpP
-----END PGP PRIVATE KEY BLOCK-----
EOF
# Create a test file with a trailing tab character
echo "Test " >test
# Sign the file
/usr/bin/gpg --digest-algo=sha1 --clearsign --local-user test test
rm test
# Validate the signature (fails!)
/usr/bin/gpg test.asc
rm test.asc
Cory
--
======================================================================
Cory Forrest Cohen cert at cert.org CERT Coordination Center
Hotline: +1-412-268-7090 Software Engineering Institute
Fax: +1-412-268-6989 Carnegie Mellon University
======================================================================
More information about the Gnupg-devel
mailing list