[git] GPGME - branch, master, updated. gpgme-1.3.1-27-g9c8608f

by Werner Koch cvs at cvs.gnupg.org
Wed May 2 12:36:01 CEST 2012


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 "GnuPG Made Easy".

The branch, master has been updated
       via  9c8608f702ec0f44ae55cd7f33bd8df0a2d48508 (commit)
       via  295dd3f238fa656493d34e8a718958d62226b56c (commit)
       via  475640a52742b333d7c3c8235ee945ba42197883 (commit)
       via  d6402b888fd00b883bbfc00c91a2aa9706e4377e (commit)
      from  1a21574b48ee91eedbf95251ee600648b377d1e7 (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 9c8608f702ec0f44ae55cd7f33bd8df0a2d48508
Author: Werner Koch <wk at gnupg.org>
Date:   Wed May 2 10:58:52 2012 +0200

    Release 1.3.2.
    
    * configure.ac: Bump LT version to C19/A8/R1.
    
    * configure.ac (GITLOG_TO_CHANGELOG): Define.
    * Makefile.am (gen-ChangeLog): Use it.

diff --git a/Makefile.am b/Makefile.am
index 1ab445d..18a8e38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,7 +50,7 @@ gen_start_date = 2011-12-01T00:00:00
 gen-ChangeLog:
 	if test -d $(top_srcdir)/.git; then				\
 	  (cd $(top_srcdir) &&                      			\
-	    ./build-aux/gitlog-to-changelog				\
+	    $(GITLOG_TO_CHANGELOG) --append-dot --tear-off		\
 	    --amend=build-aux/git-log-fix				\
 	    --since=$(gen_start_date) ) > $(distdir)/cl-t;		\
           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
diff --git a/NEWS b/NEWS
index b7106e7..a7eeea8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Noteworthy changes in version 1.3.2 (unreleased)
+Noteworthy changes in version 1.3.2 (2012-05-02)
 ------------------------------------------------
 
  * Remove support for libgpgme-pth.  As far as we know, this was never used,
diff --git a/README b/README
index f4d806d..7c97791 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
                   GPGME - GnuPG Made Easy
                 ---------------------------
 
-               Copyright 2004, 2006, 2010 g10 Code GmbH
+            Copyright 2004, 2006, 2010, 2012 g10 Code GmbH
 
 This file is free software; as a special exception the author gives
 unlimited permission to copy and/or distribute it, with or without
@@ -40,32 +40,23 @@ See the file INSTALL for generic installation instructions.
 Check that you have unmodified sources.  See below on how to do this.
 Don't skip it - this is an important step!
 
-To build GPGME, you need to install libgpg-error.  You need at least
-libgpg-error 1.8.
+To build GPGME, you need to install libgpg-error (>= 1.8) and
+Libassuan (>= 2.0.2).
 
 For support of the OpenPGP protocol (default), you should use the
-latest version of GnuPG 1.2 or 1.4, available at:
+latest version of GnuPG (>= 1.4) , available at:
 ftp://ftp.gnupg.org/gcrypt/gnupg/
-
-You need at least GnuPG 1.2.2.
+For support of the CMS (Cryptographic Message Syntax) protocol, you
+need a GnuPG version >= 2.0.
 
 If configure can't find the `gpg' binary in your path, you can specify
 the location with the --with-gpg=/path/to/gpg argument to configure.
 
-For support of the CMS (Cryptographic Message Syntax) protocol, you
-need the latest CVS version of GnuPG 1.9, which is available in the
-GnuPG repository:
-http://www.gnupg.org/download/cvs_access.html
-Use the tag `GNUPG-1-9-BRANCH'.  There are also snapshots available at:
-ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/
-
-You need at least GpgSM 1.9.6.
-
 If configure can't find the `gpgsm' binary in your path, you can
 specify the location with the --with-gpgsm=/path/to/gpgsm argument to
 configure.
 
-For building the CVS version of GPGME please see the file README.CVS
+For building the GIT version of GPGME please see the file README.GIT
 for more information.
 
 
@@ -120,4 +111,3 @@ in the tests/gpg/ directory may also prove useful.
 
 Please subscribe to the gnupg-devel at gnupg.org mailing list if you want
 to do serious work.
-
diff --git a/README.SVN b/README.GIT
similarity index 84%
rename from README.SVN
rename to README.GIT
index c642282..ee2c638 100644
--- a/README.SVN
+++ b/README.GIT
@@ -1,11 +1,11 @@
-If you are building from Subversion, run the script
+If you are building from GIT, run the script
 
 ./autogen.sh
 
 first, to make sure that you have all the necessary maintainer tools
 are installed and to build the actual configuration files.  If you
-have just updated from SVN, you should add the option "--force" to
-autogen.sh so that meta data from SVN is noticed.  Then run
+have just checked out from GIT, you should add the option "--force" to
+autogen.sh so that meta data is noticed by autom4te.cache.  Then run
 
 ./configure --enable-maintainer-mode
 
@@ -16,7 +16,7 @@ tools, or the tools are not installed, you may use environment
 variables to override the default tool names:
 
  AUTOMAKE_SUFFIX  is used as a suffix for all tools from the automake
-                  package.  For example 
+                  package.  For example
                      AUTOMAKE_SUFFIX="-1.7" ./autogen.sh
                   uses "automake-1.7" and "aclocal-1.7.
  AUTOMAKE_PREFIX  is used as a prefix for all tools from the automake
@@ -37,15 +37,13 @@ It is also possible to use the variable name AUTOMAKE, AUTOCONF,
 ACLOCAL, AUTOHEADER, GETTEXT and MSGMERGE to directly specify the name
 of the programs to run.  It is however better to use the suffix and
 prefix forms as described above because that does not require
-knowledge about the actual tools used by autgen.sh.
+knowledge about the actual tools used by autogen.sh.
 
 
 Please don't use autopoint, libtoolize or autoreconf unless you are
 the current maintainer and want to update the standard configuration
-files.  All those files should be in the SVN and only updated manually
+files.  All those files should be in GIT and only updated manually
 if the maintainer decides that newer versions are required.  The
 maintainer should also make sure that the required version of automake
 et al. are properly indicated at the top of configure.ac and take care
 to copy the files and not merely use symlinks.
-
-
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 40a8035..5cf071f 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2011-11-02 07:53'; # UTC
+my $VERSION = '2012-01-24 15:58 (wk)'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@ my $VERSION = '2011-11-02 07:53'; # UTC
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Written by Jim Meyering
+# Custom bugs bred by Werner Koch
 
 use strict;
 use warnings;
@@ -64,6 +65,8 @@ OPTIONS:
                   makes a change to SHA1's commit log text or metadata.
    --append-dot append a dot to the first line of each commit message if
                   there is no other punctuation or blank at the end.
+   --tear-off   tear off all commit log lines after a '--' line and
+                skip log entry with the first body line being '--'.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
    --format=FMT set format string for commit subject and body;
@@ -175,6 +178,7 @@ sub parse_amend_file($)
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
+  my $tear_off = 0;
   GetOptions
     (
      help => sub { usage 0 },
@@ -183,6 +187,7 @@ sub parse_amend_file($)
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
+     'tear-off' => \$tear_off,
     ) or usage 1;
 
 
@@ -201,6 +206,7 @@ sub parse_amend_file($)
 
   my $prev_date_line = '';
   my @prev_coauthors = ();
+
   while (1)
     {
       defined (my $in = <PIPE>)
@@ -214,6 +220,17 @@ sub parse_amend_file($)
       $n_read == $log_nbytes
         or die "$ME:$.: unexpected EOF\n";
 
+      # Skip log entries with the default merge commit message.
+      $log =~ /^.*\n\nMerge branch '.*\n\s*/
+        and goto SKIPCOMMIT;
+
+      # Skip log entries if the body starts with a tear off marker.
+      if ($tear_off)
+        {
+          $log =~ /^.*\n\n.*\n--\s*/
+            and goto SKIPCOMMIT;
+        }
+
       # Extract leading hash.
       my ($sha, $rest) = split ':', $log, 2;
       defined $sha
@@ -281,6 +298,18 @@ sub parse_amend_file($)
       @line = grep !/^Signed-off-by: .*>$/, @line;
       @line = grep !/^Co-authored-by: /, @line;
 
+      # Remove everything after a line with 2 dashes at the beginning.
+      if ($tear_off)
+        {
+           my @tmpline;
+           foreach (@line)
+             {
+	       last if /^--\s*$/;
+               push @tmpline,$_;
+             }
+           @line = @tmpline;
+        }
+
       # Remove leading and trailing blank lines.
       if (@line)
         {
@@ -313,6 +342,7 @@ sub parse_amend_file($)
           print "\n", join ("\n", @line), "\n";
         }
 
+    SKIPCOMMIT:
       defined ($in = <PIPE>)
         or last;
       $in ne "\n"
@@ -339,7 +369,7 @@ sub parse_amend_file($)
 # indent-tabs-mode: nil
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "my $VERSION = '"
-# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+# time-stamp-format: "%:y-%02m-%02d %02H:%02M (wk)"
 # time-stamp-time-zone: "UTC"
 # time-stamp-end: "'; # UTC"
 # End:
diff --git a/configure.ac b/configure.ac
index 6e0967c..bc57bbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # configure.ac for GPGME
 # Copyright (C) 2000 Werner Koch (dd9jn)
 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-#               2009, 2010, 2011  g10 Code GmbH
+#               2009, 2010, 2011, 2012  g10 Code GmbH
 #
 # This file is part of GPGME.
 #
@@ -15,9 +15,8 @@
 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
 # Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 # (Process this file with autoconf to produce a configure script.)
 AC_PREREQ(2.59)
@@ -29,19 +28,19 @@ min_automake_version="1.11"
 #                 Never do a binary build with the same version number
 #                 in another year; this would mess up the build number.
 #
-# The SVN version is usually the next intended release version with
-# the string "-svnNNN" appended.  The reason for this is that tests for a
-# specific feature can already be done under the assumption that the
-# SVN version is the most recent one in a branch.  To disable the SVN
-# version for the real release, set the my_issvn macro to no.
-m4_define(my_version, [1.3.1])
-m4_define(my_issvn, [yes])
+# The GIT version is usually the next intended release version with
+# the string "-gitNNNNNN" appended.  The reason for this is that tests
+# for a specific feature can already be done under the assumption that
+# the GIT version is the most recent one in a branch.  To disable the
+# GIT version for the real release, set the my_isgit macro to no.
+m4_define(my_version, [1.3.2])
+m4_define(my_isgit, [no])
 
 m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \
             || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
 m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
           | awk '/^\* / {printf "%s",$3}']))
-m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes],
+m4_define([my_full_version], [my_version[]m4_if(my_isgit,[yes],
           [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])
 
 AC_INIT([gpgme],[my_full_version],[http://bugs.gnupg.org])
@@ -56,7 +55,7 @@ LIBGPGME_LT_CURRENT=19
 # Subtract 2 from this value if you want to make the LFS transition an
 # ABI break.  [Note to self: Remove this comment with the next regular break.]
 LIBGPGME_LT_AGE=8
-LIBGPGME_LT_REVISION=0
+LIBGPGME_LT_REVISION=1
 
 # If the API is changed in an incompatible way: increment the next counter.
 GPGME_CONFIG_API_VERSION=1
@@ -92,6 +91,8 @@ AH_VERBATIM([_REENTRANT],
 
 AC_PROG_CC
 AC_PROG_CXX
+AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
+               [build-aux/gitlog-to-changelog])
 
 AC_SUBST(LIBGPGME_LT_CURRENT)
 AC_SUBST(LIBGPGME_LT_AGE)
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index dad8d94..7263d98 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -1,7 +1,7 @@
 /* gpgme.h - Public interface to GnuPG Made Easy.                   -*- c -*-
    Copyright (C) 2000 Werner Koch (dd9jn)
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009
-                 2010 g10 Code GmbH
+                 2010, 2011, 2012 g10 Code GmbH
 
    This file is part of GPGME.
 

commit 295dd3f238fa656493d34e8a718958d62226b56c
Author: Werner Koch <wk at gnupg.org>
Date:   Wed May 2 10:43:22 2012 +0200

    Remove unused pth stuff from gpgme-config.
    
    * src/gpgme-config.in: Remove unused pth stuff.

diff --git a/src/gpgme-config.in b/src/gpgme-config.in
index db8c7ef..4be1e08 100644
--- a/src/gpgme-config.in
+++ b/src/gpgme-config.in
@@ -32,10 +32,6 @@ gpg_error_libs="@GPG_ERROR_LIBS@"
 # Configure thread packages.
 thread_modules=""
 
- at HAVE_PTH_TRUE@thread_modules="$thread_modules pth"
-libs_pth="@PTH_LDFLAGS@ @PTH_LIBS@"
-cflags_pth="@PTH_CFLAGS@"
-
 @HAVE_PTHREAD_TRUE at thread_modules="$thread_modules pthread"
 libs_pthread="-lpthread"
 cflags_pthread=""
@@ -114,7 +110,6 @@ while test $# -gt 0; do
             tmp_g=
 	    case "$thread_module" in
 	        pthread) tmp_c="$cflags_pthread" ;;
-	        pth)     tmp_c="$cflags_pth"     ;;
 	    esac
 	    test "x$with_glib" = "xyes" && tmp_g="$cflags_glib"
             for i in $cflags $tmp_c $assuan_cflags $gpg_error_cflags $tmp_g ; do
@@ -143,7 +138,6 @@ while test $# -gt 0; do
             tmp_x=
 	    case "$thread_module" in
 	        pthread) tmp_l="-lgpgme-pthread"; tmp_x="$libs_pthread" ;;
-	        pth)     tmp_l="-lgpgme-pth";     tmp_x="$libs_pth"  ;;
 		*)
 		    if test "x$with_glib" = "xyes" ; then
 		         tmp_l="-lgpgme-glib"

commit 475640a52742b333d7c3c8235ee945ba42197883
Author: Werner Koch <wk at gnupg.org>
Date:   Wed May 2 10:35:47 2012 +0200

    Fix minor documentation problem.
    
    --
    Fixes bug#1404.
    (There is mentioned data field “recipient”, but actual data field
    name is “recipients”.)

diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 72b9e22..61cdb37 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -41,7 +41,7 @@ General Public License for more details.
 @end macro
 
 
- at c 
+ at c
 @c  T I T L E  P A G E
 @c
 @ifinfo
@@ -153,7 +153,7 @@ Error Handling
 * Error Sources::                 A list of important error sources.
 * Error Strings::                 How to get a descriptive string from a value.
 
-Exchanging Data 
+Exchanging Data
 
 * Creating Data Buffers::         Creating new data buffers.
 * Destroying Data Buffers::       Releasing data buffers.
@@ -1543,7 +1543,7 @@ Memory based data objects store all data in allocated memory.  This is
 convenient, but only practical for an amount of data that is a
 fraction of the available physical memory.  The data has to be copied
 from its source and to its destination, which can often be avoided by
-using one of the other data object 
+using one of the other data object
 
 @deftypefun gpgme_error_t gpgme_data_new (@w{gpgme_data_t *@var{dh}})
 The function @code{gpgme_data_new} creates a new @code{gpgme_data_t}
@@ -1987,7 +1987,7 @@ the data object with the handle @var{dh} to @var{enc}.
 
 @c
 @c    Chapter Contexts
- at c 
+ at c
 @node Contexts
 @chapter Contexts
 @cindex context
@@ -2726,7 +2726,7 @@ issuer name.
 @item char *chain_id
 If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the
 chain ID, which can be used to built the certificate chain.
- 
+
 @item gpgme_validity_t owner_trust
 If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the
 owner trust.
@@ -3513,7 +3513,7 @@ are reported by the crypto engine support routines.
 @cindex key ring, import to
 
 Importing keys means the same as running @command{gpg} with the command
- at option{--import}. 
+ at option{--import}.
 
 
 @deftypefun gpgme_error_t gpgme_op_import (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{keydata}})
@@ -4101,7 +4101,7 @@ algorithm that is not supported.
 @item unsigned int wrong_key_usage : 1
 This is true if the key was not used according to its policy.
 
- at item gpgme_recipient_t recipient
+ at item gpgme_recipient_t recipients
 This is a linked list of recipients to which this message was encrypted.
 
 @item char *file_name
@@ -4265,16 +4265,16 @@ The defined bits are:
   Can't verify due to a missing key or certificate.
 
   @item GPGME_SIGSUM_CRL_MISSING
-  The CRL (or an equivalent mechanism) is not available. 
+  The CRL (or an equivalent mechanism) is not available.
 
   @item GPGME_SIGSUM_CRL_TOO_OLD
   Available CRL is too old.
 
   @item GPGME_SIGSUM_BAD_POLICY
-  A policy requirement was not met. 
+  A policy requirement was not met.
 
   @item GPGME_SIGSUM_SYS_ERROR
-  A system error occured. 
+  A system error occured.
   @end table
 
 @item char *fpr
@@ -4339,7 +4339,7 @@ Values are:
   @item 0
         No PKA information available or verification not possible.
   @item 1
-        PKA verification failed. 
+        PKA verification failed.
   @item 2
         PKA verification succeeded.
   @item 3
@@ -4459,7 +4459,7 @@ have a different status.  You can get each key's status with
 
 @deftypefun {const char *} gpgme_get_sig_status (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_sig_stat_t *@var{r_stat}}, @w{time_t *@var{r_created}})
 The function @code{gpgme_get_sig_status} is equivalent to:
- 
+
 @example
   gpgme_verify_result_t result;
   gpgme_signature_t sig;
@@ -4482,27 +4482,27 @@ The function @code{gpgme_get_sig_status} is equivalent to:
 	case GPG_ERR_NO_ERROR:
 	  *r_stat = GPGME_SIG_STAT_GOOD;
 	  break;
-	  
+
 	case GPG_ERR_BAD_SIGNATURE:
 	  *r_stat = GPGME_SIG_STAT_BAD;
 	  break;
-	  
+
 	case GPG_ERR_NO_PUBKEY:
 	  *r_stat = GPGME_SIG_STAT_NOKEY;
 	  break;
-	  
+
 	case GPG_ERR_NO_DATA:
 	  *r_stat = GPGME_SIG_STAT_NOSIG;
 	  break;
-	  
+
 	case GPG_ERR_SIG_EXPIRED:
 	  *r_stat = GPGME_SIG_STAT_GOOD_EXP;
 	  break;
-	  
+
 	case GPG_ERR_KEY_EXPIRED:
 	  *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY;
 	  break;
-	  
+
 	default:
 	  *r_stat = GPGME_SIG_STAT_ERROR;
 	  break;
@@ -4516,7 +4516,7 @@ The function @code{gpgme_get_sig_status} is equivalent to:
 
 @deftypefun {const char *} gpgme_get_sig_string_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{what}}, @w{int @var{whatidx}})
 The function @code{gpgme_get_sig_string_attr} is equivalent to:
- 
+
 @example
   gpgme_verify_result_t result;
   gpgme_signature_t sig;
@@ -4552,7 +4552,7 @@ The function @code{gpgme_get_sig_string_attr} is equivalent to:
 
 @deftypefun {const char *} gpgme_get_sig_ulong_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{waht}}, @w{int @var{whatidx}})
 The function @code{gpgme_get_sig_ulong_attr} is equivalent to:
- 
+
 @example
   gpgme_verify_result_t result;
   gpgme_signature_t sig;
@@ -4584,22 +4584,22 @@ The function @code{gpgme_get_sig_ulong_attr} is equivalent to:
 	@{
 	case GPG_ERR_NO_ERROR:
 	  return GPGME_SIG_STAT_GOOD;
-	  
+
 	case GPG_ERR_BAD_SIGNATURE:
 	  return GPGME_SIG_STAT_BAD;
-	  
+
 	case GPG_ERR_NO_PUBKEY:
 	  return GPGME_SIG_STAT_NOKEY;
-	  
+
 	case GPG_ERR_NO_DATA:
 	  return GPGME_SIG_STAT_NOSIG;
-	  
+
 	case GPG_ERR_SIG_EXPIRED:
 	  return GPGME_SIG_STAT_GOOD_EXP;
-	  
+
 	case GPG_ERR_KEY_EXPIRED:
 	  return GPGME_SIG_STAT_GOOD_EXPKEY;
-	  
+
 	default:
 	  return GPGME_SIG_STAT_ERROR;
 	@}
@@ -5671,7 +5671,7 @@ struct IOCB @{
 class MyApp : public QApplication @{
 
   // ...
-  
+
   static void registerGpgmeIOCallback( void * data, int fd, int dir,
                                        GpgmeIOCb func, void * func_data,
                                        void ** tag ) @{

commit d6402b888fd00b883bbfc00c91a2aa9706e4377e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed May 2 10:30:09 2012 +0200

    Update signature summary for the case of missing X.509 keys.
    
    * src/verify.c (gpgme_op_verify_result): Update summary field.
    --
    
    This is actually a hack to solve the problem that GPGME currently does
    not emit ERRSIG for a missing public key.

diff --git a/NEWS b/NEWS
index 3dad99b..b7106e7 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ Noteworthy changes in version 1.3.2 (unreleased)
  * Remove support for libgpgme-pth.  As far as we know, this was never used,
    and GnuPG is going to use our own npth in the future.
 
+ * Fix signature summary information for a missing X.509 key.
+
+ * Fix parsing of dates >= year 2038.
+
 
 Noteworthy changes in version 1.3.1 (2011-06-16)
 ------------------------------------------------
@@ -120,7 +124,7 @@ Noteworthy changes in version 1.1.7 (2008-10-17)
  * Using GPGME_KEYLIST_MODE_LOCAL combined with
    GPGME_KEYLIST_MODE_EXTERN is now supported; it uses the
    --locate-keys feature of gpg (>= 2.0.10).
-   
+
  * The encoding of gpgme_data_t objects can affect the output encoding
    of export, sign and encrypt operations now (the same operations
    that are also affected by the ASCII mode switch).  We believe this
@@ -764,7 +768,7 @@ Noteworthy changes in version 0.4.1 (2003-06-06)
    So, instead:
 
    char *fpr;
-   err = gpgme_op_genkey (ctx, NULL, NULL, &fpr); 
+   err = gpgme_op_genkey (ctx, NULL, NULL, &fpr);
    if (!err && fpr)
      printf ("%s\n", fpr);
 
@@ -1052,7 +1056,7 @@ Noteworthy changes in version 0.3.13 (2002-11-20)
 Noteworthy changes in version 0.3.12 (2002-10-15)
 -------------------------------------------------
 
- * Fixed some bux with key listings.  
+ * Fixed some bux with key listings.
 
  * The development has been branched to clean up some API issues.
    This 0.3 series will be kept for compatibility reasons; so do don't
@@ -1060,7 +1064,7 @@ Noteworthy changes in version 0.3.12 (2002-10-15)
 
 Noteworthy changes in version 0.3.11 (2002-09-20)
 -------------------------------------------------
-        
+
  * Bug fixes.
 
 Noteworthy changes in version 0.3.10 (2002-09-02)
@@ -1266,7 +1270,7 @@ gpgme_register_idle             NEW
 
 Noteworthy changes in version 0.3.0 (2001-12-19)
 ------------------------------------------------
- 
+
  * New interface gpgme_set_protocol() to set the protocol and thus the
    crypto engine to be used by the context.  Currently, the OpenPGP
    and the CMS protocols are supported.  They are specified by the new
@@ -1336,7 +1340,7 @@ Noteworthy changes in version 0.2.3 (2001-09-17)
 
 Noteworthy changes in version 0.2.2 (2001-06-12)
 ------------------------------------------------
- 
+
  * Implemented a key cache.
 
  * Fixed a race condition under W32 and some other bug fixes.
diff --git a/src/verify.c b/src/verify.c
index d63fc54..a61cc95 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -83,6 +83,7 @@ gpgme_op_verify_result (gpgme_ctx_t ctx)
   void *hook;
   op_data_t opd;
   gpgme_error_t err;
+  gpgme_signature_t sig;
 
   TRACE_BEG (DEBUG_CTX, "gpgme_op_verify_result", ctx);
   err = _gpgme_op_data_lookup (ctx, OPDATA_VERIFY, &hook, -1, NULL);
@@ -93,12 +94,37 @@ gpgme_op_verify_result (gpgme_ctx_t ctx)
       return NULL;
     }
 
+  /* It is possible that we saw a new signature only followed by an
+     ERROR line for that.  In particular a missing X.509 key triggers
+     this.  In this case it is surprising that the summary field has
+     not been updated.  We fix it here by explicitly looking for this
+     case.  The real fix would be to have GPGME emit ERRSIG.  */
+  for (sig = opd->result.signatures; sig; sig = sig->next)
+    {
+      if (!sig->summary)
+        {
+          switch (gpg_err_code (sig->status))
+            {
+            case GPG_ERR_KEY_EXPIRED:
+              sig->summary |= GPGME_SIGSUM_KEY_EXPIRED;
+              break;
+
+            case GPG_ERR_NO_PUBKEY:
+              sig->summary |= GPGME_SIGSUM_KEY_MISSING;
+              break;
+
+            default:
+              break;
+            }
+        }
+    }
+
+  /* Now for some tracing stuff. */
   if (_gpgme_debug_trace ())
     {
-      gpgme_signature_t sig = opd->result.signatures;
-      int i = 0;
+      int i;
 
-      while (sig)
+      for (sig = opd->result.signatures, i = 0; sig; sig = sig->next, i++)
 	{
 	  TRACE_LOG4 ("sig[%i] = fpr %s, summary 0x%x, status %s",
 		      i, sig->fpr, sig->summary, gpg_strerror (sig->status));
@@ -120,8 +146,6 @@ gpgme_op_verify_result (gpgme_ctx_t ctx)
 	    {
 	      TRACE_LOG1 ("sig[%i] = has notations (not shown)", i);
 	    }
-	  sig = sig->next;
-	  i++;
 	}
     }
 

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

Summary of changes:
 Makefile.am                   |    2 +-
 NEWS                          |   18 ++++++++-----
 README                        |   24 +++++-------------
 README.SVN => README.GIT      |   14 ++++------
 build-aux/gitlog-to-changelog |   36 +++++++++++++++++++++++++--
 configure.ac                  |   27 ++++++++++----------
 doc/gpgme.texi                |   54 ++++++++++++++++++++--------------------
 src/gpgme-config.in           |    6 ----
 src/gpgme.h.in                |    2 +-
 src/verify.c                  |   34 ++++++++++++++++++++++----
 10 files changed, 129 insertions(+), 88 deletions(-)
 rename README.SVN => README.GIT (84%)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list