[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta783-7-g3259862

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 18 13:00:02 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  3259862cb4a7202e858f7bfd7a4b1796b38efff7 (commit)
       via  e4aa006e4807285ffdd881e4e05af3bc47c5c964 (commit)
       via  57df1121c18b004dd763b35eabf7b51fc9e8ec38 (commit)
       via  425d0750168f6b66a5d78a857cf21375a8f129eb (commit)
       via  7e51ef0f77962f5fb215da53817caf28899ca190 (commit)
      from  af1196512f505e8a3a338f9b72394fa3585a5234 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3259862cb4a7202e858f7bfd7a4b1796b38efff7
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 18 12:55:54 2014 +0200

    tests: Re-enable OpenPGP ecc test.
    
    --

diff --git a/tests/openpgp/ecc.test b/tests/openpgp/ecc.test
index cb04467..58fd251 100755
--- a/tests/openpgp/ecc.test
+++ b/tests/openpgp/ecc.test
@@ -20,7 +20,7 @@ mainkeyids='BAA59D9C
             45AF2FFE'
 
 
-if have_pubkey_algo "ECC"; then
+if have_pubkey_algo "ECDH"; then
   :
 else
   info "No ECC support due to an old Libgcrypt"

commit e4aa006e4807285ffdd881e4e05af3bc47c5c964
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 18 12:55:29 2014 +0200

    kbx: Make user id and signature data optional for OpenPGP.
    
    * kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction.
    --
    
    Although self-signature and key binding signatures are required by
    OpenPGP, we should not enforce that in the storage backend.

diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c
index ebbcdf8..f7abb6c 100644
--- a/kbx/keybox-blob.c
+++ b/kbx/keybox-blob.c
@@ -702,9 +702,6 @@ _keybox_create_openpgp_blob (KEYBOXBLOB *r_blob,
 
   *r_blob = NULL;
 
-  if (!info->nuids || !info->nsigs)
-    return gpg_error (GPG_ERR_BAD_PUBKEY);
-
   /* If we have a signature status vector, check that the number of
      elements matches the actual number of signatures.  */
   if (sigstatus && sigstatus[0] != info->nsigs)
@@ -721,19 +718,27 @@ _keybox_create_openpgp_blob (KEYBOXBLOB *r_blob,
       err = gpg_error_from_syserror ();
       goto leave;
     }
+
   blob->nuids = info->nuids;
-  blob->uids = xtrycalloc (blob->nuids, sizeof *blob->uids );
-  if (!blob->uids)
+  if (blob->nuids)
     {
-      err = gpg_error_from_syserror ();
-      goto leave;
+      blob->uids = xtrycalloc (blob->nuids, sizeof *blob->uids );
+      if (!blob->uids)
+        {
+          err = gpg_error_from_syserror ();
+          goto leave;
+        }
     }
+
   blob->nsigs = info->nsigs;
-  blob->sigs = xtrycalloc (blob->nsigs, sizeof *blob->sigs );
-  if (!blob->sigs)
+  if (blob->nsigs)
     {
-      err = gpg_error_from_syserror ();
-      goto leave;
+      blob->sigs = xtrycalloc (blob->nsigs, sizeof *blob->sigs );
+      if (!blob->sigs)
+        {
+          err = gpg_error_from_syserror ();
+          goto leave;
+        }
     }
 
   err = pgp_create_key_part (blob, info);

commit 57df1121c18b004dd763b35eabf7b51fc9e8ec38
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 18 11:45:00 2014 +0200

    gpg: Change default cipher for --symmetric from CAST5 to AES-128.
    
    * g10/main.h (DEFAULT_CIPHER_ALGO): Chhange to AES or CAST5 or 3DES
    depending on configure option.
    * g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO.

diff --git a/doc/gpg.texi b/doc/gpg.texi
index 36aa18e..7ac1613 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -1,4 +1,4 @@
- at c Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ @c Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
 @c               2008, 2009, 2010 Free Software Foundation, Inc.
 @c This is part of the GnuPG manual.
 @c For copying conditions, see the file gnupg.texi.
@@ -14,6 +14,19 @@
 @cindex command options
 @cindex options, GPG command
 
+ at c Begin algorithm defaults
+
+ at ifclear gpgtwoone
+ at set DEFSYMENCALGO CAST5
+ at end ifclear
+
+ at ifset gpgtwoone
+ at set DEFSYMENCALGO AES128
+ at end ifset
+
+ at c End algorithm defaults
+
+
 @c Begin GnuPG 1.x specific stuff
 @ifset gpgone
 @macro gpgname
@@ -217,7 +230,7 @@ decrypted via a secret key or a passphrase).
 @itemx -c
 @opindex symmetric
 Encrypt with a symmetric cipher using a passphrase. The default
-symmetric cipher used is CAST5, but may be chosen with the
+symmetric cipher used is @value{DEFSYMENCALGO}, but may be chosen with the
 @option{--cipher-algo} option. This option may be combined with
 @option{--sign} (for a signed and symmetrically encrypted message),
 @option{--encrypt} (for a message that may be decrypted via a secret key
@@ -2272,7 +2285,7 @@ to consider (e.g. @option{--symmetric}).
 @item --s2k-cipher-algo @code{name}
 @opindex s2k-cipher-algo
 Use @code{name} as the cipher algorithm used to protect secret keys.
-The default cipher is CAST5. This cipher is also used for
+The default cipher is @value{DEFSYMENCALGO}. This cipher is also used for
 conventional encryption if @option{--personal-cipher-preferences} and
 @option{--cipher-algo} is not given.
 
diff --git a/g10/gpg.c b/g10/gpg.c
index 7ba193b..ce1a87f 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2072,7 +2072,7 @@ main (int argc, char **argv)
     opt.compress_algo = -1; /* defaults to DEFAULT_COMPRESS_ALGO */
     opt.s2k_mode = 3; /* iterated+salted */
     opt.s2k_count = 0; /* Auto-calibrate when needed.  */
-    opt.s2k_cipher_algo = CIPHER_ALGO_CAST5;
+    opt.s2k_cipher_algo = DEFAULT_CIPHER_ALGO;
     opt.completes_needed = 1;
     opt.marginals_needed = 3;
     opt.max_cert_depth = 5;
diff --git a/g10/main.h b/g10/main.h
index b2efaae..4eb1b5f 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -26,11 +26,18 @@
 #include "util.h"
 
 /* It could be argued that the default cipher should be 3DES rather
-   than CAST5, and the default compression should be 0
+   than AES128, and the default compression should be 0
    (i.e. uncompressed) rather than 1 (zip).  However, the real world
    issues of speed and size come into play here. */
 
-#define DEFAULT_CIPHER_ALGO     CIPHER_ALGO_CAST5
+#if GPG_USE_AES128
+# define DEFAULT_CIPHER_ALGO     CIPHER_ALGO_AES
+#elif GPG_USE_CAST5
+# define DEFAULT_CIPHER_ALGO     CIPHER_ALGO_CAST5
+#else
+# define DEFAULT_CIPHER_ALGO     CIPHER_ALGO_3DES
+#endif
+
 #define DEFAULT_DIGEST_ALGO     DIGEST_ALGO_SHA1
 #define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1
 #ifdef HAVE_ZIP

commit 425d0750168f6b66a5d78a857cf21375a8f129eb
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 18 11:42:10 2014 +0200

    yat2m: Support @set and @value.
    
    * doc/yat2m.c (variablelist): New.
    (set_variable): New.
    (macro_set_p): Also check the variables.
    (proc_texi_cmd): Support the @value command.
    (parse_file): Support the @set command.
    (top_parse_file): Release variablelist.

diff --git a/doc/yat2m.c b/doc/yat2m.c
index cd3bb90..f780952 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -140,6 +140,9 @@ typedef struct macro_s *macro_t;
 /* List of all defined macros. */
 static macro_t macrolist;
 
+/* List of variables set by @set. */
+static macro_t variablelist;
+
 /* List of global macro names.  The value part is not used.  */
 static macro_t predefinedmacrolist;
 
@@ -379,8 +382,44 @@ set_macro (const char *macroname, char *macrovalue)
 }
 
 
-/* Return true if the macro NAME is set, i.e. not the empty string and
-   not evaluating to 0.  */
+/* Create or update a variable with name and value given in NAMEANDVALUE.  */
+static void
+set_variable (char *nameandvalue)
+{
+  macro_t m;
+  const char *value;
+  char *p;
+
+  for (p = nameandvalue; *p && *p != ' ' && *p != '\t'; p++)
+    ;
+  if (!*p)
+    value = "";
+  else
+    {
+      *p++ = 0;
+      while (*p == ' ' || *p == '\t')
+        p++;
+      value = p;
+    }
+
+  for (m=variablelist; m; m = m->next)
+    if (!strcmp (m->name, nameandvalue))
+      break;
+  if (m)
+    free (m->value);
+  else
+    {
+      m = xcalloc (1, sizeof *m + strlen (nameandvalue));
+      strcpy (m->name, nameandvalue);
+      m->next = variablelist;
+      variablelist = m;
+    }
+  m->value = xstrdup (value);
+}
+
+
+/* Return true if the macro or variable NAME is set, i.e. not the
+   empty string and not evaluating to 0.  */
 static int
 macro_set_p (const char *name)
 {
@@ -389,6 +428,10 @@ macro_set_p (const char *name)
   for (m = macrolist; m ; m = m->next)
     if (!strcmp (m->name, name))
       break;
+  if (!m)
+    for (m = variablelist; m ; m = m->next)
+      if (!strcmp (m->name, name))
+        break;
   if (!m || !m->value || !*m->value)
     return 0;
   if ((*m->value & 0x80) || !isdigit (*m->value))
@@ -672,6 +715,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
     { "/",       0 },
     { "end",     4 },
     { "quotation",1, ".RS\n\\fB" },
+    { "value", 8 },
     { NULL }
   };
   size_t n;
@@ -747,11 +791,46 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
         case 7:
           ignore_args = 1;
           break;
+        case 8:
+          ignore_args = 1;
+          if (*rest != '{')
+            {
+              err ("opening brace for command '%s' missing", command);
+              return len;
+            }
+          else
+            {
+              /* Find closing brace.  */
+              for (s=rest+1, n=1; *s && n < len; s++, n++)
+                if (*s == '}')
+                  break;
+              if (*s != '}')
+                {
+                  err ("closing brace for command '%s' not found", command);
+                  return len;
+                }
+              else
+                {
+                  size_t len = s - (rest + 1);
+                  macro_t m;
+
+                  for (m = variablelist; m; m = m->next)
+                    if (strlen (m->name) == len
+                        &&!strncmp (m->name, rest+1, len))
+                      break;
+                  if (m)
+                    fputs (m->value, fp);
+                  else
+                    inf ("texinfo variable '%.*s' is not set",
+                         (int)len, rest+1);
+                }
+            }
+          break;
         default:
           break;
         }
     }
-  else
+  else /* macro */
     {
       macro_t m;
 
@@ -1221,6 +1300,10 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause)
               macrovalue = xmalloc ((macrovaluesize = 1024));
               macrovalueused = 0;
             }
+          else if (n == 4 && !memcmp (line, "@set", 4))
+            {
+              set_variable (p);
+            }
           else if (n == 8 && !memcmp (line, "@manpage", 8))
             {
               free (*section_name);
@@ -1331,6 +1414,13 @@ top_parse_file (const char *fname, FILE *fp)
       free (macrolist);
       macrolist = next;
     }
+  while (variablelist)
+    {
+      macro_t next = variablelist->next;
+      free (variablelist->value);
+      free (variablelist);
+      variablelist = next;
+    }
   for (m=predefinedmacrolist; m; m = m->next)
     set_macro (m->name, xstrdup ("1"));
   cond_is_active = 1;

commit 7e51ef0f77962f5fb215da53817caf28899ca190
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 18 11:39:57 2014 +0200

    yat2m: Support the $* command for man page rendering.

diff --git a/doc/yat2m.c b/doc/yat2m.c
index 2ac4390..cd3bb90 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -87,6 +87,10 @@
     detects the number of white spaces in front of an @item and remove
     this number of spaces from all following lines until a new @item
     is found or there are less spaces than for the last @item.
+
+    Note that @* does only work correctly if used at the end of an
+    input line.
+
 */
 
 #include <stdio.h>
@@ -664,6 +668,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
     { "table",   3 },
     { "itemize",   3 },
     { "bullet",  0, "* " },
+    { "*",       0, "\n.br"},
+    { "/",       0 },
     { "end",     4 },
     { "quotation",1, ".RS\n\\fB" },
     { NULL }

-----------------------------------------------------------------------

Summary of changes:
 doc/gpg.texi           |   19 +++++++--
 doc/yat2m.c            |  102 ++++++++++++++++++++++++++++++++++++++++++++++--
 g10/gpg.c              |    2 +-
 g10/main.h             |   11 +++++-
 kbx/keybox-blob.c      |   27 +++++++------
 tests/openpgp/ecc.test |    2 +-
 6 files changed, 142 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list