Signing problems...

Ted Cabeen secabeen@pobox.com
Mon, 19 Jun 2000 14:10:40 -0500


--==_Exmh_-1978458064P
Content-Type: text/plain; charset=us-ascii

In message <20000619095908.H7445@djebel.gnupg.de>, Werner Koch writes:

>On Mon, 19 Jun 2000, Alexander Zangerl wrote:
>
>> personally i think your problem is the same as mine, i.e. that
>> gpg does strip trailing whitespace correctly when signing
>> but not when checking the signature.
>
>Please, can someone track this down. Thre are some commented
>md_start_debug() functions in the code which are quite useful for such
>kinds of problems.
Done. Here's my patch. From what I can tell, the problem was that the textmode flags defined for the entrypoints to plaintext.c were not being set based on the value of sig->sig_class like they should be. This bug was introduced as part of a workaround for a PGP 2.6 bug.
>From my reading we need to check the value of sig_class for both onepass
signatures and regular signatures. This patch checks for textmode in both cases. Thoughts? It works on the signatures I was having problems with earlier. *** gnupg-1.0.1/g10/mainproc.c Thu Dec 16 01:50:19 1999 --- gnupg-1.0.1-new/g10/mainproc.c Mon Jun 19 14:04:18 2000 *************** *** 1174,1180 **** n1? (n1->pkt->pkt.onepass_sig->sig_class == 0x01):0 ); else rc = ask_for_detached_datafile( c->mfx.md, c->mfx.md2, ! iobuf_get_fname(c->iobuf), 0 ); if( rc ) { log_error("can't hash datafile: %s\n", g10_errstr(rc)); return; --- 1174,1181 ---- n1? (n1->pkt->pkt.onepass_sig->sig_class == 0x01):0 ); else rc = ask_for_detached_datafile( c->mfx.md, c->mfx.md2, ! iobuf_get_fname(c->iobuf), ! n1? (n1->pkt->pkt.onepass_sig->sig_class == 0x01):0 ); if( rc ) { log_error("can't hash datafile: %s\n", g10_errstr(rc)); return; *************** *** 1216,1226 **** if( c->sigs_only ) rc = hash_datafiles( c->mfx.md, c->mfx.md2, c->signed_data, c->sigfilename, ! c->mfx.md2? 0 :(sig->sig_class == 0x01) ); else rc = ask_for_detached_datafile( c->mfx.md, c->mfx.md2, iobuf_get_fname(c->iobuf), ! c->mfx.md2? 0 :(sig->sig_class == 0x01) ); if( rc ) { log_error("can't hash datafile: %s\n", g10_errstr(rc)); return; --- 1217,1227 ---- if( c->sigs_only ) rc = hash_datafiles( c->mfx.md, c->mfx.md2, c->signed_data, c->sigfilename, ! (sig->sig_class == 0x01) ); else rc = ask_for_detached_datafile( c->mfx.md, c->mfx.md2, iobuf_get_fname(c->iobuf), ! (sig->sig_class == 0x01) ); if( rc ) { log_error("can't hash datafile: %s\n", g10_errstr(rc)); return; -- Ted Cabeen http://www.pobox.com/~secabeen secabeen@pobox.com Check Website or finger for PGP/GPG Public Key secabeen@uchicago.edu "I have taken all knowledge to be my province." -F. Bacon secabeen@cabeen.org "Human kind cannot bear very much reality."-T.S.Eliot cabeen@netcom.com --==_Exmh_-1978458064P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (SunOS) Comment: Exmh version 2.1.2 06/08/2000 iEYEARECAAYFAjlOcC8ACgkQoayJfLoDSdLwNwCgs4bwbHT3ddftXH+yNPOOPwg/ zgQAnj55l0bKjrAUgER2DACBhqqXan/X =yOxv -----END PGP SIGNATURE----- --==_Exmh_-1978458064P--