summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2003-01-16 20:20:10 +0100
committerDavid Shaw <dshaw@jabberwocky.com>2003-01-16 20:20:10 +0100
commit8220f3fd4d0e09a3d381886c610b56240ca848b8 (patch)
treef3ff3d8e28be2006a9e3d25f365af618adf06ae2 /g10
parent* trustdb.c (init_trustdb, get_validity): Don't use a changed trust model (diff)
downloadgnupg2-8220f3fd4d0e09a3d381886c610b56240ca848b8.tar.xz
gnupg2-8220f3fd4d0e09a3d381886c610b56240ca848b8.zip
* g10.c (add_group): Trim whitespace after a group name so it does not
matter where the user puts the = sign. * options.skel: Comment out the first three lines in case someone manually copies the skel file to their homedir. * 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. * sig-check.c (signature_check2): Use G10ERR_GENERAL as the error for signature digest conflict. BAD_SIGN implies that a signature was checked and we may try and print out a user ID for a key that doesn't exist.
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog17
-rw-r--r--g10/g10.c2
-rw-r--r--g10/options.skel8
-rw-r--r--g10/sig-check.c2
-rw-r--r--g10/sign.c4
5 files changed, 26 insertions, 7 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index d10d8f385..bd9978ccb 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,20 @@
+2003-01-16 David Shaw <dshaw@jabberwocky.com>
+
+ * g10.c (add_group): Trim whitespace after a group name so it does
+ not matter where the user puts the = sign.
+
+ * options.skel: Comment out the first three lines in case someone
+ manually copies the skel file to their homedir.
+
+ * 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.
+
+ * sig-check.c (signature_check2): Use G10ERR_GENERAL as the error
+ for signature digest conflict. BAD_SIGN implies that a signature
+ was checked and we may try and print out a user ID for a key that
+ doesn't exist.
+
2003-01-15 David Shaw <dshaw@jabberwocky.com>
* trustdb.c (init_trustdb, get_validity): Don't use a changed
diff --git a/g10/g10.c b/g10/g10.c
index 07816a284..dd0c2b7af 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -858,6 +858,8 @@ static void add_group(char *string)
return;
}
+ trim_trailing_ws(name,strlen(name));
+
/* Break apart the values */
while ((value= strsep(&string," \t")))
{
diff --git a/g10/options.skel b/g10/options.skel
index ce44448ee..f2811d850 100644
--- a/g10/options.skel
+++ b/g10/options.skel
@@ -1,8 +1,8 @@
-These first three lines are not copied to the gpg.conf file in
-the users home directory.
-$Id$
+# These first three lines are not copied to the gpg.conf file in
+# the users home directory.
+# $Id$
# Options for GnuPG
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 6468cf9ea..e878c4252 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -71,7 +71,7 @@ signature_check2( PKT_signature *sig, MD_HANDLE digest,
if(!md_algo_present(digest,sig->digest_algo)) {
log_info(_("WARNING: signature digest conflict in message\n"));
- rc=G10ERR_BAD_SIGN;
+ rc=G10ERR_GENERAL;
}
else if( get_pubkey( pk, sig->keyid ) )
rc = G10ERR_NO_PUBKEY;
diff --git a/g10/sign.c b/g10/sign.c
index c08b98a63..92342eaea 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -974,8 +974,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 */