From 9f65d8673e8669f1cb6069cfd9feac55208bda41 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 15 Jan 2003 20:07:23 +0000 Subject: [PATCH] * sign.c (clearsign_file): Only use pgp2mode with v3 keys and MD5. This matches what we do when decoding such messages and prevents creating a message (v3+RIPEMD/160) that we can't verify. --- g10/ChangeLog | 6 ++++++ g10/sign.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index ab3d3da07..89eef0a1a 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2003-01-15 David Shaw + + * sign.c (clearsign_file): Only use pgp2mode with v3 keys and MD5. + This matches what we do when decoding such messages and prevents + creating a message (v3+RIPEMD/160) that we can't verify. + 2003-01-14 David Shaw * sig-check.c (signature_check2): Use G10ERR_GENERAL as the error diff --git a/g10/sign.c b/g10/sign.c index 85daa47f1..a5f9f91cb 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -949,8 +949,8 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile ) } if ( DBG_HASHING ) md_start_debug( textmd, "clearsign" ); - copy_clearsig_text( out, inp, textmd, - !opt.not_dash_escaped, opt.escape_from, old_style ); + copy_clearsig_text( out, inp, textmd, !opt.not_dash_escaped, + opt.escape_from, (old_style && only_md5) ); /* fixme: check for read errors */ /* now write the armor */