[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta783-52-g34a3e45

by Werner Koch cvs at cvs.gnupg.org
Thu Sep 18 18:35:20 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  34a3e458d09453f1714ca935078659f17ebb5733 (commit)
       via  93f158df381af86036332c4314c2d4a64eab3e62 (commit)
       via  72a16d80d4505aa0ff509aae41f848bbe42ed129 (commit)
       via  345a8374f31e637a99e6438e527670cf6845ca05 (commit)
       via  927db789c19cbe5656ff980841ee37dd3a8989e7 (commit)
       via  cad181b5ece3ab6910575c82c731ce2b47271a09 (commit)
       via  6e7bcabd781a3ca9ad7dd90d962fb2a239feab4a (commit)
       via  b17e8bbf20239e840763f98d3e62f16efdc82ba3 (commit)
       via  f82a6e0f08725008c5bbf702a5f4c175ea09f01c (commit)
       via  4f35ef499ac913036b7b69296a62afe8159b90b8 (commit)
       via  ba6f8b3d9ec83b35c4f3839853567491fee2f99c (commit)
       via  34b2e8c7dcb0edb28f99edbd788d73491334e3c0 (commit)
       via  6a0c3fa19cfcdd590b96691e8a8ffb48fb5e0ec4 (commit)
       via  327134934d79d141d92170ad3b4a6ef3cb718ee0 (commit)
       via  0af533abd3c1ebd2cf19371fcb8cd2dcc22d355b (commit)
      from  2f065d7ab6c514013eb8504281f50284764c26ec (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 34a3e458d09453f1714ca935078659f17ebb5733
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    Post beta release update.
    
    --

diff --git a/NEWS b/NEWS
index d5aa52e..a700313 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Noteworthy changes in version 2.1.0-betaNNN (unreleased)
+--------------------------------------------------------
+
+
 Noteworthy changes in version 2.1.0-beta834 (2014-09-18)
 --------------------------------------------------------
 
diff --git a/autogen.rc b/autogen.rc
index 3e0a9e9..f030b94 100644
--- a/autogen.rc
+++ b/autogen.rc
@@ -42,4 +42,4 @@ esac
 
 extra_aclocal_flags="-I gl/m4"
 
-final_info="./configure --sysconfdir=/etc --enable-maintainer-mode --enable-symcryptrun --enable-gpgtar && make"
+final_info="./configure --sysconfdir=/etc --enable-maintainer-mode  && make"

commit 93f158df381af86036332c4314c2d4a64eab3e62
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    Release 2.1.0-beta834.

diff --git a/AUTHORS b/AUTHORS
index 539d24b..a4af1dc 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,7 @@
 Program: GnuPG
 Homepage: https://www.gnupg.org
+Download: ftp://ftp.gnupg.org/gcrypt/gnupg/
+Repository: git://git.gnupg.org/gnupg.git
 Maintainer: Werner Koch <wk at gnupg.org>
 Bug reports: http://bugs.gnupg.org
 Security related bug reports: <security at gnupg.org>
diff --git a/NEWS b/NEWS
index d6fb1b3..d5aa52e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,22 @@
-Noteworthy changes in version 2.1.0-betaNNN (unreleased)
+Noteworthy changes in version 2.1.0-beta834 (2014-09-18)
 --------------------------------------------------------
 
+ * gpg: Improved passphrase caching.
+
+ * gpg: Switched to algorithm number 22 for EdDSA.
+
+ * gpg: Removed CAST5 from the default preferences.
+
+ * gpg: Order SHA-1 last in the hash preferences.
+
+ * gpg: Changed default cipher for --symmetric to AES-128.
+
+ * gpg: Fixed export of ECC keys and import of EdDSA keys.
+
+ * dirmngr: Fixed the KS_FETCH command.
+
+ * speedo: Downloads related packages and works for non-Windows.
+
 
 Noteworthy changes in version 2.1.0-beta783 (2014-08-14)
 --------------------------------------------------------
diff --git a/README b/README
index da4c498..372d84a 100644
--- a/README
+++ b/README
@@ -85,6 +85,15 @@ You may run
 
 to view the default directories used by GnuPG.
 
+To quickly build all required software without installing it, the
+Speedo method may be used:
+
+  make -f build-aux/speedo.mk  native
+
+This method downloads all required libraries and does a native build
+of GnuPG to PLAY/inst/.  GNU make is required and you need to set
+LD_LIBRARY_PATH to $(pwd)/PLAY/inst/lib.
+
 
 MIGRATION FROM 1.4 or 2.0 to 2.1
 ================================

commit 72a16d80d4505aa0ff509aae41f848bbe42ed129
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    speedo: Distribute needed files.
    
    * Makefile.am (EXTRA_DIST): Add speedo stuff.

diff --git a/Makefile.am b/Makefile.am
index 89e2077..286038e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,11 +23,27 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar
 
 GITLOG_TO_CHANGELOG=gitlog-to-changelog
 
-EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc
+EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc \
 	     ChangeLog-2011 po/ChangeLog-2011 build-aux/ChangeLog-2011 \
-	     VERSION build-aux/gitlog-to-changelog \
+	     VERSION README.GIT build-aux/gitlog-to-changelog \
 	     build-aux/git-log-fix build-aux/git-log-footer \
-	     build-aux/speedo.mk README.GIT
+	     build-aux/getswdb.sh                           \
+	     build-aux/speedo.mk                            \
+             build-aux/speedo/zlib.pc			    \
+             build-aux/speedo/w32			    \
+             build-aux/speedo/w32/inst-options.ini	    \
+             build-aux/speedo/w32/inst.nsi		    \
+             build-aux/speedo/w32/pkg-copyright.txt	    \
+             build-aux/speedo/w32/g4wihelp.c		    \
+             build-aux/speedo/w32/pango.modules		    \
+             build-aux/speedo/w32/gdk-pixbuf-loaders.cache  \
+             build-aux/speedo/w32/exdll.h		    \
+             build-aux/speedo/w32/README.txt		    \
+             build-aux/speedo/patches			    \
+             build-aux/speedo/patches/atk-1.32.0.patch	    \
+             build-aux/speedo/patches/libiconv-1.14.patch   \
+             build-aux/speedo/patches/pango-1.29.4.patch
+
 
 DISTCLEANFILES = g10defs.h
 

commit 345a8374f31e637a99e6438e527670cf6845ca05
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    build: Enable gpgtar by default.

diff --git a/configure.ac b/configure.ac
index a522dd2..a2f07cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,7 +111,7 @@ GNUPG_BUILD_PROGRAM(dirmngr, yes)
 GNUPG_BUILD_PROGRAM(tools, yes)
 GNUPG_BUILD_PROGRAM(doc, yes)
 GNUPG_BUILD_PROGRAM(symcryptrun, no)
-GNUPG_BUILD_PROGRAM(gpgtar, no)
+GNUPG_BUILD_PROGRAM(gpgtar, yes)
 
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE_GT)

commit 927db789c19cbe5656ff980841ee37dd3a8989e7
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    common: Do not build maintainer modules in non-maintainer mode.
    
    * common/Makefile.am (module_maint_tests): Use only in maintainer
    mode.
    (t_common_cflags): New.

diff --git a/common/Makefile.am b/common/Makefile.am
index 40fdabd..03bc5eb 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -181,13 +181,21 @@ module_tests = t-convert t-percent t-gettime t-sysutils t-sexputil \
 if !HAVE_W32CE_SYSTEM
 module_tests += t-exechelp
 endif
+
+if MAINTAINER_MODE
 module_maint_tests = t-helpfile t-b64 t-http
+else
+module_maint_tests =
+endif
 
 
+t_common_cflags = $(KSBA_CFLAGS) $(LIBGCRYPT_CFLAGS) \
+                  $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
 t_common_ldadd = libcommon.a ../gl/libgnu.a \
                  $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
 	         $(LIBINTL) $(LIBICONV)
 
+
 # jnlib tests
 t_stringhelp_SOURCES = t-stringhelp.c $(t_jnlib_src)
 t_stringhelp_LDADD = $(t_common_ldadd)
diff --git a/common/t-http.c b/common/t-http.c
index d4c974d..9872f9a 100644
--- a/common/t-http.c
+++ b/common/t-http.c
@@ -226,7 +226,7 @@ main (int argc, char **argv)
     }
   if (argc != 1)
     {
-      fprintf (stderr, PGM ": no or roo many URLS given\n");
+      fprintf (stderr, PGM ": no or too many URLS given\n");
       exit (1);
     }
 

commit cad181b5ece3ab6910575c82c731ce2b47271a09
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:49:44 2014 +0200

    common: Remove superfluous statements.
    
    * common/exechelp-posix.c: Remove weak pragmas.
    * common/sexputil.c (make_canon_sexp_from_rsa_pk): Remove double
    const.
    --
    
    We do not use Pth anymore and thus there is no more need for the weak
    pragmas.

diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c
index 249d38d..1a1ff1b 100644
--- a/common/exechelp-posix.c
+++ b/common/exechelp-posix.c
@@ -70,15 +70,6 @@
 #include "exechelp.h"
 
 
-/* We have the usual problem here: Some modules are linked against pth
-   and some are not.  However we want to use pth_fork and pth_waitpid
-   here. Using a weak symbol works but is not portable - we should
-   provide a an explicit dummy pth module instead of using the
-   pragma.  */
-#pragma weak pth_fork
-#pragma weak pth_waitpid
-
-
 /* Return the maximum number of currently allowed open file
    descriptors.  Only useful on POSIX systems but returns a value on
    other systems too.  */
diff --git a/common/sexputil.c b/common/sexputil.c
index f15b94c..c24facb 100644
--- a/common/sexputil.c
+++ b/common/sexputil.c
@@ -370,9 +370,9 @@ make_canon_sexp_from_rsa_pk (const void *m_arg, size_t mlen,
   char mlen_str[35];
   char elen_str[35];
   unsigned char *keybuf, *p;
-  const char const part1[] = "(10:public-key(3:rsa(1:n";
-  const char const part2[] = ")(1:e";
-  const char const part3[] = ")))";
+  const char part1[] = "(10:public-key(3:rsa(1:n";
+  const char part2[] = ")(1:e";
+  const char part3[] = ")))";
 
   /* Remove leading zeroes.  */
   for (; mlen && !*m; mlen--, m++)

commit 6e7bcabd781a3ca9ad7dd90d962fb2a239feab4a
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 16:00:34 2014 +0200

    g13: Avoid segv after pipe creation failure.
    
    * g13/call-gpg.c (gpg_encrypt_blob): Init some vars in case of an
    early error.
    (gpg_decrypt_blob): Ditto.

diff --git a/g13/call-gpg.c b/g13/call-gpg.c
index 316082a..54f6056 100644
--- a/g13/call-gpg.c
+++ b/g13/call-gpg.c
@@ -332,11 +332,11 @@ gpg_encrypt_blob (ctrl_t ctrl, const void *plain, size_t plainlen,
                   strlist_t keys, void **r_ciph, size_t *r_ciphlen)
 {
   gpg_error_t err;
-  assuan_context_t ctx;
+  assuan_context_t ctx = NULL;
   int outbound_fds[2] = { -1, -1 };
   int inbound_fds[2]  = { -1, -1 };
-  npth_t writer_thread;
-  npth_t reader_thread;
+  npth_t writer_thread = (npth_t)0;
+  npth_t reader_thread = (npth_t)0;
   gpg_error_t writer_err, reader_err;
   membuf_t reader_mb;
   char line[ASSUAN_LINELENGTH];
@@ -475,11 +475,11 @@ gpg_decrypt_blob (ctrl_t ctrl, const void *ciph, size_t ciphlen,
                   void **r_plain, size_t *r_plainlen)
 {
   gpg_error_t err;
-  assuan_context_t ctx;
+  assuan_context_t ctx = NULL;
   int outbound_fds[2] = { -1, -1 };
   int inbound_fds[2]  = { -1, -1 };
-  npth_t writer_thread;
-  npth_t reader_thread;
+  npth_t writer_thread = (npth_t)0;
+  npth_t reader_thread = (npth_t)0;
   gpg_error_t writer_err, reader_err;
   membuf_t reader_mb;
   int ret;

commit b17e8bbf20239e840763f98d3e62f16efdc82ba3
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:39:50 2014 +0200

    scd: Fix int/short mismatch in format string of app-p15.c
    
    * scd/app-p15.c (parse_certid): Use snprintf and cast value.
    (send_certinfo): Ditto.
    (send_keypairinfo): Ditto.
    (do_getattr): Ditto.

diff --git a/scd/app-p15.c b/scd/app-p15.c
index cc407af..eb074ef 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -494,7 +494,8 @@ parse_certid (app_t app, const char *certid,
   *r_objidlen = 0;
 
   if (app->app_local->home_df)
-    sprintf (tmpbuf, "P15-%04hX.", (app->app_local->home_df & 0xffff));
+    snprintf (tmpbuf, sizeof tmpbuf,
+              "P15-%04X.", (unsigned int)(app->app_local->home_df & 0xffff));
   else
     strcpy (tmpbuf, "P15.");
   if (strncmp (certid, tmpbuf, strlen (tmpbuf)) )
@@ -2370,7 +2371,8 @@ send_certinfo (app_t app, ctrl_t ctrl, const char *certtype,
       p = stpcpy (buf, "P15");
       if (app->app_local->home_df)
         {
-          sprintf (p, "-%04hX", (app->app_local->home_df & 0xffff));
+          snprintf (p, 6, "-%04X",
+                    (unsigned int)(app->app_local->home_df & 0xffff));
           p += 5;
         }
       p = stpcpy (p, ".");
@@ -2461,7 +2463,8 @@ send_keypairinfo (app_t app, ctrl_t ctrl, prkdf_object_t keyinfo)
       p = stpcpy (buf, "P15");
       if (app->app_local->home_df)
         {
-          sprintf (p, "-%04hX", (app->app_local->home_df & 0xffff));
+          snprintf (p, 6, "-%04hX",
+                    (unsigned int)(app->app_local->home_df & 0xffff));
           p += 5;
         }
       p = stpcpy (p, ".");
@@ -2686,7 +2689,8 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
           p = stpcpy (buf, "P15");
           if (app->app_local->home_df)
             {
-              sprintf (p, "-%04hX", (app->app_local->home_df & 0xffff));
+              snprintf (p, 6, "-%04hX",
+                        (unsigned int)(app->app_local->home_df & 0xffff));
               p += 5;
             }
           p = stpcpy (p, ".");

commit f82a6e0f08725008c5bbf702a5f4c175ea09f01c
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:32:17 2014 +0200

    agent: Init a local variable in the error case.
    
    * agent/pksign.c (do_encode_md): Init HASH on error.

diff --git a/agent/pksign.c b/agent/pksign.c
index 9147b50..0160a11 100644
--- a/agent/pksign.c
+++ b/agent/pksign.c
@@ -62,13 +62,15 @@ do_encode_md (const byte * md, size_t mdlen, int algo, gcry_sexp_t * r_hash,
       gcry_mpi_t mpi;
 
       rc = gcry_mpi_scan (&mpi, GCRYMPI_FMT_USG, md, mdlen, NULL);
-      if (! rc)
+      if (!rc)
 	{
 	  rc = gcry_sexp_build (&hash, NULL,
 				"(data (flags raw) (value %m))",
 				mpi);
 	  gcry_mpi_release (mpi);
 	}
+      else
+        hash = NULL;
 
     }
 

commit 4f35ef499ac913036b7b69296a62afe8159b90b8
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:28:40 2014 +0200

    agent: Remove left over debug output.
    
    * agent/command-ssh.c (ssh_signature_encoder_eddsa): Remove debug
    output.

diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index d619324..5427323 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -1665,14 +1665,12 @@ ssh_signature_encoder_eddsa (ssh_key_type_spec_t *spec,
   if (err)
     goto out;
 
-  gcry_log_debug ("  out: len=%zu\n", totallen);
   err = stream_write_uint32 (stream, totallen);
   if (err)
     goto out;
 
   for (i = 0; i < DIM(data); i++)
     {
-      gcry_log_debughex ("  out", data[i], data_n[i]);
       err = stream_write_data (stream, data[i], data_n[i]);
       if (err)
         goto out;

commit ba6f8b3d9ec83b35c4f3839853567491fee2f99c
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:21:56 2014 +0200

    agent: Silence compiler warning for a debug message.
    
    * agent/call-pinentry.c (agent_query_dump_state): Use %p for
    POPUP_TID.

diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 2562e51..126d696 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -107,8 +107,8 @@ initialize_module_call_pinentry (void)
 void
 agent_query_dump_state (void)
 {
-  log_info ("agent_query_dump_state: entry_ctx=%p pid=%ld popup_tid=%lx\n",
-            entry_ctx, (long)assuan_get_pid (entry_ctx), popup_tid);
+  log_info ("agent_query_dump_state: entry_ctx=%p pid=%ld popup_tid=%p\n",
+            entry_ctx, (long)assuan_get_pid (entry_ctx), (void*)popup_tid);
 }
 
 /* Called to make sure that a popup window owned by the current

commit 34b2e8c7dcb0edb28f99edbd788d73491334e3c0
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:17:44 2014 +0200

    sm: Silence compiler warnings.
    
    * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Remove unused var I.
    * sm/certreqgen.c (proc_parameters): Init PUBLIC to avoid compiler
    warning.

diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c
index 368dc55..3ccd048 100644
--- a/sm/certreqgen-ui.c
+++ b/sm/certreqgen-ui.c
@@ -147,7 +147,6 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream)
   char *subject_name;
   membuf_t mb_email, mb_dns, mb_uri, mb_result;
   char *result = NULL;
-  int i;
   const char *s, *s2;
   int selfsigned;
 
@@ -381,7 +380,7 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream)
     goto mem_error;
 
   tty_printf (_("These parameters are used:\n"));
-  for (s=result; (s2 = strchr (s, '\n')); s = s2+1, i++)
+  for (s=result; (s2 = strchr (s, '\n')); s = s2+1)
     tty_printf ("    %.*s\n", (int)(s2-s), s);
   tty_printf ("\n");
 
diff --git a/sm/certreqgen.c b/sm/certreqgen.c
index 241e67d..9720b80 100644
--- a/sm/certreqgen.c
+++ b/sm/certreqgen.c
@@ -437,7 +437,7 @@ proc_parameters (ctrl_t ctrl, struct para_data_s *para,
   char numbuf[20];
   unsigned char keyparms[100];
   int rc = 0;
-  ksba_sexp_t public;
+  ksba_sexp_t public = NULL;
   ksba_sexp_t sigkey = NULL;
   int seq;
   size_t erroff, errlen;

commit 6a0c3fa19cfcdd590b96691e8a8ffb48fb5e0ec4
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 15:08:51 2014 +0200

    gpg: Silence a compiler warning.
    
    * g10/parse-packet.c (enum_sig_subpkt): Replace hack.

diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index edaa84d..f7b2079 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1428,11 +1428,10 @@ enum_sig_subpkt (const subpktarea_t * pktbuf, sigsubpkttype_t reqtype,
 
   if (!pktbuf || reqseq == -1)
     {
-      /* return some value different from NULL to indicate that
-       * there is no critical bit we do not understand.  The caller
-       * will never use the value.  Yes I know, it is an ugly hack */
-      return reqtype ==
-	SIGSUBPKT_TEST_CRITICAL ? (const byte *) &pktbuf : NULL;
+      static char dummy[] = "x";
+      /* Return a value different from NULL to indicate that
+       * there is no critical bit we do not understand.  */
+      return reqtype ==	SIGSUBPKT_TEST_CRITICAL ? dummy : NULL;
     }
   buffer = pktbuf->data;
   buflen = pktbuf->len;

commit 327134934d79d141d92170ad3b4a6ef3cb718ee0
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 14:56:39 2014 +0200

    gpg: Replace a hash algo test function.
    
    * g10/gpg.c (print_mds): Replace openpgp_md_test_algo.
    --
    
    This is actually not required because as of now the used OpenPGP and
    Gcrypt hash algorithm numbers are identical.  But that might change in
    the future.
    
    This changes the behavior of GnuPG in case it has been build with
    some algorithms disabled: If those algorithms are available in
    Libgcrypt, their results will be used printed anyway.

diff --git a/g10/gpg.c b/g10/gpg.c
index b06e392..a9d248d 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4386,18 +4386,18 @@ print_mds( const char *fname, int algo )
     gcry_md_enable (md, algo);
   else
     {
-      if (!openpgp_md_test_algo (GCRY_MD_MD5))
+      if (!gcry_md_test_algo (GCRY_MD_MD5))
         gcry_md_enable (md, GCRY_MD_MD5);
       gcry_md_enable (md, GCRY_MD_SHA1);
-      if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+      if (!gcry_md_test_algo (GCRY_MD_RMD160))
         gcry_md_enable (md, GCRY_MD_RMD160);
-      if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+      if (!gcry_md_test_algo (GCRY_MD_SHA224))
         gcry_md_enable (md, GCRY_MD_SHA224);
-      if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+      if (!gcry_md_test_algo (GCRY_MD_SHA256))
         gcry_md_enable (md, GCRY_MD_SHA256);
-      if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+      if (!gcry_md_test_algo (GCRY_MD_SHA384))
         gcry_md_enable (md, GCRY_MD_SHA384);
-      if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+      if (!gcry_md_test_algo (GCRY_MD_SHA512))
         gcry_md_enable (md, GCRY_MD_SHA512);
     }
 
@@ -4415,18 +4415,18 @@ print_mds( const char *fname, int algo )
             print_hashline (md, algo, fname);
           else
             {
-              if (!openpgp_md_test_algo (GCRY_MD_MD5))
+              if (!gcry_md_test_algo (GCRY_MD_MD5))
                 print_hashline( md, GCRY_MD_MD5, fname );
               print_hashline( md, GCRY_MD_SHA1, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+              if (!gcry_md_test_algo (GCRY_MD_RMD160))
                 print_hashline( md, GCRY_MD_RMD160, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+              if (!gcry_md_test_algo (GCRY_MD_SHA224))
                 print_hashline (md, GCRY_MD_SHA224, fname);
-              if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+              if (!gcry_md_test_algo (GCRY_MD_SHA256))
                 print_hashline( md, GCRY_MD_SHA256, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+              if (!gcry_md_test_algo (GCRY_MD_SHA384))
                 print_hashline ( md, GCRY_MD_SHA384, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+              if (!gcry_md_test_algo (GCRY_MD_SHA512))
                 print_hashline ( md, GCRY_MD_SHA512, fname );
             }
         }
@@ -4436,18 +4436,18 @@ print_mds( const char *fname, int algo )
             print_hex (md, -algo, fname);
           else
             {
-              if (!openpgp_md_test_algo (GCRY_MD_MD5))
+              if (!gcry_md_test_algo (GCRY_MD_MD5))
                 print_hex (md, GCRY_MD_MD5, fname);
               print_hex (md, GCRY_MD_SHA1, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+              if (!gcry_md_test_algo (GCRY_MD_RMD160))
                 print_hex (md, GCRY_MD_RMD160, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+              if (!gcry_md_test_algo (GCRY_MD_SHA224))
                 print_hex (md, GCRY_MD_SHA224, fname);
-              if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+              if (!gcry_md_test_algo (GCRY_MD_SHA256))
                 print_hex (md, GCRY_MD_SHA256, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+              if (!gcry_md_test_algo (GCRY_MD_SHA384))
                 print_hex (md, GCRY_MD_SHA384, fname );
-              if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+              if (!gcry_md_test_algo (GCRY_MD_SHA512))
                 print_hex (md, GCRY_MD_SHA512, fname );
             }
         }

commit 0af533abd3c1ebd2cf19371fcb8cd2dcc22d355b
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 18 14:50:02 2014 +0200

    gpg: Re-indent a function.
    
    --

diff --git a/g10/gpg.c b/g10/gpg.c
index 8d69da0..b06e392 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4349,102 +4349,113 @@ print_hashline( gcry_md_hd_t md, int algo, const char *fname )
   es_fputs (":\n", es_stdout);
 }
 
+
 static void
 print_mds( const char *fname, int algo )
 {
-    FILE *fp;
-    char buf[1024];
-    size_t n;
-    gcry_md_hd_t md;
+  FILE *fp;
+  char buf[1024];
+  size_t n;
+  gcry_md_hd_t md;
 
-    if( !fname ) {
-	fp = stdin;
+  if (!fname)
+    {
+      fp = stdin;
 #ifdef HAVE_DOSISH_SYSTEM
-	setmode ( fileno(fp) , O_BINARY );
+      setmode ( fileno(fp) , O_BINARY );
 #endif
     }
-    else {
-	fp = fopen( fname, "rb" );
-        if (fp && is_secured_file (fileno (fp)))
-          {
-            fclose (fp);
-            fp = NULL;
-            gpg_err_set_errno (EPERM);
-          }
+  else
+    {
+      fp = fopen (fname, "rb" );
+      if (fp && is_secured_file (fileno (fp)))
+        {
+          fclose (fp);
+          fp = NULL;
+          gpg_err_set_errno (EPERM);
+        }
     }
-    if( !fp ) {
-	log_error("%s: %s\n", fname?fname:"[stdin]", strerror(errno) );
-	return;
+  if (!fp)
+    {
+      log_error("%s: %s\n", fname?fname:"[stdin]", strerror(errno) );
+      return;
     }
 
-    gcry_md_open (&md, 0, 0);
-    if( algo )
-        gcry_md_enable (md, algo);
-    else {
-        if (!openpgp_md_test_algo (GCRY_MD_MD5))
-          gcry_md_enable (md, GCRY_MD_MD5);
-	gcry_md_enable (md, GCRY_MD_SHA1);
-        if (!openpgp_md_test_algo (GCRY_MD_RMD160))
-          gcry_md_enable (md, GCRY_MD_RMD160);
-        if (!openpgp_md_test_algo (GCRY_MD_SHA224))
-          gcry_md_enable (md, GCRY_MD_SHA224);
-        if (!openpgp_md_test_algo (GCRY_MD_SHA256))
-          gcry_md_enable (md, GCRY_MD_SHA256);
-        if (!openpgp_md_test_algo (GCRY_MD_SHA384))
-          gcry_md_enable (md, GCRY_MD_SHA384);
-        if (!openpgp_md_test_algo (GCRY_MD_SHA512))
-          gcry_md_enable (md, GCRY_MD_SHA512);
+  gcry_md_open (&md, 0, 0);
+  if (algo)
+    gcry_md_enable (md, algo);
+  else
+    {
+      if (!openpgp_md_test_algo (GCRY_MD_MD5))
+        gcry_md_enable (md, GCRY_MD_MD5);
+      gcry_md_enable (md, GCRY_MD_SHA1);
+      if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+        gcry_md_enable (md, GCRY_MD_RMD160);
+      if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+        gcry_md_enable (md, GCRY_MD_SHA224);
+      if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+        gcry_md_enable (md, GCRY_MD_SHA256);
+      if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+        gcry_md_enable (md, GCRY_MD_SHA384);
+      if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+        gcry_md_enable (md, GCRY_MD_SHA512);
     }
 
-    while( (n=fread( buf, 1, DIM(buf), fp )) )
-	gcry_md_write (md, buf, n);
-    if( ferror(fp) )
-	log_error("%s: %s\n", fname?fname:"[stdin]", strerror(errno) );
-    else {
-	gcry_md_final (md);
-        if ( opt.with_colons ) {
-            if ( algo )
-                print_hashline( md, algo, fname );
-            else {
-                if (!openpgp_md_test_algo (GCRY_MD_MD5))
-                    print_hashline( md, GCRY_MD_MD5, fname );
-                print_hashline( md, GCRY_MD_SHA1, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_RMD160))
-                    print_hashline( md, GCRY_MD_RMD160, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA224))
-                    print_hashline (md, GCRY_MD_SHA224, fname);
-                if (!openpgp_md_test_algo (GCRY_MD_SHA256))
-                    print_hashline( md, GCRY_MD_SHA256, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA384))
-                    print_hashline ( md, GCRY_MD_SHA384, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA512))
-                    print_hashline ( md, GCRY_MD_SHA512, fname );
+  while ((n=fread (buf, 1, DIM(buf), fp)))
+    gcry_md_write (md, buf, n);
+
+  if (ferror(fp))
+    log_error ("%s: %s\n", fname?fname:"[stdin]", strerror(errno));
+  else
+    {
+      gcry_md_final (md);
+      if (opt.with_colons)
+        {
+          if ( algo )
+            print_hashline (md, algo, fname);
+          else
+            {
+              if (!openpgp_md_test_algo (GCRY_MD_MD5))
+                print_hashline( md, GCRY_MD_MD5, fname );
+              print_hashline( md, GCRY_MD_SHA1, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+                print_hashline( md, GCRY_MD_RMD160, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+                print_hashline (md, GCRY_MD_SHA224, fname);
+              if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+                print_hashline( md, GCRY_MD_SHA256, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+                print_hashline ( md, GCRY_MD_SHA384, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+                print_hashline ( md, GCRY_MD_SHA512, fname );
             }
         }
-        else {
-            if( algo )
-	        print_hex(md,-algo,fname);
-            else {
-                if (!openpgp_md_test_algo (GCRY_MD_MD5))
-                    print_hex( md, GCRY_MD_MD5, fname );
-                print_hex( md, GCRY_MD_SHA1, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_RMD160))
-                    print_hex( md, GCRY_MD_RMD160, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA224))
-                    print_hex (md, GCRY_MD_SHA224, fname);
-                if (!openpgp_md_test_algo (GCRY_MD_SHA256))
-                    print_hex( md, GCRY_MD_SHA256, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA384))
-                    print_hex( md, GCRY_MD_SHA384, fname );
-                if (!openpgp_md_test_algo (GCRY_MD_SHA512))
-                    print_hex( md, GCRY_MD_SHA512, fname );
+      else
+        {
+          if (algo)
+            print_hex (md, -algo, fname);
+          else
+            {
+              if (!openpgp_md_test_algo (GCRY_MD_MD5))
+                print_hex (md, GCRY_MD_MD5, fname);
+              print_hex (md, GCRY_MD_SHA1, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+                print_hex (md, GCRY_MD_RMD160, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+                print_hex (md, GCRY_MD_SHA224, fname);
+              if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+                print_hex (md, GCRY_MD_SHA256, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+                print_hex (md, GCRY_MD_SHA384, fname );
+              if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+                print_hex (md, GCRY_MD_SHA512, fname );
             }
         }
     }
-    gcry_md_close(md);
+  gcry_md_close (md);
 
-    if( fp != stdin )
-	fclose(fp);
+  if (fp != stdin)
+    fclose (fp);
 }
 
 

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

Summary of changes:
 AUTHORS                 |    2 +
 Makefile.am             |   22 ++++++-
 NEWS                    |   20 ++++++
 README                  |    9 +++
 agent/call-pinentry.c   |    4 +-
 agent/command-ssh.c     |    2 -
 agent/pksign.c          |    4 +-
 autogen.rc              |    2 +-
 common/Makefile.am      |    8 +++
 common/exechelp-posix.c |    9 ---
 common/sexputil.c       |    6 +-
 common/t-http.c         |    2 +-
 configure.ac            |    2 +-
 g10/gpg.c               |  167 +++++++++++++++++++++++++----------------------
 g10/parse-packet.c      |    9 ++-
 g13/call-gpg.c          |   12 ++--
 scd/app-p15.c           |   12 ++--
 sm/certreqgen-ui.c      |    3 +-
 sm/certreqgen.c         |    2 +-
 19 files changed, 178 insertions(+), 119 deletions(-)


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




More information about the Gnupg-commits mailing list