Hello community, here is the log from the commit of package gpgme for openSUSE:Factory checked in at 2015-06-12 20:29:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gpgme (Old) and /work/SRC/openSUSE:Factory/.gpgme.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gpgme" Changes: -------- --- /work/SRC/openSUSE:Factory/gpgme/gpgme.changes 2015-04-22 01:14:33.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gpgme.new/gpgme.changes 2015-06-12 20:29:04.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Jun 8 13:39:26 UTC 2015 - [email protected] + +- gpgme 1.5.5: + * Fixed crash in key listings for user ids with a backslash. + * Fixed regression for GPGSM use with GnuPG < 2.1. + * Properly set signature summary for revoked OpenPGP keys. + +------------------------------------------------------------------- Old: ---- gpgme-1.5.4.tar.bz2 gpgme-1.5.4.tar.bz2.sig New: ---- gpgme-1.5.5.tar.bz2 gpgme-1.5.5.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gpgme.spec ++++++ --- /var/tmp/diff_new_pack.2ODV6E/_old 2015-06-12 20:29:05.000000000 +0200 +++ /var/tmp/diff_new_pack.2ODV6E/_new 2015-06-12 20:29:05.000000000 +0200 @@ -17,7 +17,7 @@ Name: gpgme -Version: 1.5.4 +Version: 1.5.5 Release: 0 Summary: A Library Designed to Give Applications Easy Access to GnuPG License: LGPL-2.1+ and GPL-3.0+ ++++++ gpgme-1.5.4.tar.bz2 -> gpgme-1.5.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/AUTHORS new/gpgme-1.5.5/AUTHORS --- old/gpgme-1.5.4/AUTHORS 2014-09-24 15:23:39.000000000 +0200 +++ new/gpgme-1.5.5/AUTHORS 2015-06-08 14:57:52.000000000 +0200 @@ -3,7 +3,7 @@ Download: ftp://ftp.gnupg.org/gcrypt/gpgme/ Repository: git://git.gnupg.org/gpgme.git Maintainer: Werner Koch <[email protected]> -Bug reports: http://bugs.gnupg.org (use category "gpgme") +Bug reports: https://bugs.gnupg.org (use category "gpgme") Security related bug reports: [email protected] License (software): LGPLv2.1+ License (manual+tools): GPLv3+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/ChangeLog new/gpgme-1.5.5/ChangeLog --- old/gpgme-1.5.4/ChangeLog 2015-04-13 15:46:40.000000000 +0200 +++ new/gpgme-1.5.5/ChangeLog 2015-06-08 15:04:14.000000000 +0200 @@ -1,3 +1,45 @@ +2015-06-08 Werner Koch <[email protected]> + + Release 1.5.5. + + Fix regression with gpgsm 2.0 due to "OPTION with-secret". + * src/engine-gpgsm.c (gpgsm_assuan_simple_command): Do not terminate + on a status lines. + + tests: Add option --secret to run-keylist. + + Fix compiler warnings about unused value in TRACE macros. + * src/debug.h: Change macros to not have a literal 0 as last + expression of the comma operator. + * src/debug.c (_gpgme_debug_frame_end): Return 0. + (_gpgme_debug): Return 0. + + Fix test suite for GnuPG 2.1 which uses pubring.kbx. + * tests/gpgsm/final.test: New. + * tests/gpgsm/initial.test: New. + * tests/gpg/start-stop-agent: Move to ../. + * tests/gpgsm/Makefile.am (TESTS_ENVIRONMENT): Export top_srcdir. + (TESTS): Add intial.test and final.test. + (AM_LDFLAGS): Add -no-install. + (clean-local): Use start-stop-agent + (initial.test): Add dependency. + * tests/gpg/Makefile.am (top_srcdir): Export top_srcdir. + (AM_LDFLAGS): Add -no-install. + (check-local): Depend on pubring-stamp instead of pubring.gpg. + (initial.test): Depend on check-local. + (./pubring-gpg): Replace by rule for ./pubring-stamp. + +2015-06-05 Matthew Barnes <[email protected]> + + Set GPGME_SIGSUM_KEY_REVOKED also for gpg. + * src/verify.c (calc_sig_summary): Handle GPG_ERR_CERT_REVOKED. + +2015-06-05 Werner Koch <[email protected]> + + Fix segv for userids with a backslash. + * src/engine-gpg.c (gpg_keylist_preprocess): Increment SRC for a + backslash. + 2015-04-13 Werner Koch <[email protected]> Release 1.5.4. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/NEWS new/gpgme-1.5.5/NEWS --- old/gpgme-1.5.4/NEWS 2015-04-13 15:39:11.000000000 +0200 +++ new/gpgme-1.5.5/NEWS 2015-06-08 14:57:22.000000000 +0200 @@ -1,3 +1,13 @@ +Noteworthy changes in version 1.5.5 (2015-06-08) [C24/A13/R4] +------------------------------------------------ + + * Fixed crash in key listings for user ids with a backslash. + + * Fixed regression for GPGSM use with GnuPG < 2.1. + + * Properly set signature summary for revoked OpenPGP keys. + + Noteworthy changes in version 1.5.4 (2015-04-13) [C24/A13/R3] ------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/VERSION new/gpgme-1.5.5/VERSION --- old/gpgme-1.5.4/VERSION 2015-04-13 15:46:40.000000000 +0200 +++ new/gpgme-1.5.5/VERSION 2015-06-08 15:04:14.000000000 +0200 @@ -1 +1 @@ -1.5.4 +1.5.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/configure new/gpgme-1.5.5/configure --- old/gpgme-1.5.4/configure 2015-04-13 15:45:35.000000000 +0200 +++ new/gpgme-1.5.5/configure 2015-06-08 15:03:51.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gpgme 1.5.4. +# Generated by GNU Autoconf 2.69 for gpgme 1.5.5. # # Report bugs to <http://bugs.gnupg.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='gpgme' PACKAGE_TARNAME='gpgme' -PACKAGE_VERSION='1.5.4' -PACKAGE_STRING='gpgme 1.5.4' +PACKAGE_VERSION='1.5.5' +PACKAGE_STRING='gpgme 1.5.5' PACKAGE_BUGREPORT='http://bugs.gnupg.org' PACKAGE_URL='' @@ -1409,7 +1409,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gpgme 1.5.4 to adapt to many kinds of systems. +\`configure' configures gpgme 1.5.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1479,7 +1479,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.5.4:";; + short | recursive ) echo "Configuration of gpgme 1.5.5:";; esac cat <<\_ACEOF @@ -1607,7 +1607,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.5.4 +gpgme configure 1.5.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2437,7 +2437,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gpgme $as_me 1.5.4, which was +It was created by gpgme $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2804,7 +2804,7 @@ # 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=13 -LIBGPGME_LT_REVISION=3 +LIBGPGME_LT_REVISION=4 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -3337,7 +3337,7 @@ # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.5.4' + VERSION='1.5.5' cat >>confdefs.h <<_ACEOF @@ -6241,7 +6241,7 @@ #define VERSION "$VERSION" _ACEOF -VERSION_NUMBER=0x010504 +VERSION_NUMBER=0x010505 # Don't default to build static libs. @@ -17585,7 +17585,7 @@ # # Provide information about the build. # -BUILD_REVISION="d2712d9" +BUILD_REVISION="052a9e3" cat >>confdefs.h <<_ACEOF @@ -17594,7 +17594,7 @@ BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}53873" +BUILD_FILEVERSION="${BUILD_FILEVERSION}1322" BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` @@ -19843,7 +19843,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gpgme $as_me 1.5.4, which was +This file was extended by gpgme $as_me 1.5.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19909,7 +19909,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gpgme config.status 1.5.4 +gpgme config.status 1.5.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22201,7 +22201,7 @@ echo " GPGME v${VERSION} has been configured as follows: - Revision: d2712d9 (53873) + Revision: 052a9e3 (1322) Platform: $host UI Server: $uiserver diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/configure.ac new/gpgme-1.5.5/configure.ac --- old/gpgme-1.5.4/configure.ac 2015-04-13 15:41:23.000000000 +0200 +++ new/gpgme-1.5.5/configure.ac 2015-06-08 15:02:48.000000000 +0200 @@ -29,7 +29,7 @@ # for the LT versions. m4_define(mym4_version_major, [1]) m4_define(mym4_version_minor, [5]) -m4_define(mym4_version_micro, [4]) +m4_define(mym4_version_micro, [5]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag @@ -59,7 +59,7 @@ # 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=13 -LIBGPGME_LT_REVISION=3 +LIBGPGME_LT_REVISION=4 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/doc/gpgme.info new/gpgme-1.5.5/doc/gpgme.info --- old/gpgme-1.5.4/doc/gpgme.info 2015-04-13 15:46:40.000000000 +0200 +++ new/gpgme-1.5.5/doc/gpgme.info 2015-06-08 15:04:13.000000000 +0200 @@ -20,8 +20,8 @@ This file documents the GPGME library. - This is Edition 1.5.4, last updated 6 November 2014, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.5.4. + This is Edition 1.5.5, last updated 6 November 2014, of ‘The ‘GnuPG +Made Easy’ Reference Manual’, for Version 1.5.5. Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, 2014 g10 Code GmbH. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/doc/gpgme.info-1 new/gpgme-1.5.5/doc/gpgme.info-1 --- old/gpgme-1.5.4/doc/gpgme.info-1 2015-04-13 15:46:39.000000000 +0200 +++ new/gpgme-1.5.5/doc/gpgme.info-1 2015-06-08 15:04:13.000000000 +0200 @@ -20,8 +20,8 @@ This file documents the GPGME library. - This is Edition 1.5.4, last updated 6 November 2014, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.5.4. + This is Edition 1.5.5, last updated 6 November 2014, of ‘The ‘GnuPG +Made Easy’ Reference Manual’, for Version 1.5.5. Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, 2014 g10 Code GmbH. @@ -43,8 +43,8 @@ Main Menu ********* -This is Edition 1.5.4, last updated 6 November 2014, of ‘The ‘GnuPG Made -Easy’ Reference Manual’, for Version 1.5.4 of the GPGME library. +This is Edition 1.5.5, last updated 6 November 2014, of ‘The ‘GnuPG Made +Easy’ Reference Manual’, for Version 1.5.5 of the GPGME library. * Menu: Files old/gpgme-1.5.4/doc/gpgme.info-2 and new/gpgme-1.5.5/doc/gpgme.info-2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/doc/stamp-vti new/gpgme-1.5.5/doc/stamp-vti --- old/gpgme-1.5.4/doc/stamp-vti 2015-04-13 15:46:25.000000000 +0200 +++ new/gpgme-1.5.5/doc/stamp-vti 2015-06-08 15:04:08.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 6 November 2014 @set UPDATED-MONTH November 2014 -@set EDITION 1.5.4 -@set VERSION 1.5.4 +@set EDITION 1.5.5 +@set VERSION 1.5.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/doc/version.texi new/gpgme-1.5.5/doc/version.texi --- old/gpgme-1.5.4/doc/version.texi 2015-04-13 15:46:25.000000000 +0200 +++ new/gpgme-1.5.5/doc/version.texi 2015-06-08 15:04:08.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 6 November 2014 @set UPDATED-MONTH November 2014 -@set EDITION 1.5.4 -@set VERSION 1.5.4 +@set EDITION 1.5.5 +@set VERSION 1.5.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/gpgme.spec new/gpgme-1.5.5/gpgme.spec --- old/gpgme-1.5.4/gpgme.spec 2015-04-13 15:46:40.000000000 +0200 +++ new/gpgme-1.5.5/gpgme.spec 2015-06-08 15:04:14.000000000 +0200 @@ -1,7 +1,7 @@ # This is a template. The dist target uses it to create the real file. Summary: GPGME - GnuPG Made Easy Name: gpgme -Version: 1.5.4 +Version: 1.5.5 Release: 1 URL: http://www.gnupg.org/gpgme.html Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/lang/cl/gpgme.asd new/gpgme-1.5.5/lang/cl/gpgme.asd --- old/gpgme-1.5.4/lang/cl/gpgme.asd 2015-04-13 15:46:13.000000000 +0200 +++ new/gpgme-1.5.5/lang/cl/gpgme.asd 2015-06-08 15:04:00.000000000 +0200 @@ -27,7 +27,7 @@ (defsystem gpgme :description "GnuPG Made Easy." :author "g10 Code GmbH" - :version "1.5.4" + :version "1.5.5" :licence "GPL" :depends-on ("cffi" "gpg-error") :components ((:file "gpgme-package") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/Makefile.in new/gpgme-1.5.5/src/Makefile.in --- old/gpgme-1.5.4/src/Makefile.in 2015-04-13 15:45:34.000000000 +0200 +++ new/gpgme-1.5.5/src/Makefile.in 2015-06-08 15:03:50.000000000 +0200 @@ -107,8 +107,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/build-aux/mkinstalldirs \ $(srcdir)/versioninfo.rc.in $(srcdir)/gpgme.h.in \ - $(srcdir)/gpgme-config.in ttyname_r.c vasprintf.c funopen.c \ - setenv.c stpcpy.c $(top_srcdir)/build-aux/depcomp + $(srcdir)/gpgme-config.in setenv.c funopen.c stpcpy.c \ + vasprintf.c ttyname_r.c $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/glib-2.0.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/debug.c new/gpgme-1.5.5/src/debug.c --- old/gpgme-1.5.4/src/debug.c 2013-05-31 13:37:05.000000000 +0200 +++ new/gpgme-1.5.5/src/debug.c 2015-06-08 14:54:24.000000000 +0200 @@ -80,11 +80,12 @@ #endif } -void _gpgme_debug_frame_end (void) +int _gpgme_debug_frame_end (void) { #ifdef FRAME_NR frame_nr--; #endif + return 0; } @@ -223,8 +224,17 @@ -/* Log the formatted string FORMAT at debug level LEVEL or higher. */ -void +/* Log the formatted string FORMAT at debug level LEVEL or higher. + * + * Returns: 0 + * + * Note that we always return 0 because the old TRACE macro evaluated + * to 0 which issues a warning with newer gcc version about an unused + * values. By using a return value of this function this can be + * avoided. Fixme: It might be useful to check whether the return + * value from the TRACE macros are actually used somewhere. + */ +int _gpgme_debug (int level, const char *format, ...) { va_list arg_ptr; @@ -232,7 +242,7 @@ saved_errno = errno; if (debug_level < level) - return; + return 0; va_start (arg_ptr, format); LOCK (debug_lock); @@ -273,6 +283,7 @@ fflush (errfp); gpg_err_set_errno (saved_errno); + return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/debug.h new/gpgme-1.5.5/src/debug.h --- old/gpgme-1.5.4/src/debug.h 2014-10-27 15:38:10.000000000 +0100 +++ new/gpgme-1.5.5/src/debug.h 2015-06-08 14:54:24.000000000 +0200 @@ -64,7 +64,7 @@ void _gpgme_debug_subsystem_init (void); /* Log the formatted string FORMAT at debug level LEVEL or higher. */ -void _gpgme_debug (int level, const char *format, ...); +int _gpgme_debug (int level, const char *format, ...); /* Start a new debug line in *LINE, logged at level LEVEL or higher, and starting with the formatted string FORMAT. */ @@ -82,7 +82,7 @@ size_t len); void _gpgme_debug_frame_begin (void); -void _gpgme_debug_frame_end (void); +int _gpgme_debug_frame_end (void); static inline gpgme_error_t _gpgme_trace_gpgme_error (gpgme_error_t err, const char *file, int line) @@ -108,82 +108,80 @@ #define TRACE_BEG(lvl, name, tag) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p\n", \ - _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag), 0 + _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag) #define TRACE_BEG0(lvl, name, tag, fmt) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ - _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag), 0 + _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag) #define TRACE_BEG1(lvl, name, tag, fmt, arg1) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1), 0 + arg1) #define TRACE_BEG2(lvl, name, tag, fmt, arg1, arg2) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2), 0 + arg1, arg2) #define TRACE_BEG3(lvl, name, tag, fmt, arg1, arg2, arg3) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3), 0 + arg1, arg2, arg3) #define TRACE_BEG4(lvl, name, tag, fmt, arg1, arg2, arg3, arg4) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4), 0 + arg1, arg2, arg3, arg4) #define TRACE_BEG5(lvl, name, tag, fmt, arg1, arg2, arg3, arg4, arg5) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4, arg5), 0 + arg1, arg2, arg3, arg4, arg5) #define TRACE_BEG7(lvl, name, tag, fmt, arg1, arg2, arg3, arg4, \ arg5, arg6, arg7) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4, arg5, \ - arg6, arg7), 0 + arg1, arg2, arg3, arg4, arg5, arg6, arg7) #define TRACE_BEG8(lvl, name, tag, fmt, arg1, arg2, arg3, arg4, \ arg5, arg6, arg7, arg8) \ _TRACE (lvl, name, tag); \ _gpgme_debug (_gpgme_trace_level, "%s: enter: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4, arg5, \ - arg6, arg7, arg8), 0 + arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) #define TRACE(lvl, name, tag) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE0(lvl, name, tag, fmt) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p, " fmt "\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE1(lvl, name, tag, fmt, arg1) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p, " fmt "\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag, arg1), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE2(lvl, name, tag, fmt, arg1, arg2) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p, " fmt "\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag, arg1, \ - arg2), _gpgme_debug_frame_end (), 0 + arg2), _gpgme_debug_frame_end () #define TRACE3(lvl, name, tag, fmt, arg1, arg2, arg3) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p, " fmt "\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag, arg1, \ - arg2, arg3), _gpgme_debug_frame_end (), 0 + arg2, arg3), _gpgme_debug_frame_end () #define TRACE6(lvl, name, tag, fmt, arg1, arg2, arg3, arg4, arg5, arg6) \ _gpgme_debug_frame_begin (), \ _gpgme_debug (lvl, "%s: call: %s=%p, " fmt "\n", \ name, STRINGIFY (tag), (void *) (uintptr_t) tag, arg1, \ arg2, arg3, arg4, arg5, arg6), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE_ERR(err) \ err == 0 ? (TRACE_SUC ()) : \ @@ -203,53 +201,52 @@ #define TRACE_SUC() \ _gpgme_debug (_gpgme_trace_level, "%s: leave\n", \ - _gpgme_trace_func), _gpgme_debug_frame_end (), 0 + _gpgme_trace_func), _gpgme_debug_frame_end () #define TRACE_SUC0(fmt) \ _gpgme_debug (_gpgme_trace_level, "%s: leave: " fmt "\n", \ - _gpgme_trace_func), _gpgme_debug_frame_end (), 0 + _gpgme_trace_func), _gpgme_debug_frame_end () #define TRACE_SUC1(fmt, arg1) \ _gpgme_debug (_gpgme_trace_level, "%s: leave: " fmt "\n", \ - _gpgme_trace_func, arg1), _gpgme_debug_frame_end (), 0 + _gpgme_trace_func, arg1), _gpgme_debug_frame_end () #define TRACE_SUC2(fmt, arg1, arg2) \ _gpgme_debug (_gpgme_trace_level, "%s: leave: " fmt "\n", \ - _gpgme_trace_func, arg1, arg2), _gpgme_debug_frame_end (), 0 + _gpgme_trace_func, arg1, arg2), _gpgme_debug_frame_end () #define TRACE_SUC5(fmt, arg1, arg2, arg3, arg4, arg5) \ _gpgme_debug (_gpgme_trace_level, "%s: leave: " fmt "\n", \ _gpgme_trace_func, arg1, arg2, arg3, arg4, arg5), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE_SUC6(fmt, arg1, arg2, arg3, arg4, arg5, arg6) \ _gpgme_debug (_gpgme_trace_level, "%s: leave: " fmt "\n", \ _gpgme_trace_func, arg1, arg2, arg3, arg4, arg5, arg6), \ - _gpgme_debug_frame_end (), 0 + _gpgme_debug_frame_end () #define TRACE_LOG(fmt) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ - _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag), 0 + _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag) #define TRACE_LOG1(fmt, arg1) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1), 0 + arg1) #define TRACE_LOG2(fmt, arg1, arg2) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2), 0 + arg1, arg2) #define TRACE_LOG3(fmt, arg1, arg2, arg3) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3), 0 + arg1, arg2, arg3) #define TRACE_LOG4(fmt, arg1, arg2, arg3, arg4) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4), 0 + arg1, arg2, arg3, arg4) #define TRACE_LOG5(fmt, arg1, arg2, arg3, arg4, arg5) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4, arg5), 0 + arg1, arg2, arg3, arg4, arg5) #define TRACE_LOG6(fmt, arg1, arg2, arg3, arg4, arg5, arg6) \ _gpgme_debug (_gpgme_trace_level, "%s: check: %s=%p, " fmt "\n", \ _gpgme_trace_func, _gpgme_trace_tagname, _gpgme_trace_tag, \ - arg1, arg2, arg3, arg4, arg5, \ - arg6), 0 + arg1, arg2, arg3, arg4, arg5, arg6) #define TRACE_LOGBUF(buf, len) \ _gpgme_debug_buffer (_gpgme_trace_level, "%s: check: %s", \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/engine-gpg.c new/gpgme-1.5.5/src/engine-gpg.c --- old/gpgme-1.5.4/src/engine-gpg.c 2015-03-16 12:57:54.000000000 +0100 +++ new/gpgme-1.5.5/src/engine-gpg.c 2015-06-08 14:54:24.000000000 +0200 @@ -2194,6 +2194,7 @@ { *dst++ = '\\'; *dst++ = '\\'; + src++; } else *(dst++) = *(src++); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/engine-gpgsm.c new/gpgme-1.5.5/src/engine-gpgsm.c --- old/gpgme-1.5.4/src/engine-gpgsm.c 2014-07-30 11:40:16.000000000 +0200 +++ new/gpgme-1.5.5/src/engine-gpgsm.c 2015-06-08 14:54:24.000000000 +0200 @@ -564,7 +564,7 @@ engine_status_handler_t status_fnc, void *status_fnc_value) { - gpg_error_t err; + gpg_error_t err, cb_err; char *line; size_t linelen; @@ -572,6 +572,7 @@ if (err) return err; + cb_err = 0; do { err = assuan_read_line (ctx, &line, &linelen); @@ -584,32 +585,45 @@ if (linelen >= 2 && line[0] == 'O' && line[1] == 'K' && (line[2] == '\0' || line[2] == ' ')) - return 0; + return cb_err; else if (linelen >= 4 && line[0] == 'E' && line[1] == 'R' && line[2] == 'R' && line[3] == ' ') - err = atoi (&line[4]); + { + /* We prefer a callback generated error because that one is + more related to gpgme and thus probably more important + than the error returned by the engine. */ + err = cb_err? cb_err : atoi (&line[4]); + } else if (linelen >= 2 && line[0] == 'S' && line[1] == ' ') { - char *rest; - gpgme_status_code_t r; - - rest = strchr (line + 2, ' '); - if (!rest) - rest = line + linelen; /* set to an empty string */ - else - *(rest++) = 0; - - r = _gpgme_parse_status (line + 2); - - if (r >= 0 && status_fnc) - err = status_fnc (status_fnc_value, r, rest); - else - err = gpg_error (GPG_ERR_GENERAL); + /* After an error from a status callback we skip all further + status lines. */ + if (!cb_err) + { + char *rest; + gpgme_status_code_t r; + + rest = strchr (line + 2, ' '); + if (!rest) + rest = line + linelen; /* set to an empty string */ + else + *(rest++) = 0; + + r = _gpgme_parse_status (line + 2); + + if (r >= 0 && status_fnc) + cb_err = status_fnc (status_fnc_value, r, rest); + } } else - err = gpg_error (GPG_ERR_GENERAL); + { + /* Invalid line or INQUIRY. We can't do anything else than + to stop. As with ERR we prefer a status callback + generated error code, though. */ + err = cb_err ? cb_err : gpg_error (GPG_ERR_GENERAL); + } } while (!err); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/src/verify.c new/gpgme-1.5.5/src/verify.c --- old/gpgme-1.5.4/src/verify.c 2014-07-30 11:40:16.000000000 +0200 +++ new/gpgme-1.5.5/src/verify.c 2015-06-08 14:54:24.000000000 +0200 @@ -195,6 +195,10 @@ sum |= GPGME_SIGSUM_KEY_MISSING; break; + case GPG_ERR_CERT_REVOKED: + sum |= GPGME_SIGSUM_KEY_REVOKED; + break; + case GPG_ERR_BAD_SIGNATURE: case GPG_ERR_NO_ERROR: break; @@ -213,6 +217,9 @@ break; case GPG_ERR_CERT_REVOKED: + /* Note that this is a second way to set this flag. It may also + have been set due to a sig->status of STATUS_REVKEYSIG from + parse_new_sig. */ sum |= GPGME_SIGSUM_KEY_REVOKED; break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/Makefile.am new/gpgme-1.5.5/tests/Makefile.am --- old/gpgme-1.5.4/tests/Makefile.am 2015-01-30 10:41:00.000000000 +0100 +++ new/gpgme-1.5.5/tests/Makefile.am 2015-06-08 14:54:24.000000000 +0200 @@ -23,7 +23,7 @@ TESTS = t-version t-data t-engine-info -EXTRA_DIST = t-data-1.txt t-data-2.txt ChangeLog-2011 +EXTRA_DIST = start-stop-agent t-data-1.txt t-data-2.txt ChangeLog-2011 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ LDADD = ../src/libgpgme.la @GPG_ERROR_LIBS@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/Makefile.in new/gpgme-1.5.5/tests/Makefile.in --- old/gpgme-1.5.4/tests/Makefile.in 2015-04-13 15:45:34.000000000 +0200 +++ new/gpgme-1.5.5/tests/Makefile.in 2015-06-08 15:03:50.000000000 +0200 @@ -444,7 +444,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) -EXTRA_DIST = t-data-1.txt t-data-2.txt ChangeLog-2011 +EXTRA_DIST = start-stop-agent t-data-1.txt t-data-2.txt ChangeLog-2011 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ LDADD = ../src/libgpgme.la @GPG_ERROR_LIBS@ noinst_HEADERS = run-support.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpg/Makefile.am new/gpgme-1.5.5/tests/gpg/Makefile.am --- old/gpgme-1.5.4/tests/gpg/Makefile.am 2015-01-30 10:41:25.000000000 +0100 +++ new/gpgme-1.5.5/tests/gpg/Makefile.am 2015-06-08 14:54:24.000000000 +0200 @@ -22,7 +22,8 @@ GPG = gpg GPG_AGENT = gpg-agent -TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= +TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= \ + top_srcdir=$(top_srcdir) # The keylist tests must come after the import and the edit test. noinst_HEADERS = t-support.h @@ -43,7 +44,7 @@ CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ - random_seed S.gpg-agent .gpg-v21-migrated + random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp private_keys = \ 13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \ @@ -53,11 +54,12 @@ 7A030357C0F253A5BBCD282FFC4E521B37558F5C -EXTRA_DIST = start-stop-agent initial.test final.test \ +EXTRA_DIST = initial.test final.test \ pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys) AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ +AM_LDFLAGS = -no-install LDADD = ../../src/libgpgme.la t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread @@ -65,12 +67,16 @@ noinst_PROGRAMS = $(c_tests) t-genkey clean-local: - -$(srcdir)/start-stop-agent --stop + -$(top_srcdir)/tests/start-stop-agent --stop -rm -fR private-keys-v1.d -check-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \ +check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \ ./private-keys-v1.d/gpg-sample.stamp +# To guarantee that check-local is run before any tests we +# add this dependency: +initial.test : check-local + export GNUPGHOME := $(abs_builddir) export GPG_AGENT_INFO := @@ -82,11 +88,12 @@ done echo x > ./private-keys-v1.d/gpg-sample.stamp -./pubring.gpg: $(srcdir)/pubdemo.asc - -$(GPG) --no-permission-warning \ - --import $(srcdir)/pubdemo.asc +./pubring-stamp: $(srcdir)/pubdemo.asc + $(GPG) --no-permission-warning \ + --import $(srcdir)/pubdemo.asc -$(GPG) --no-permission-warning \ --import $(srcdir)/secdemo.asc + touch ./pubring-stamp ./gpg.conf: # This is required for t-sig-notations. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpg/Makefile.in new/gpgme-1.5.5/tests/gpg/Makefile.in --- old/gpgme-1.5.4/tests/gpg/Makefile.in 2015-04-13 15:45:34.000000000 +0200 +++ new/gpgme-1.5.5/tests/gpg/Makefile.in 2015-06-08 15:03:50.000000000 +0200 @@ -472,7 +472,9 @@ top_srcdir = @top_srcdir@ GPG = gpg GPG_AGENT = gpg-agent -TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= +TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= \ + top_srcdir=$(top_srcdir) + # The keylist tests must come after the import and the edit test. noinst_HEADERS = t-support.h @@ -486,7 +488,7 @@ CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ - random_seed S.gpg-agent .gpg-v21-migrated + random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp private_keys = \ 13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \ @@ -495,11 +497,12 @@ 13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F \ 7A030357C0F253A5BBCD282FFC4E521B37558F5C -EXTRA_DIST = start-stop-agent initial.test final.test \ +EXTRA_DIST = initial.test final.test \ pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys) AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ +AM_LDFLAGS = -no-install LDADD = ../../src/libgpgme.la t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread all: all-am @@ -990,12 +993,16 @@ clean-local: - -$(srcdir)/start-stop-agent --stop + -$(top_srcdir)/tests/start-stop-agent --stop -rm -fR private-keys-v1.d -check-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \ +check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \ ./private-keys-v1.d/gpg-sample.stamp +# To guarantee that check-local is run before any tests we +# add this dependency: +initial.test : check-local + export GNUPGHOME := $(abs_builddir) export GPG_AGENT_INFO := @@ -1007,11 +1014,12 @@ done echo x > ./private-keys-v1.d/gpg-sample.stamp -./pubring.gpg: $(srcdir)/pubdemo.asc - -$(GPG) --no-permission-warning \ - --import $(srcdir)/pubdemo.asc +./pubring-stamp: $(srcdir)/pubdemo.asc + $(GPG) --no-permission-warning \ + --import $(srcdir)/pubdemo.asc -$(GPG) --no-permission-warning \ --import $(srcdir)/secdemo.asc + touch ./pubring-stamp ./gpg.conf: # This is required for t-sig-notations. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpg/final.test new/gpgme-1.5.5/tests/gpg/final.test --- old/gpgme-1.5.4/tests/gpg/final.test 2014-07-30 11:09:03.000000000 +0200 +++ new/gpgme-1.5.5/tests/gpg/final.test 2015-06-08 14:54:24.000000000 +0200 @@ -1,4 +1,4 @@ #!/bin/sh -${srcdir}/start-stop-agent --stop +${top_srcdir}/tests/start-stop-agent --stop exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpg/initial.test new/gpgme-1.5.5/tests/gpg/initial.test --- old/gpgme-1.5.4/tests/gpg/initial.test 2014-07-30 11:09:03.000000000 +0200 +++ new/gpgme-1.5.5/tests/gpg/initial.test 2015-06-08 14:54:24.000000000 +0200 @@ -1,4 +1,4 @@ #!/bin/sh -${srcdir}/start-stop-agent --start +${top_srcdir}/tests/start-stop-agent --start exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpg/start-stop-agent new/gpgme-1.5.5/tests/gpg/start-stop-agent --- old/gpgme-1.5.4/tests/gpg/start-stop-agent 2014-07-30 11:09:03.000000000 +0200 +++ new/gpgme-1.5.5/tests/gpg/start-stop-agent 1970-01-01 01:00:00.000000000 +0100 @@ -1,45 +0,0 @@ -#!/bin/sh -# Copyright (C) 2013 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 -# modifications, as long as this notice is preserved. This file is -# distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY, to the extent permitted by law; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -if [ -z "$(command -v gpg-connect-agent)" ]; then - echo "gpg-agent not installed and thus not started" >&2 - exit 0; -fi - -GPG_AGENT_INFO= -export GPG_AGENT_INFO - -token=$(echo "gpgme-$(pwd)" | tr ' ' '_') - -if [ "$1" = "--stop" ]; then - if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ - != "D set" ]; then - echo "gpg-agent not running" >&2 - exit 0 - fi - echo "stopping gpg-agent " >&2 - gpg-connect-agent KILLAGENT /bye >/dev/null 2>&1 - exit 0 -fi - -if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ - = "D set" ]; then - echo "gpg-agent already running" >&2 - exit 0 -fi - -echo "starting gpg-agent " >&2 -gpg-connect-agent putval\ $token\ set /bye >/dev/null 2>&1 -if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ - != "D set" ]; then - echo "error starting gpg-agent" >&2 - exit 1 -fi -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpgsm/Makefile.am new/gpgme-1.5.5/tests/gpgsm/Makefile.am --- old/gpgme-1.5.4/tests/gpgsm/Makefile.am 2015-01-30 10:41:50.000000000 +0100 +++ new/gpgme-1.5.5/tests/gpgsm/Makefile.am 2015-06-08 14:54:24.000000000 +0200 @@ -21,20 +21,26 @@ GPGSM = gpgsm -TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= +TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= \ + top_srcdir=$(top_srcdir) noinst_HEADERS = t-support.h -TESTS = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export + +c_tests = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export + + +TESTS = initial.test $(c_tests) final.test EXTRA_DIST = cert_dfn_pca01.der cert_dfn_pca15.der cert_g10code_test1.der \ - $(key_id) + $(key_id) initial.test final.test AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ +AM_LDFLAGS = -no-install LDADD = ../../src/libgpgme.la # We don't run t-genkey in the test suite, because it takes too long # and needs a working pinentry. -noinst_PROGRAMS = $(TESTS) t-genkey cms-keylist cms-decrypt +noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939 @@ -42,12 +48,16 @@ random_seed S.gpg-agent clean-local: - -gpg-connect-agent KILLAGENT /bye + -$(top_srcdir)/tests/start-stop-agent --stop -rm -fR private-keys-v1.d check-local: ./pubring.kbx ./gpgsm.conf \ ./private-keys-v1.d/$(key_id).key ./trustlist.txt +# To guarantee that check-local is run before any tests we add this +# dependency: +initial.test : check-local + export GNUPGHOME := $(abs_builddir) export GPG_AGENT_INFO := diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpgsm/Makefile.in new/gpgme-1.5.5/tests/gpgsm/Makefile.in --- old/gpgme-1.5.4/tests/gpgsm/Makefile.in 2015-04-13 15:45:34.000000000 +0200 +++ new/gpgme-1.5.5/tests/gpgsm/Makefile.in 2015-06-08 15:03:50.000000000 +0200 @@ -98,9 +98,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -TESTS = t-import$(EXEEXT) t-keylist$(EXEEXT) t-encrypt$(EXEEXT) \ - t-verify$(EXEEXT) t-decrypt$(EXEEXT) t-sign$(EXEEXT) \ - t-export$(EXEEXT) +TESTS = initial.test $(am__EXEEXT_1) final.test noinst_PROGRAMS = $(am__EXEEXT_1) t-genkey$(EXEEXT) \ cms-keylist$(EXEEXT) cms-decrypt$(EXEEXT) subdir = tests/gpgsm @@ -414,12 +412,16 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ GPGSM = gpgsm -TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= +TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= \ + top_srcdir=$(top_srcdir) + noinst_HEADERS = t-support.h +c_tests = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export EXTRA_DIST = cert_dfn_pca01.der cert_dfn_pca15.der cert_g10code_test1.der \ - $(key_id) + $(key_id) initial.test final.test AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ +AM_LDFLAGS = -no-install LDADD = ../../src/libgpgme.la key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939 CLEANFILES = pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \ @@ -853,12 +855,16 @@ clean-local: - -gpg-connect-agent KILLAGENT /bye + -$(top_srcdir)/tests/start-stop-agent --stop -rm -fR private-keys-v1.d check-local: ./pubring.kbx ./gpgsm.conf \ ./private-keys-v1.d/$(key_id).key ./trustlist.txt +# To guarantee that check-local is run before any tests we add this +# dependency: +initial.test : check-local + export GNUPGHOME := $(abs_builddir) export GPG_AGENT_INFO := diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpgsm/final.test new/gpgme-1.5.5/tests/gpgsm/final.test --- old/gpgme-1.5.4/tests/gpgsm/final.test 1970-01-01 01:00:00.000000000 +0100 +++ new/gpgme-1.5.5/tests/gpgsm/final.test 2015-06-08 14:54:24.000000000 +0200 @@ -0,0 +1,5 @@ +#!/bin/sh + +${top_srcdir}/tests/start-stop-agent --stop + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/gpgsm/initial.test new/gpgme-1.5.5/tests/gpgsm/initial.test --- old/gpgme-1.5.4/tests/gpgsm/initial.test 1970-01-01 01:00:00.000000000 +0100 +++ new/gpgme-1.5.5/tests/gpgsm/initial.test 2015-06-08 14:54:24.000000000 +0200 @@ -0,0 +1,4 @@ +#!/bin/sh + +${top_srcdir}/tests/start-stop-agent --start +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/run-keylist.c new/gpgme-1.5.5/tests/run-keylist.c --- old/gpgme-1.5.4/tests/run-keylist.c 2013-03-15 20:27:33.000000000 +0100 +++ new/gpgme-1.5.5/tests/run-keylist.c 2015-06-08 14:54:24.000000000 +0200 @@ -45,6 +45,7 @@ " --verbose run in verbose mode\n" " --openpgp use the OpenPGP protocol (default)\n" " --cms use the CMS protocol\n" + " --secret list only secret keys\n" " --local use GPGME_KEYLIST_MODE_LOCAL\n" " --extern use GPGME_KEYLIST_MODE_EXTERN\n" " --sigs use GPGME_KEYLIST_MODE_SIGS\n" @@ -70,6 +71,7 @@ gpgme_key_t keyarray[100]; int keyidx = 0; gpgme_protocol_t protocol = GPGME_PROTOCOL_OpenPGP; + int only_secret = 0; if (argc) { argc--; argv++; } @@ -99,6 +101,11 @@ protocol = GPGME_PROTOCOL_CMS; argc--; argv++; } + else if (!strcmp (*argv, "--secret")) + { + only_secret = 1; + argc--; argv++; + } else if (!strcmp (*argv, "--local")) { mode |= GPGME_KEYLIST_MODE_LOCAL; @@ -150,7 +157,7 @@ gpgme_set_keylist_mode (ctx, mode); - err = gpgme_op_keylist_start (ctx, argc? argv[0]:NULL, 0); + err = gpgme_op_keylist_start (ctx, argc? argv[0]:NULL, only_secret); fail_if_err (err); while (!(err = gpgme_op_keylist_next (ctx, &key))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gpgme-1.5.4/tests/start-stop-agent new/gpgme-1.5.5/tests/start-stop-agent --- old/gpgme-1.5.4/tests/start-stop-agent 1970-01-01 01:00:00.000000000 +0100 +++ new/gpgme-1.5.5/tests/start-stop-agent 2015-06-08 14:54:24.000000000 +0200 @@ -0,0 +1,45 @@ +#!/bin/sh +# Copyright (C) 2013 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 +# modifications, as long as this notice is preserved. This file is +# distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY, to the extent permitted by law; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +if [ -z "$(command -v gpg-connect-agent)" ]; then + echo "gpg-agent not installed and thus not started" >&2 + exit 0; +fi + +GPG_AGENT_INFO= +export GPG_AGENT_INFO + +token=$(echo "gpgme-$(pwd)" | tr ' ' '_') + +if [ "$1" = "--stop" ]; then + if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "gpg-agent not running" >&2 + exit 0 + fi + echo "stopping gpg-agent " >&2 + gpg-connect-agent KILLAGENT /bye >/dev/null 2>&1 + exit 0 +fi + +if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ + = "D set" ]; then + echo "gpg-agent already running" >&2 + exit 0 +fi + +echo "starting gpg-agent " >&2 +gpg-connect-agent putval\ $token\ set /bye >/dev/null 2>&1 +if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "error starting gpg-agent" >&2 + exit 1 +fi +exit 0
