[svn] GnuPG - r4544 - in trunk: . agent doc g10 sm tools
svn author wk
cvs at cvs.gnupg.org
Tue Jul 17 20:12:15 CEST 2007
Author: wk
Date: 2007-07-17 20:11:24 +0200 (Tue, 17 Jul 2007)
New Revision: 4544
Modified:
trunk/NEWS
trunk/TODO
trunk/agent/call-pinentry.c
trunk/doc/ChangeLog
trunk/doc/gpgsm.texi
trunk/g10/ChangeLog
trunk/g10/card-util.c
trunk/g10/gpg.c
trunk/sm/ChangeLog
trunk/sm/gpgsm.c
trunk/sm/sign.c
trunk/tools/ChangeLog
trunk/tools/gpgconf-comp.c
Log:
Typo fixes.
Made --default-key work for gpgsm
Add --default-key and --encrypt-to to gpgconf.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/NEWS 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,7 +1,11 @@
Noteworthy changes in version 2.0.6
------------------------------------------------
+ * gpgsm does now grok --default-key.
+
+ * gpgconf is now aware of --default-key and --encrypt-to.
+
Noteworthy changes in version 2.0.5 (2007-07-05)
------------------------------------------------
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/TODO 2007-07-17 18:11:24 UTC (rev 4544)
@@ -59,7 +59,7 @@
* scd
** Application context vs. reader slot
- We have 2 concurrent method of tracking whether a read is in use:
+ We have 2 concurrent method of tracking whether a reader is in use:
Using the session_list in command.c and the lock_table in app.c. IT
would be better to do this just at one place. First we need to see
how we can support cards with multiple applications.
Modified: trunk/agent/call-pinentry.c
===================================================================
--- trunk/agent/call-pinentry.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/agent/call-pinentry.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,4 +1,4 @@
-/* call-pinnetry.c - fork of the pinentry to query stuff from the user
+/* call-pinentry.c - fork of the pinentry to query stuff from the user
* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/doc/ChangeLog 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,3 +1,7 @@
+2007-07-17 Werner Koch <wk at g10code.com>
+
+ * gpgsm.texi (Input and Output): Document --default-key.
+
2007-07-04 Werner Koch <wk at g10code.com>
* gpl.texi: Updated to GPLv3.
Modified: trunk/doc/gpgsm.texi
===================================================================
--- trunk/doc/gpgsm.texi 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/doc/gpgsm.texi 2007-07-17 18:11:24 UTC (rev 4544)
@@ -457,6 +457,14 @@
passphrase encoded to the most commonly used encodings.
+ at item --default-key @var{user_id}
+ at opindex default-key
+Use @var{user_id} as the standard key for signing. This key is used if
+no other key has been defined as a signing key. Note, that the first
+ at option{--local-users} option also sets this key if it has not yet been
+set; however @option{--default-key} always overrides this.
+
+
@item --local-user @var{user_id}
@item -u @var{user_id}
@opindex local-user
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/g10/ChangeLog 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,3 +1,9 @@
+2007-07-17 Werner Koch <wk at g10code.com>
+
+ * gpg.c (gpgconf_list): Declare --encrypt-to and --default-key.
+
+ * card-util.c (get_manufacturer): Add the unmanaged S/N range.
+
2007-07-12 Werner Koch <wk at g10code.com>
* gpg.c (main): Use translate_sys2libc_fd_int when passing an int
Modified: trunk/g10/card-util.c
===================================================================
--- trunk/g10/card-util.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/g10/card-util.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -153,12 +153,15 @@
/* Note: Make sure that there is no colon or linefeed in the string. */
switch (no)
{
- case 0:
- case 0xffff: return "test card";
case 0x0001: return "PPC Card Systems";
case 0x0002: return "Prism";
case 0x0003: return "OpenFortress";
- default: return "unknown";
+ /* 0x00000 and 0xFFFF are defined as test cards per spec,
+ 0xFFF00 to 0xFFFE are assigned for use with randomly created
+ serial numbers. */
+ case 0x0000:
+ case 0xffff: return "test card";
+ default: return (no & 0xff00) == 0xff00? "unmanaged S/N range":"unknown";
}
}
Modified: trunk/g10/gpg.c
===================================================================
--- trunk/g10/gpg.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/g10/gpg.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1467,6 +1467,8 @@
printf ("quiet:%lu:\n", GC_OPT_FLAG_NONE);
printf ("keyserver:%lu:\n", GC_OPT_FLAG_NONE);
printf ("reader-port:%lu:\n", GC_OPT_FLAG_NONE);
+ printf ("default-key:%lu:\n", GC_OPT_FLAG_NONE);
+ printf ("encrypt-to:%lu:\n", GC_OPT_FLAG_NONE);
xfree (configfile_esc);
}
Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/sm/ChangeLog 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,3 +1,8 @@
+2007-07-17 Werner Koch <wk at g10code.com>
+
+ * gpgsm.c (main): Implement --default-key.
+ (main) <gpgconf-list>: Declare --default-key and --encrypt-to.
+
2007-07-16 Werner Koch <wk at g10code.com>
* server.c (cmd_message): Use gnupg_fd_t to avoid dependecy on
Modified: trunk/sm/gpgsm.c
===================================================================
--- trunk/sm/gpgsm.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/sm/gpgsm.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1101,8 +1101,11 @@
case oNoGreeting: nogreeting = 1; break;
case oDefaultKey:
- /* fixme:opt.def_secret_key = pargs.r.ret_str;*/
- log_info ("WARNING: --default-key has not yet been implemented\n");
+ if (*pargs.r.ret_str)
+ {
+ xfree (opt.local_user);
+ opt.local_user = xstrdup (pargs.r.ret_str);
+ }
break;
case oDefRecipient:
if (*pargs.r.ret_str)
@@ -1139,9 +1142,9 @@
case oTextmodeShort: /*fixme:opt.textmode = 2;*/ break;
case oTextmode: /*fixme:opt.textmode=1;*/ break;
- case oUser: /* store the local users, the first one is the default */
+ case oUser: /* Store the local users, the first one is the default */
if (!opt.local_user)
- opt.local_user = pargs.r.ret_str;
+ opt.local_user = xstrdup (pargs.r.ret_str);
add_to_strlist (&locusr, pargs.r.ret_str);
break;
@@ -1424,6 +1427,10 @@
GC_OPT_FLAG_DEFAULT );
printf ("p12-charset:%lu:\n",
GC_OPT_FLAG_DEFAULT );
+ printf ("default-key:%lu:\n",
+ GC_OPT_FLAG_DEFAULT );
+ printf ("encrypt-to:%lu:\n",
+ GC_OPT_FLAG_DEFAULT );
}
break;
Modified: trunk/sm/sign.c
===================================================================
--- trunk/sm/sign.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/sm/sign.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -122,8 +122,9 @@
}
-/* Get the default certificate which is defined as the first cabable
- of signing our keyDB returns and has a secret key available. */
+/* Get the default certificate which is defined as the first
+ certificate capable of signing returned by the keyDB and has a
+ secret key available. */
int
gpgsm_get_default_cert (ctrl_t ctrl, ksba_cert_t *r_cert)
{
@@ -364,7 +365,7 @@
goto leave;
}
- /* If no list of signers is given, use a default one. */
+ /* If no list of signers is given, use the default certificate. */
if (!signerlist)
{
ksba_cert_t cert = get_default_signer (ctrl);
@@ -376,8 +377,7 @@
}
/* Although we don't check for ambigious specification we will
- check that the signer's certificate is is usable and
- valid. */
+ check that the signer's certificate is usable and valid. */
rc = gpgsm_cert_use_sign_p (cert);
if (!rc)
rc = gpgsm_validate_chain (ctrl, cert, NULL, 0, NULL, 0);
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/tools/ChangeLog 2007-07-17 18:11:24 UTC (rev 4544)
@@ -1,3 +1,8 @@
+2007-07-17 Werner Koch <wk at g10code.com>
+
+ * gpgconf-comp.c: Add --encrypt-to and --default-key to gpg and
+ gpgsm.
+
2007-07-16 Marcus Brinkmann <marcus at g10code.de>
* gpg-connect-agent.c (main): Bail out if write fails.
Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c 2007-07-16 14:33:34 UTC (rev 4543)
+++ trunk/tools/gpgconf-comp.c 2007-07-17 18:11:24 UTC (rev 4544)
@@ -616,6 +616,12 @@
{ "Configuration",
GC_OPT_FLAG_GROUP, GC_LEVEL_EXPERT,
"gnupg", N_("Options controlling the configuration") },
+ { "default-key", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
+ "gnupg", N_("|NAME|use NAME as default secret key"),
+ GC_ARG_TYPE_STRING, GC_BACKEND_GPG },
+ { "encrypt-to", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
+ "gnupg", N_("|NAME|encrypt to user ID NAME as well"),
+ GC_ARG_TYPE_STRING, GC_BACKEND_GPG },
{ "options", GC_OPT_FLAG_NONE, GC_LEVEL_EXPERT,
"gnupg", "|FILE|read options from FILE",
GC_ARG_TYPE_PATHNAME, GC_BACKEND_GPG },
@@ -672,6 +678,12 @@
{ "Configuration",
GC_OPT_FLAG_GROUP, GC_LEVEL_EXPERT,
"gnupg", N_("Options controlling the configuration") },
+ { "default-key", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
+ "gnupg", N_("|NAME|use NAME as default secret key"),
+ GC_ARG_TYPE_STRING, GC_BACKEND_GPGSM },
+ { "encrypt-to", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
+ "gnupg", N_("|NAME|encrypt to user ID NAME as well"),
+ GC_ARG_TYPE_STRING, GC_BACKEND_GPGSM },
{ "options", GC_OPT_FLAG_NONE, GC_LEVEL_EXPERT,
"gnupg", "|FILE|read options from FILE",
GC_ARG_TYPE_PATHNAME, GC_BACKEND_GPGSM },
More information about the Gnupg-commits
mailing list