gnupg/g10 (ChangeLog getkey.c)
cvs user dshaw
cvs at cvs.gnupg.org
Fri Mar 18 00:39:04 CET 2005
Date: Friday, March 18, 2005 @ 00:52:38
Author: dshaw
Path: /cvs/gnupg/gnupg/g10
Modified: ChangeLog getkey.c
* getkey.c (get_seckey_byname2): If no explicit default key is set, don't
pick a disabled default. Noted by David Crick.
-----------+
ChangeLog | 3 +++
getkey.c | 14 ++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.708 gnupg/g10/ChangeLog:1.709
--- gnupg/g10/ChangeLog:1.708 Fri Mar 18 00:14:47 2005
+++ gnupg/g10/ChangeLog Fri Mar 18 00:52:37 2005
@@ -1,5 +1,8 @@
2005-03-17 David Shaw <dshaw at jabberwocky.com>
+ * getkey.c (get_seckey_byname2): If no explicit default key is
+ set, don't pick a disabled default. Noted by David Crick.
+
* Makefile.am: Calculate GNUPG_LIBEXECDIR directly. Do not
redefine $libexecdir.
Index: gnupg/g10/getkey.c
diff -u gnupg/g10/getkey.c:1.125 gnupg/g10/getkey.c:1.126
--- gnupg/g10/getkey.c:1.125 Sat Feb 5 01:00:35 2005
+++ gnupg/g10/getkey.c Fri Mar 18 00:52:38 2005
@@ -1,6 +1,6 @@
/* getkey.c - Get a key from the database
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ * 2005 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -1059,14 +1059,20 @@
KBNODE *retblock )
{
STRLIST namelist = NULL;
- int rc;
+ int rc,include_unusable=1;
+
+ /* If we have no name, try to use the default secret key. If we
+ have no default, we'll use the first usable one. */
if( !name && opt.def_secret_key && *opt.def_secret_key )
add_to_strlist( &namelist, opt.def_secret_key );
else if(name)
add_to_strlist( &namelist, name );
+ else
+ include_unusable=0;
- rc = key_byname( retctx, namelist, NULL, sk, 1, 1, retblock, NULL );
+ rc = key_byname( retctx, namelist, NULL, sk, 1, include_unusable,
+ retblock, NULL );
free_strlist( namelist );
More information about the Gnupg-commits
mailing list