summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:35 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:35 +0900
commit89f8f4e0a5b2aa091a5a63b67a97ef4089ae466c (patch)
tree40f799e1f1ef078c06d2559bd20da7408a2fe3c4
parentad62d9510e9c28596872f53b263b96ca7210dcbe (diff)
downloadgpgme-89f8f4e0a5b2aa091a5a63b67a97ef4089ae466c.tar.gz
gpgme-89f8f4e0a5b2aa091a5a63b67a97ef4089ae466c.tar.bz2
gpgme-89f8f4e0a5b2aa091a5a63b67a97ef4089ae466c.zip
Imported Upstream version 1.5.2upstream/1.5.2
-rw-r--r--AUTHORS12
-rw-r--r--ChangeLog55
-rw-r--r--Makefile.in3
-rw-r--r--NEWS10
-rw-r--r--VERSION2
-rwxr-xr-xconfigure139
-rw-r--r--configure.ac14
-rw-r--r--doc/Makefile.in3
-rw-r--r--doc/gpgme.info228
-rw-r--r--doc/gpgme.info-143
-rw-r--r--doc/gpgme.info-24
-rw-r--r--doc/gpgme.texi22
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/uiserver.texi13
-rw-r--r--doc/version.texi8
-rw-r--r--gpgme.spec2
-rw-r--r--lang/Makefile.in3
-rw-r--r--lang/cl/Makefile.in3
-rw-r--r--lang/cl/gpgme.asd2
-rw-r--r--m4/gpg-error.m445
-rw-r--r--src/Makefile.am10
-rw-r--r--src/Makefile.in116
-rw-r--r--src/debug.h4
-rw-r--r--src/engine-gpg.c57
-rw-r--r--src/gpgme-tool.c21
-rw-r--r--src/gpgme.m459
-rw-r--r--src/sign.c104
-rw-r--r--tests/Makefile.in3
-rw-r--r--tests/gpg/Makefile.am4
-rw-r--r--tests/gpg/Makefile.in13
-rw-r--r--tests/gpgsm/Makefile.am3
-rw-r--r--tests/gpgsm/Makefile.in12
-rw-r--r--tests/opassuan/Makefile.in3
33 files changed, 680 insertions, 348 deletions
diff --git a/AUTHORS b/AUTHORS
index 65e6368..6197416 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,7 @@
Package: gpgme
Homepage: http://www.gnupg.org/related_software/gpgme/
+Download: ftp://ftp.gnupg.org/gcrypt/gpgme/
+Repository: git://git.gnupg.org/gpgme.git
Maintainer: Werner Koch <wk@gnupg.org>
Bug reports: http://bugs.gnupg.org (use category "gpgme")
Security related bug reports: security@gnupg.org
@@ -12,7 +14,6 @@ FSF <gnu@gnu.org>
- Other from FSF projects: src/setenv.c, src/vasprintf.c,
src/stpcpy.c, src/w32-ce.c.
-
g10 Code GmbH <code@g10code.com>
- All stuff since mid march 2001.
@@ -23,6 +24,15 @@ Wojciech Polak <polak@lodz.pdi.net>
- gpgme.spec
+Authors with a DCO
+==================
+
+Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+2014-09-24:878ul9w4j8.fsf@alice.fifthhorseman.net:
+
+
+
+
Copyright 2001, 2002, 2012, 2013 g10 Code GmbH
This file is free software; as a special exception the author gives
diff --git a/ChangeLog b/ChangeLog
index 9910120..5e49b46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,58 @@
+2014-11-21 Werner Koch <wk@gnupg.org>
+
+ Release 1.5.2.
+ * configure.ac: Set LT version to C24/A13/R1.
+
+ Update the previous commit.
+ * src/sign.c (gpgme_op_sign_result): Reformat and take care of failed
+ malloc.
+
+2014-11-21 Ben Kibbey <bjk@luxsci.net>
+
+ Fix returning new signatures when there are none.
+ * src/sign.c (gpgme_op_sign_result): Test that invalid and valid
+ signatures add up to gpgme_signers_count().
+
+2014-11-06 Werner Koch <wk@gnupg.org>
+
+ Improve the debug output a bit.
+ * src/debug.h (TRACE_ERR): Include the line number in the output.
+
+2014-10-02 Werner Koch <wk@gnupg.org>
+
+ build: Implement SYSROOT feature.
+ * configure.ac: Document SYSROOT.
+ * m4/gpg-error.m4: Update from libgpg-error master.
+ * src/gpgme.m4: Implement SYSROOT stuff.
+
+2014-09-24 Werner Koch <wk@gnupg.org>
+
+ tests: Delay some test file extraction until "make check".
+ * tests/gpg/Makefile.am (all-local): Change to check-local.
+ * tests/gpgsm/Makefile.am (all-local): Ditto.
+
+2014-09-24 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+
+ Clean up gpgme's tests/gpg when gpg2.1 is available.
+ * tests/gpg/Makefile.am: Clean up .gpg-v21-migrated
+
+2014-08-12 Werner Koch <wk@gnupg.org>
+
+ gpgme-tool: Print fingerprint and keyid with keyservers.
+ * src/gpgme-tool.c (cmd_keylist): Print keyid. Print FPR only if
+ available.
+
+ Handle modern keyserver output which may emit the fingerprint.
+ * src/engine-gpg.c (read_colon_line): Split preprocessed lines.
+ (gpg_keylist_preprocess): Limit keyid field and print fingerprint.
+
+ gpgme-tool: Install gpgme-tool.
+ * src/Makefile.am (bin_PROGRAMS): New. Add gpgme-tools.
+ (noinst_PROGRAMS): Remove.
+
+ gpgme-tool: Fix segv for external key listing.
+ * src/gpgme-tool.c (result_xml_escape): Allow for DATA being NULL.
+
2014-07-30 Werner Koch <wk@gnupg.org>
Release 1.5.1.
diff --git a/Makefile.in b/Makefile.in
index 4d860ca..0681c98 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -209,6 +209,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -257,6 +259,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
diff --git a/NEWS b/NEWS
index cffc209..aed5a29 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+Noteworthy changes in version 1.5.2 (2014-11-21) [C24/A13/R1]
+-------------------------------------------------------------
+
+ * gpgme-tool is now installed.
+
+ * Fix external listing for modern keyservers.
+
+ * Minor other fixes.
+
+
Noteworthy changes in version 1.5.1 (2014-07-30) [C24/A13/R0]
-------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 26ca594..4cda8f1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.5.1
+1.5.2
diff --git a/configure b/configure
index 753e65b..ee8fde6 100755
--- a/configure
+++ b/configure
@@ -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.1.
+# Generated by GNU Autoconf 2.69 for gpgme 1.5.2.
#
# Report bugs to <http://bugs.gnupg.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gpgme'
PACKAGE_TARNAME='gpgme'
-PACKAGE_VERSION='1.5.1'
-PACKAGE_STRING='gpgme 1.5.1'
+PACKAGE_VERSION='1.5.2'
+PACKAGE_STRING='gpgme 1.5.2'
PACKAGE_BUGREPORT='http://bugs.gnupg.org'
PACKAGE_URL=''
@@ -650,6 +650,8 @@ USE_DESCRIPTOR_PASSING_TRUE
LIBASSUAN_LIBS
LIBASSUAN_CFLAGS
LIBASSUAN_CONFIG
+GPG_ERROR_MT_LIBS
+GPG_ERROR_MT_CFLAGS
GPG_ERROR_LIBS
GPG_ERROR_CFLAGS
GPG_ERROR_CONFIG
@@ -749,6 +751,7 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+SYSROOT
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -855,6 +858,7 @@ enable_fd_passing
ac_precious_vars='build_alias
host_alias
target_alias
+SYSROOT
CC
CFLAGS
LDFLAGS
@@ -1405,7 +1409,7 @@ if test "$ac_init_help" = "long"; then
# 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.1 to adapt to many kinds of systems.
+\`configure' configures gpgme 1.5.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1475,7 +1479,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gpgme 1.5.1:";;
+ short | recursive ) echo "Configuration of gpgme 1.5.2:";;
esac
cat <<\_ACEOF
@@ -1521,6 +1525,7 @@ Optional Packages:
prefix where LIBASSUAN is installed (optional)
Some influential environment variables:
+ SYSROOT locate config scripts also below that directory
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -1599,7 +1604,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gpgme configure 1.5.1
+gpgme configure 1.5.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2429,7 +2434,7 @@ cat >config.log <<_ACEOF
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.1, which was
+It was created by gpgme $as_me 1.5.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2796,7 +2801,7 @@ LIBGPGME_LT_CURRENT=24
# 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=0
+LIBGPGME_LT_REVISION=1
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
@@ -3283,7 +3288,7 @@ fi
# Define the identity of the package.
PACKAGE='gpgme'
- VERSION='1.5.1'
+ VERSION='1.5.2'
cat >>confdefs.h <<_ACEOF
@@ -3457,6 +3462,7 @@ fi
AM_BACKSLASH='\'
+
# Enable GNU extensions on systems that have them.
DEPDIR="${am__leading_dot}deps"
@@ -6015,7 +6021,7 @@ cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
-VERSION_NUMBER=0x010501
+VERSION_NUMBER=0x010502
# Don't default to build static libs.
@@ -17359,7 +17365,7 @@ fi
#
# Provide information about the build.
#
-BUILD_REVISION="16835c3"
+BUILD_REVISION="c62ce32"
cat >>confdefs.h <<_ACEOF
@@ -17368,7 +17374,7 @@ _ACEOF
BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
-BUILD_FILEVERSION="${BUILD_FILEVERSION}5763"
+BUILD_FILEVERSION="${BUILD_FILEVERSION}50732"
BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
@@ -18356,15 +18362,28 @@ if test "${with_gpg_error_prefix+set}" = set; then :
fi
- if test x$gpg_error_config_prefix != x ; then
- if test x${GPG_ERROR_CONFIG+set} != xset ; then
- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+ if test x"${GPG_ERROR_CONFIG}" = x ; then
+ if test x"${gpg_error_config_prefix}" != x ; then
+ GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+ else
+ case "${SYSROOT}" in
+ /*)
+ if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+ GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+ fi
+ ;;
+ '')
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5
+$as_echo "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;}
+ ;;
+ esac
fi
fi
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gpg-error-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gpg-error-config; ac_word=$2
+ # Extract the first word of "gpg-error-config", so it can be a program name with args.
+set dummy gpg-error-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_GPG_ERROR_CONFIG+:} false; then :
@@ -18390,6 +18409,7 @@ done
done
IFS=$as_save_IFS
+ test -z "$ac_cv_path_GPG_ERROR_CONFIG" && ac_cv_path_GPG_ERROR_CONFIG="no"
;;
esac
fi
@@ -18403,63 +18423,6 @@ $as_echo "no" >&6; }
fi
-fi
-if test -z "$ac_cv_path_GPG_ERROR_CONFIG"; then
- ac_pt_GPG_ERROR_CONFIG=$GPG_ERROR_CONFIG
- # Extract the first word of "gpg-error-config", so it can be a program name with args.
-set dummy gpg-error-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_GPG_ERROR_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_GPG_ERROR_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_GPG_ERROR_CONFIG="$ac_pt_GPG_ERROR_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_GPG_ERROR_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_GPG_ERROR_CONFIG=$ac_cv_path_ac_pt_GPG_ERROR_CONFIG
-if test -n "$ac_pt_GPG_ERROR_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GPG_ERROR_CONFIG" >&5
-$as_echo "$ac_pt_GPG_ERROR_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_GPG_ERROR_CONFIG" = x; then
- GPG_ERROR_CONFIG="no"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- GPG_ERROR_CONFIG=$ac_pt_GPG_ERROR_CONFIG
- fi
-else
- GPG_ERROR_CONFIG="$ac_cv_path_GPG_ERROR_CONFIG"
-fi
-
min_gpg_error_version="$NEED_GPG_ERROR_VERSION"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPG Error - version >= $min_gpg_error_version" >&5
$as_echo_n "checking for GPG Error - version >= $min_gpg_error_version... " >&6; }
@@ -18488,6 +18451,8 @@ $as_echo_n "checking for GPG Error - version >= $min_gpg_error_version... " >&6;
if test $ok = yes; then
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+ GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+ GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($gpg_error_config_version)" >&5
$as_echo "yes ($gpg_error_config_version)" >&6; }
have_gpg_error=yes
@@ -18500,7 +18465,7 @@ $as_echo "yes ($gpg_error_config_version)" >&6; }
*** built for $gpg_error_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-gpg-error-prefix
-*** to specify a matching config script.
+*** to specify a matching config script or use \$SYSROOT.
***" >&5
$as_echo "$as_me: WARNING:
***
@@ -18508,13 +18473,16 @@ $as_echo "$as_me: WARNING:
*** built for $gpg_error_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-gpg-error-prefix
-*** to specify a matching config script.
+*** to specify a matching config script or use \$SYSROOT.
***" >&2;}
+ gpg_config_script_warn="$gpg_config_script_warn libgpg-error"
fi
fi
else
GPG_ERROR_CFLAGS=""
GPG_ERROR_LIBS=""
+ GPG_ERROR_MT_CFLAGS=""
+ GPG_ERROR_MT_LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
have_gpg_error=no
@@ -18523,6 +18491,8 @@ $as_echo "no" >&6; }
+
+
$as_echo "#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GPGME" >>confdefs.h
@@ -19645,7 +19615,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.1, which was
+This file was extended by gpgme $as_me 1.5.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19711,7 +19681,7 @@ _ACEOF
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.1
+gpgme config.status 1.5.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -22005,10 +21975,19 @@ fi
echo "
GPGME v${VERSION} has been configured as follows:
- Revision: 16835c3 (5763)
+ Revision: c62ce32 (50732)
Platform: $host
UI Server: $uiserver
FD Passing: $use_descriptor_passing
GPGME Pthread: $have_pthread
"
+if test "x${gpg_config_script_warn}" != x; then
+cat <<G10EOF
+ Mismatches between the target platform and the to
+ be used libraries have been been detected for:
+ ${gpg_config_script_warn}
+ Please check above for warning messages.
+
+G10EOF
+fi
diff --git a/configure.ac b/configure.ac
index b3e17fa..0ffe847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ min_automake_version="1.11"
# for the LT versions.
m4_define(mym4_version_major, [1])
m4_define(mym4_version_minor, [5])
-m4_define(mym4_version_micro, [1])
+m4_define(mym4_version_micro, [2])
# 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 @@ LIBGPGME_LT_CURRENT=24
# 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=0
+LIBGPGME_LT_REVISION=1
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
@@ -83,6 +83,7 @@ AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AM_SILENT_RULES
+AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
# Enable GNU extensions on systems that have them.
AC_GNU_SOURCE
@@ -636,3 +637,12 @@ echo "
FD Passing: $use_descriptor_passing
GPGME Pthread: $have_pthread
"
+if test "x${gpg_config_script_warn}" != x; then
+cat <<G10EOF
+ Mismatches between the target platform and the to
+ be used libraries have been been detected for:
+ ${gpg_config_script_warn}
+ Please check above for warning messages.
+
+G10EOF
+fi
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 211a9b4..f584fe6 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -189,6 +189,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -237,6 +239,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
diff --git a/doc/gpgme.info b/doc/gpgme.info
index b7fc85b..ae18cf3 100644
--- a/doc/gpgme.info
+++ b/doc/gpgme.info
@@ -22,8 +22,8 @@ General Public License for more details.
This file documents the GPGME library.
- This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.5.1.
+ This is Edition 1.5.2, last updated 6 November 2014, of `The `GnuPG
+Made Easy' Reference Manual', for Version 1.5.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013, 2014 g10 Code GmbH.
@@ -41,120 +41,120 @@ General Public License for more details.

Indirect:
-gpgme.info-1: 1769
-gpgme.info-2: 289901
+gpgme.info-1: 1772
+gpgme.info-2: 290983

Tag Table:
(Indirect)
-Node: Top1769
-Node: Introduction8880
-Node: Getting Started9667
-Node: Features10792
-Node: Overview11942
-Node: Preparation13051
-Node: Header14048
-Node: Building the Source14747
-Node: Largefile Support (LFS)16856
-Node: Using Automake22167
-Node: Using Libtool23803
-Node: Library Version Check24153
-Node: Signal Handling29171
-Node: Multi Threading30387
-Ref: Multi Threading-Footnote-132569
-Node: Protocols and Engines32983
-Node: Engine Version Check35418
-Node: Engine Information36985
-Node: Engine Configuration40757
-Node: OpenPGP42019
-Node: Cryptographic Message Syntax42355
-Node: Algorithms42649
-Ref: Algorithms-Footnote-143128
-Node: Public Key Algorithms43256
-Node: Hash Algorithms45177
-Node: Error Handling46298
-Node: Error Values48160
-Node: Error Sources53238
-Node: Error Codes55565
-Node: Error Strings60204
-Node: Exchanging Data61983
-Node: Creating Data Buffers63812
-Node: Memory Based Data Buffers64328
-Node: File Based Data Buffers67682
-Node: Callback Based Data Buffers69853
-Node: Destroying Data Buffers75409
-Node: Manipulating Data Buffers76768
-Node: Data Buffer I/O Operations77260
-Node: Data Buffer Meta-Data79963
-Node: Data Buffer Convenience83345
-Node: Contexts85281
-Node: Creating Contexts86463
-Node: Destroying Contexts87274
-Node: Result Management87609
-Node: Context Attributes89015
-Node: Protocol Selection89795
-Node: Crypto Engine90807
-Node: ASCII Armor92628
-Node: Text Mode93240
-Node: Included Certificates94171
-Node: Key Listing Mode95546
-Node: Passphrase Callback99319
-Node: Progress Meter Callback102457
-Node: Locale104381
-Node: Key Management105920
-Node: Listing Keys116377
-Node: Information About Keys123639
-Node: Key Signatures131637
-Node: Manipulating Keys135649
-Node: Generating Keys136491
-Node: Exporting Keys141098
-Node: Importing Keys146997
-Ref: Importing Keys-Footnote-1154160
-Node: Deleting Keys154288
-Node: Changing Passphrases155685
-Node: Advanced Key Editing156946
-Node: Trust Item Management160050
-Node: Listing Trust Items161120
-Node: Information About Trust Items163418
-Node: Manipulating Trust Items165300
-Node: Crypto Operations166261
-Node: Decrypt167507
-Node: Verify171253
-Node: Decrypt and Verify189192
-Node: Sign191196
-Node: Selecting Signers191760
-Node: Creating a Signature192912
-Node: Signature Notation Data197523
-Node: Encrypt199707
-Node: Encrypting a Plaintext200063
-Node: Miscellaneous206562
-Node: Running other Programs206850
-Node: Run Control208827
-Node: Waiting For Completion209570
-Node: Using External Event Loops211616
-Node: I/O Callback Interface213583
-Node: Registering I/O Callbacks218695
-Node: I/O Callback Example220680
-Node: I/O Callback Example GTK+226897
-Node: I/O Callback Example GDK228686
-Node: I/O Callback Example Qt230328
-Node: Cancellation232616
-Node: UI Server Protocol234869
-Ref: UI Server Protocol-Footnote-1236300
-Node: UI Server Encrypt236419
-Node: UI Server Sign241679
-Node: UI Server Decrypt243987
-Node: UI Server Verify245425
-Node: UI Server Set Input Files248927
-Node: UI Server Sign/Encrypt Files249727
-Node: UI Server Verify/Decrypt Files251496
-Node: UI Server Import/Export Keys253342
-Node: UI Server Checksum Files254375
-Node: Miscellaneous UI Server Commands256541
-Ref: command SENDER258453
-Node: Debugging260129
-Node: Library Copying261784
-Node: Copying289901
-Node: Function and Data Index327532
-Node: Concept Index353696
+Node: Top1772
+Node: Introduction8886
+Node: Getting Started9673
+Node: Features10798
+Node: Overview11948
+Node: Preparation13057
+Node: Header14054
+Node: Building the Source14765
+Node: Largefile Support (LFS)16874
+Node: Using Automake22185
+Node: Using Libtool24561
+Node: Library Version Check24911
+Node: Signal Handling29929
+Node: Multi Threading31145
+Ref: Multi Threading-Footnote-133327
+Node: Protocols and Engines33741
+Node: Engine Version Check36176
+Node: Engine Information37743
+Node: Engine Configuration41515
+Node: OpenPGP42777
+Node: Cryptographic Message Syntax43113
+Node: Algorithms43407
+Ref: Algorithms-Footnote-143886
+Node: Public Key Algorithms44014
+Node: Hash Algorithms45935
+Node: Error Handling47056
+Node: Error Values48918
+Node: Error Sources53996
+Node: Error Codes56323
+Node: Error Strings60962
+Node: Exchanging Data62741
+Node: Creating Data Buffers64570
+Node: Memory Based Data Buffers65086
+Node: File Based Data Buffers68440
+Node: Callback Based Data Buffers70611
+Node: Destroying Data Buffers76167
+Node: Manipulating Data Buffers77526
+Node: Data Buffer I/O Operations78018
+Node: Data Buffer Meta-Data80721
+Node: Data Buffer Convenience84103
+Node: Contexts86039
+Node: Creating Contexts87221
+Node: Destroying Contexts88032
+Node: Result Management88367
+Node: Context Attributes89773
+Node: Protocol Selection90553
+Node: Crypto Engine91565
+Node: ASCII Armor93386
+Node: Text Mode93998
+Node: Included Certificates94929
+Node: Key Listing Mode96304
+Node: Passphrase Callback100077
+Node: Progress Meter Callback103215
+Node: Locale105139
+Node: Key Management106678
+Node: Listing Keys117135
+Node: Information About Keys124397
+Node: Key Signatures132395
+Node: Manipulating Keys136407
+Node: Generating Keys137249
+Node: Exporting Keys141856
+Node: Importing Keys147755
+Ref: Importing Keys-Footnote-1154918
+Node: Deleting Keys155046
+Node: Changing Passphrases156443
+Node: Advanced Key Editing157704
+Node: Trust Item Management160808
+Node: Listing Trust Items161878
+Node: Information About Trust Items164176
+Node: Manipulating Trust Items166058
+Node: Crypto Operations167019
+Node: Decrypt168265
+Node: Verify172011
+Node: Decrypt and Verify189950
+Node: Sign191954
+Node: Selecting Signers192518
+Node: Creating a Signature193670
+Node: Signature Notation Data198281
+Node: Encrypt200465
+Node: Encrypting a Plaintext200821
+Node: Miscellaneous207320
+Node: Running other Programs207608
+Node: Run Control209585
+Node: Waiting For Completion210328
+Node: Using External Event Loops212374
+Node: I/O Callback Interface214341
+Node: Registering I/O Callbacks219453
+Node: I/O Callback Example221438
+Node: I/O Callback Example GTK+227655
+Node: I/O Callback Example GDK229444
+Node: I/O Callback Example Qt231086
+Node: Cancellation233374
+Node: UI Server Protocol235627
+Ref: UI Server Protocol-Footnote-1237058
+Node: UI Server Encrypt237177
+Node: UI Server Sign242437
+Node: UI Server Decrypt244749
+Node: UI Server Verify246187
+Node: UI Server Set Input Files249689
+Node: UI Server Sign/Encrypt Files250742
+Node: UI Server Verify/Decrypt Files252511
+Node: UI Server Import/Export Keys254357
+Node: UI Server Checksum Files255390
+Node: Miscellaneous UI Server Commands257556
+Ref: command SENDER259468
+Node: Debugging261144
+Node: Library Copying262866
+Node: Copying290983
+Node: Function and Data Index328614
+Node: Concept Index354778

End Tag Table
diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1
index bdfd347..640f693 100644
--- a/doc/gpgme.info-1
+++ b/doc/gpgme.info-1
@@ -22,8 +22,8 @@ General Public License for more details.
This file documents the GPGME library.
- This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.5.1.
+ This is Edition 1.5.2, last updated 6 November 2014, of `The `GnuPG
+Made Easy' Reference Manual', for Version 1.5.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013, 2014 g10 Code GmbH.
@@ -45,8 +45,8 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir)
Main Menu
*********
-This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG Made
-Easy' Reference Manual', for Version 1.5.1 of the GPGME library.
+This is Edition 1.5.2, last updated 6 November 2014, of `The `GnuPG
+Made Easy' Reference Manual', for Version 1.5.2 of the GPGME library.
* Menu:
@@ -351,8 +351,8 @@ types and `GPGME_*' for other symbols. Symbols internal to GPGME take
the form `_gpgme_*' and `_GPGME_*'.
Because GPGME makes use of the GPG Error library, using GPGME will
-also use the `GPG_ERR_*' name space directly, and the `gpg_err*' and
-`gpg_str*' name space indirectly.
+also use the `GPG_ERR_*' name space directly, and the `gpg_err*',
+`gpg_str*', and `gpgrt_*' name space indirectly.

File: gpgme.info, Node: Building the Source, Next: Largefile Support (LFS), Prev: Header, Up: Preparation
@@ -520,7 +520,10 @@ to Automake that does all the work for you.
Additionally, the function defines `GPGME_CFLAGS' to the flags
needed for compilation of the program to find the `gpgme.h' header
file, and `GPGME_LIBS' to the linker flags needed to link the
- program to the GPGME library.
+ program to the GPGME library. If the used helper script does not
+ match the target type you are building for a warning is printed
+ and the string `libgcrypt' is appended to the variable
+ `gpg_config_script_warn'.
`AM_PATH_GPGME_PTH' checks for the version of GPGME that can be
used with GNU Pth, and defines `GPGME_PTH_CFLAGS' and
@@ -530,6 +533,16 @@ to Automake that does all the work for you.
be used with the native pthread implementation, and defines
`GPGME_PTHREAD_CFLAGS' and `GPGME_PTHREAD_LIBS'.
+ This macro searches for `gpgme-config' along the PATH. If you are
+ cross-compiling, it is useful to set the environment variable
+ `SYSROOT' to the top directory of your target. The macro will
+ then first look for the helper program in the `bin' directory
+ below that top directory. An absolute directory name must be used
+ for `SYSROOT'. Finally, if the configure command line option
+ `--with-gpgme-prefix' is used, only its value is used for the top
+ directory below which the helper script is expected.
+
+
You can use the defined Autoconf variables like this in your
`Makefile.am':
@@ -6001,7 +6014,7 @@ before the final OK response:
-- Status line: MICALG STRING
The STRING represents the hash algorithm used to create the
- signature. It is used with MOSS style signature messages and
+ signature. It is used with RFC-1847 style signature messages and
defined by PGP/MIME (RFC-3156) and S/MIME (RFC-3851). The GPGME
library has a supporting function `gpgme_hash_algo_name' to return
the algorithm name as a string. This string needs to be
@@ -6139,13 +6152,18 @@ A.5 UI Server: Specifying the input files to operate on.
All file related UI server commands operate on a number of input files
or directories, specified by one or more `FILE' commands:
- -- Command: FILE NAME [-continued]
+ -- Command: FILE [-clear] NAME
Add the file or directory NAME to the list of pathnames to be
processed by the server. The parameter NAME must be an absolute
path name (including the drive letter) and is percent espaced (in
particular, the characters %, = and white space characters are
- always escaped). The option `--continued' is present for all but
- the last `FILE' command.
+ always escaped). If the option `--clear' is given, the list of
+ files is cleared before adding NAME.
+
+ Historical note: The original spec did not define `--clear' but
+ the keyword `--continued' after the file name to indicate that
+ more files are to be expected. However, this has never been used
+ and thus removed from the specs.

File: gpgme.info, Node: UI Server Sign/Encrypt Files, Next: UI Server Verify/Decrypt Files, Prev: UI Server Set Input Files, Up: UI Server Protocol
@@ -6388,7 +6406,8 @@ line. If you can't figure out why things don't work, you may use
GPGME's built in trace feature. This feature is either enabled using
the environment variable `GPGME_DEBUG' or, if this is not possible, by
calling the function `gpgme_set_global_flag'. The value is the trace
-level and an optional file name.
+level and an optional file name. If no file name is given the trace
+output is printed to `stderr'.
For example
GPGME_DEBUG=9:/home/user/mygpgme.log
diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2
index 68be411..50b1271 100644
--- a/doc/gpgme.info-2
+++ b/doc/gpgme.info-2
@@ -22,8 +22,8 @@ General Public License for more details.
This file documents the GPGME library.
- This is Edition 1.5.1, last updated 30 July 2014, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.5.1.
+ This is Edition 1.5.2, last updated 6 November 2014, of `The `GnuPG
+Made Easy' Reference Manual', for Version 1.5.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013, 2014 g10 Code GmbH.
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 1f4a9e1..45c359d 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -391,8 +391,8 @@ to @acronym{GPGME} take the form @code{_gpgme_*} and @code{_GPGME_*}.
Because @acronym{GPGME} makes use of the GPG Error library, using
@acronym{GPGME} will also use the @code{GPG_ERR_*} name space
-directly, and the @code{gpg_err*} and @code{gpg_str*} name space
-indirectly.
+directly, and the @code{gpg_err*}, @code{gpg_str*}, and @code{gpgrt_*}
+name space indirectly.
@node Building the Source
@@ -575,7 +575,10 @@ given.
Additionally, the function defines @code{GPGME_CFLAGS} to the flags
needed for compilation of the program to find the @file{gpgme.h}
header file, and @code{GPGME_LIBS} to the linker flags needed to link
-the program to the @acronym{GPGME} library.
+the program to the @acronym{GPGME} library. If the used helper script
+does not match the target type you are building for a warning is
+printed and the string @code{libgcrypt} is appended to the variable
+@code{gpg_config_script_warn}.
@code{AM_PATH_GPGME_PTH} checks for the version of @acronym{GPGME}
that can be used with GNU Pth, and defines @code{GPGME_PTH_CFLAGS} and
@@ -584,6 +587,16 @@ that can be used with GNU Pth, and defines @code{GPGME_PTH_CFLAGS} and
@code{AM_PATH_GPGME_PTHREAD} checks for the version of @acronym{GPGME}
that can be used with the native pthread implementation, and defines
@code{GPGME_PTHREAD_CFLAGS} and @code{GPGME_PTHREAD_LIBS}.
+
+This macro searches for @command{gpgme-config} along the PATH. If
+you are cross-compiling, it is useful to set the environment variable
+@code{SYSROOT} to the top directory of your target. The macro will
+then first look for the helper program in the @file{bin} directory
+below that top directory. An absolute directory name must be used for
+@code{SYSROOT}. Finally, if the configure command line option
+@code{--with-gpgme-prefix} is used, only its value is used for the top
+directory below which the helper script is expected.
+
@end defmac
You can use the defined Autoconf variables like this in your
@@ -6076,7 +6089,8 @@ may use @acronym{GPGME}'s built in trace feature. This feature is
either enabled using the environment variable @code{GPGME_DEBUG} or,
if this is not possible, by calling the function
@code{gpgme_set_global_flag}. The value is the trace level and
-an optional file name.
+an optional file name. If no file name is given the trace output is
+printed to @code{stderr}.
@noindent
For example
diff --git a/doc/stamp-vti b/doc/stamp-vti
index c3a4de7..d36ed7c 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 30 July 2014
-@set UPDATED-MONTH July 2014
-@set EDITION 1.5.1
-@set VERSION 1.5.1
+@set UPDATED 6 November 2014
+@set UPDATED-MONTH November 2014
+@set EDITION 1.5.2
+@set VERSION 1.5.2
diff --git a/doc/uiserver.texi b/doc/uiserver.texi
index 859ae02..16e8f85 100644
--- a/doc/uiserver.texi
+++ b/doc/uiserver.texi
@@ -226,7 +226,7 @@ before the final OK response:
@deffn {Status line} MICALG @var{string}
The @var{string} represents the hash algorithm used to create the
-signature. It is used with MOSS style signature messages and defined by
+signature. It is used with RFC-1847 style signature messages and defined by
PGP/MIME (RFC-3156) and S/MIME (RFC-3851). The GPGME library has a
supporting function @code{gpgme_hash_algo_name} to return the algorithm
name as a string. This string needs to be lowercased and for OpenPGP
@@ -368,13 +368,18 @@ message.
All file related UI server commands operate on a number of input files
or directories, specified by one or more @code{FILE} commands:
-@deffn Command FILE @var{name} [--continued]
+@deffn Command FILE [--clear] @var{name}
Add the file or directory @var{name} to the list of pathnames to be
processed by the server. The parameter @var{name} must be an absolute
path name (including the drive letter) and is percent espaced (in
particular, the characters %, = and white space characters are always
-escaped). The option @code{--continued} is present for all but the
-last @code{FILE} command.
+escaped). If the option @code{--clear} is given, the list of files is
+cleared before adding @var{name}.
+
+Historical note: The original spec did not define @code{--clear} but
+the keyword @code{--continued} after the file name to indicate that
+more files are to be expected. However, this has never been used and
+thus removed from the specs.
@end deffn
diff --git a/doc/version.texi b/doc/version.texi
index c3a4de7..d36ed7c 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 30 July 2014
-@set UPDATED-MONTH July 2014
-@set EDITION 1.5.1
-@set VERSION 1.5.1
+@set UPDATED 6 November 2014
+@set UPDATED-MONTH November 2014
+@set EDITION 1.5.2
+@set VERSION 1.5.2
diff --git a/gpgme.spec b/gpgme.spec
index a594f83..d7baac1 100644
--- a/gpgme.spec
+++ b/gpgme.spec
@@ -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.1
+Version: 1.5.2
Release: 1
URL: http://www.gnupg.org/gpgme.html
Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz
diff --git a/lang/Makefile.in b/lang/Makefile.in
index e231395..fbf2712 100644
--- a/lang/Makefile.in
+++ b/lang/Makefile.in
@@ -186,6 +186,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -234,6 +236,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
diff --git a/lang/cl/Makefile.in b/lang/cl/Makefile.in
index 91b0ea7..91c51f1 100644
--- a/lang/cl/Makefile.in
+++ b/lang/cl/Makefile.in
@@ -178,6 +178,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -226,6 +228,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
diff --git a/lang/cl/gpgme.asd b/lang/cl/gpgme.asd
index 47a486a..f0277c3 100644
--- a/lang/cl/gpgme.asd
+++ b/lang/cl/gpgme.asd
@@ -27,7 +27,7 @@
(defsystem gpgme
:description "GnuPG Made Easy."
:author "g10 Code GmbH"
- :version "1.5.1"
+ :version "1.5.2"
:licence "GPL"
:depends-on ("cffi" "gpg-error")
:components ((:file "gpgme-package")
diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4
index feb963c..1661204 100644
--- a/m4/gpg-error.m4
+++ b/m4/gpg-error.m4
@@ -1,5 +1,5 @@
# gpg-error.m4 - autoconf macro to detect libgpg-error.
-# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH
+# Copyright (C) 2002, 2003, 2004, 2011, 2014 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
@@ -8,10 +8,21 @@
# 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.
+#
+# Last-changed: 2014-10-02
+
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS
+dnl
+dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS,
+dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are
+dnl used for programs requireing real multi thread support.
+dnl
+dnl If a prefix option is not used, the config script is first
+dnl searched in $SYSROOT/bin and then along $PATH. If the used
+dnl config script does not match the host specification the script
+dnl is added to the gpg_config_script_warn variable.
dnl
AC_DEFUN([AM_PATH_GPG_ERROR],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -30,13 +41,26 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
AC_ARG_WITH(gpg-error-prefix,,
[gpg_error_config_prefix="$withval"])
- if test x$gpg_error_config_prefix != x ; then
- if test x${GPG_ERROR_CONFIG+set} != xset ; then
- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+ if test x"${GPG_ERROR_CONFIG}" = x ; then
+ if test x"${gpg_error_config_prefix}" != x ; then
+ GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+ else
+ case "${SYSROOT}" in
+ /*)
+ if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+ GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+ fi
+ ;;
+ '')
+ ;;
+ *)
+ AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+ ;;
+ esac
fi
fi
- AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no)
+ AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
min_gpg_error_version=ifelse([$1], ,0.0,$1)
AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
ok=no
@@ -64,6 +88,8 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
if test $ok = yes; then
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+ GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+ GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
@@ -75,16 +101,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
*** built for $gpg_error_config_host and thus may not match the
*** used host $host.
*** You may want to use the configure option --with-gpg-error-prefix
-*** to specify a matching config script.
+*** to specify a matching config script or use \$SYSROOT.
***]])
+ gpg_config_script_warn="$gpg_config_script_warn libgpg-error"
fi
fi
else
GPG_ERROR_CFLAGS=""
GPG_ERROR_LIBS=""
+ GPG_ERROR_MT_CFLAGS=""
+ GPG_ERROR_MT_LIBS=""
AC_MSG_RESULT(no)
ifelse([$3], , :, [$3])
fi
AC_SUBST(GPG_ERROR_CFLAGS)
AC_SUBST(GPG_ERROR_LIBS)
+ AC_SUBST(GPG_ERROR_MT_CFLAGS)
+ AC_SUBST(GPG_ERROR_MT_LIBS)
])
diff --git a/src/Makefile.am b/src/Makefile.am
index 82f5327..b7ddbc1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@
## Process this file with automake to produce Makefile.in
-# Note: moc_kdpipeiodevice should actually be a dependcy below.
+# Note: moc_kdpipeiodevice should actually be a dependecy below.
EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
@@ -27,6 +27,8 @@ m4datadir = $(datadir)/aclocal
m4data_DATA = gpgme.m4
nodist_include_HEADERS = gpgme.h
+bin_PROGRAMS = gpgme-tool
+
if HAVE_PTHREAD
ltlib_gpgme_pthread = libgpgme-pthread.la
else
@@ -126,6 +128,9 @@ endif
AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @QT4_CORE_CFLAGS@
AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@
+gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
+
+
if HAVE_W32_SYSTEM
# Windows provides us with an endless stream of Tough Love. To spawn
# processes with a controlled set of inherited handles, we need a
@@ -201,9 +206,6 @@ libgpgme_qt_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
@GPG_ERROR_LIBS@ @QT4_CORE_LIBS@
endif
-noinst_PROGRAMS = gpgme-tool
-gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
-
install-data-local: install-def-file
uninstall-local: uninstall-def-file
diff --git a/src/Makefile.in b/src/Makefile.in
index cd55a3f..bd5f999 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -73,9 +73,9 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+bin_PROGRAMS = gpgme-tool$(EXEEXT)
@HAVE_W32CE_SYSTEM_TRUE@am__append_1 = w32-ce.h w32-ce.c
@HAVE_W32CE_SYSTEM_FALSE@@HAVE_W32_SYSTEM_TRUE@libexec_PROGRAMS = gpgme-w32spawn$(EXEEXT)
-noinst_PROGRAMS = gpgme-tool$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/gpgme-config.in $(srcdir)/gpgme.h.in \
@@ -122,9 +122,9 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" \
- "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" \
- "$(DESTDIR)$(includedir)"
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
@HAVE_W32_SYSTEM_TRUE@am__DEPENDENCIES_1 = versioninfo.lo
am__libgpgme_glib_la_SOURCES_DIST = util.h conversion.c get-env.c \
@@ -244,7 +244,7 @@ libgpgme_la_OBJECTS = $(am_libgpgme_la_OBJECTS)
libgpgme_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libgpgme_la_LDFLAGS) $(LDFLAGS) -o $@
-PROGRAMS = $(libexec_PROGRAMS) $(noinst_PROGRAMS)
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
gpgme_tool_SOURCES = gpgme-tool.c
gpgme_tool_OBJECTS = gpgme-tool.$(OBJEXT)
gpgme_tool_DEPENDENCIES = libgpgme.la
@@ -358,6 +358,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -406,6 +408,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
@@ -465,7 +468,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-# Note: moc_kdpipeiodevice should actually be a dependcy below.
+# Note: moc_kdpipeiodevice should actually be a dependecy below.
EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
@@ -544,6 +547,7 @@ libgpgme_pthread_la_SOURCES = $(main_sources) \
# versions, because then every object file is only compiled once.
AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @QT4_CORE_CFLAGS@
AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@
+gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
@HAVE_W32_SYSTEM_TRUE@RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
@HAVE_W32_SYSTEM_TRUE@LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
@HAVE_W32_SYSTEM_TRUE@SUFFIXES = .rc .lo
@@ -589,7 +593,6 @@ libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
@BUILD_W32_QT_TRUE@libgpgme_qt_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
@BUILD_W32_QT_TRUE@ @GPG_ERROR_LIBS@ @QT4_CORE_LIBS@
-gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
all: all-am
.SUFFIXES:
@@ -670,6 +673,52 @@ libgpgme-qt.la: $(libgpgme_qt_la_OBJECTS) $(libgpgme_qt_la_DEPENDENCIES) $(EXTRA
$(AM_V_CXXLD)$(libgpgme_qt_la_LINK) $(am_libgpgme_qt_la_rpath) $(libgpgme_qt_la_OBJECTS) $(libgpgme_qt_la_LIBADD) $(LIBS)
libgpgme.la: $(libgpgme_la_OBJECTS) $(libgpgme_la_DEPENDENCIES) $(EXTRA_libgpgme_la_DEPENDENCIES)
$(AM_V_CCLD)$(libgpgme_la_LINK) -rpath $(libdir) $(libgpgme_la_OBJECTS) $(libgpgme_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
@@ -716,15 +765,6 @@ clean-libexecPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
gpgme-tool$(EXEEXT): $(gpgme_tool_OBJECTS) $(gpgme_tool_DEPENDENCIES) $(EXTRA_gpgme_tool_DEPENDENCIES)
@rm -f gpgme-tool$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(gpgme_tool_OBJECTS) $(gpgme_tool_LDADD) $(LIBS)
@@ -1025,8 +1065,10 @@ check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
$(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -1061,8 +1103,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
- clean-libtool clean-noinstPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libexecPROGRAMS clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf $(DEPDIR) ./$(DEPDIR)
@@ -1089,8 +1131,8 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binSCRIPTS install-libLTLIBRARIES \
- install-libexecPROGRAMS
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-libLTLIBRARIES install-libexecPROGRAMS
install-html: install-html-am
@@ -1130,27 +1172,29 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \
- uninstall-libexecPROGRAMS uninstall-local uninstall-m4dataDATA \
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
+ uninstall-local uninstall-m4dataDATA \
uninstall-nodist_includeHEADERS
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool \
- clean-noinstPROGRAMS ctags distclean distclean-compile \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
+ clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-binSCRIPTS install-data install-data-am \
- install-data-local install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-libLTLIBRARIES install-libexecPROGRAMS \
- install-m4dataDATA install-man install-nodist_includeHEADERS \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ install-binPROGRAMS install-binSCRIPTS install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-libexecPROGRAMS install-m4dataDATA install-man \
+ install-nodist_includeHEADERS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-binSCRIPTS uninstall-libLTLIBRARIES \
uninstall-libexecPROGRAMS uninstall-local uninstall-m4dataDATA \
uninstall-nodist_includeHEADERS
diff --git a/src/debug.h b/src/debug.h
index c99b700..d0db573 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -187,8 +187,8 @@ _gpgme_trace_gpgme_error (gpgme_error_t err, const char *file, int line)
#define TRACE_ERR(err) \
err == 0 ? (TRACE_SUC ()) : \
- (_gpgme_debug (_gpgme_trace_level, "%s: error: %s <%s>\n", \
- _gpgme_trace_func, gpgme_strerror (err), \
+ (_gpgme_debug (_gpgme_trace_level, "%s:%d: error: %s <%s>\n", \
+ _gpgme_trace_func, __LINE__, gpgme_strerror (err), \
gpgme_strsource (err)), _gpgme_debug_frame_end (), (err))
/* The cast to void suppresses GCC warnings. */
#define TRACE_SYSRES(res) \
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 4df0f3e..30c3bfb 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -779,7 +779,7 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
argc++;
if (!gpg->cmd.used)
argc++; /* --batch */
- argc += 1; /* --no-sk-comment */
+ argc += 1; /* --no-sk-comments */
argv = calloc (argc + 1, sizeof *argv);
if (!argv)
@@ -864,7 +864,7 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
}
argc++;
}
- argv[argc] = strdup ("--no-sk-comment");
+ argv[argc] = strdup ("--no-sk-comments");
if (!argv[argc])
{
int saved_err = gpg_error_from_syserror ();
@@ -1242,10 +1242,26 @@ read_colon_line (engine_gpg_t gpg)
}
assert (gpg->colon.fnc);
- gpg->colon.fnc (gpg->colon.fnc_value, line ? line : buffer);
- if (line)
- free (line);
- }
+ if (line)
+ {
+ char *linep = line;
+ char *endp;
+
+ do
+ {
+ endp = strchr (linep, '\n');
+ if (endp)
+ *endp++ = 0;
+ gpg->colon.fnc (gpg->colon.fnc_value, linep);
+ linep = endp;
+ }
+ while (linep && *linep);
+
+ free (line);
+ }
+ else
+ gpg->colon.fnc (gpg->colon.fnc_value, buffer);
+ }
/* To reuse the buffer for the next line we have to
shift the remaining data to the buffer start and
@@ -2071,6 +2087,7 @@ gpg_keylist_preprocess (char *line, char **r_line)
#define NR_FIELDS 16
char *field[NR_FIELDS];
int fields = 0;
+ size_t n;
*r_line = NULL;
@@ -2106,16 +2123,34 @@ gpg_keylist_preprocess (char *line, char **r_line)
pub:<keyid>:<algo>:<keylen>:<creationdate>:<expirationdate>:<flags>
as defined in 5.2. Machine Readable Indexes of the OpenPGP
- HTTP Keyserver Protocol (draft).
+ HTTP Keyserver Protocol (draft). Modern versions of the SKS
+ keyserver return the fingerprint instead of the keyid. We
+ detect this here and use the v4 fingerprint format to convert
+ it to a key id.
We want:
pub:o<flags>:<keylen>:<algo>:<keyid>:<creatdate>:<expdate>::::::::
*/
- if (asprintf (r_line, "pub:o%s:%s:%s:%s:%s:%s::::::::",
- field[6], field[3], field[2], field[1],
- field[4], field[5]) < 0)
- return gpg_error_from_syserror ();
+ n = strlen (field[1]);
+ if (n > 16)
+ {
+ if (asprintf (r_line,
+ "pub:o%s:%s:%s:%s:%s:%s::::::::\n"
+ "fpr:::::::::%s:",
+ field[6], field[3], field[2], field[1] + n - 16,
+ field[4], field[5], field[1]) < 0)
+ return gpg_error_from_syserror ();
+ }
+ else
+ {
+ if (asprintf (r_line,
+ "pub:o%s:%s:%s:%s:%s:%s::::::::",
+ field[6], field[3], field[2], field[1],
+ field[4], field[5]) < 0)
+ return gpg_error_from_syserror ();
+ }
+
return 0;
case RT_UID:
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index f02fffa..d42179b 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -831,14 +831,17 @@ result_xml_escape (const char *data, char **buf)
membuf_t mb;
init_membuf (&mb, 128);
- data_len = strlen (data);
- for (i = 0; i < data_len; i++)
+ if (data)
{
- r = result_xml_escape_replacement (data[i]);
- if (r)
- put_membuf (&mb, r, strlen (r));
- else
- put_membuf (&mb, data+i, 1);
+ data_len = strlen (data);
+ for (i = 0; i < data_len; i++)
+ {
+ r = result_xml_escape_replacement (data[i]);
+ if (r)
+ put_membuf (&mb, r, strlen (r));
+ else
+ put_membuf (&mb, data+i, 1);
+ }
}
put_membuf (&mb, "", 1);
*buf = get_membuf (&mb, NULL);
@@ -3302,7 +3305,9 @@ cmd_keylist (assuan_context_t ctx, char *line)
while (subkey) {
result_xml_tag_start (&state, "subkey", NULL);
/* FIXME: more data */
- result_add_fpr (&state, "fpr", subkey->fpr);
+ result_add_keyid (&state, "keyid", subkey->keyid);
+ if (subkey->fpr)
+ result_add_fpr (&state, "fpr", subkey->fpr);
result_add_value (&state, "secret", subkey->secret);
result_add_value (&state, "is_cardkey", subkey->is_cardkey);
if (subkey->card_number)
diff --git a/src/gpgme.m4 b/src/gpgme.m4
index fe17f21..6c2be44 100644
--- a/src/gpgme.m4
+++ b/src/gpgme.m4
@@ -1,5 +1,5 @@
# gpgme.m4 - autoconf macro to detect GPGME.
-# Copyright (C) 2002, 2003, 2004 g10 Code GmbH
+# Copyright (C) 2002, 2003, 2004, 2014 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
@@ -8,6 +8,8 @@
# 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.
+#
+# Last-changed: 2014-10-02
AC_DEFUN([_AM_PATH_GPGME_CONFIG],
@@ -15,9 +17,25 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
AC_HELP_STRING([--with-gpgme-prefix=PFX],
[prefix where GPGME is installed (optional)]),
gpgme_config_prefix="$withval", gpgme_config_prefix="")
- if test "x$gpgme_config_prefix" != x ; then
- GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
+ if test x"${GPGME_CONFIG}" = x ; then
+ if test x"${gpgme_config_prefix}" != x ; then
+ GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config"
+ else
+ case "${SYSROOT}" in
+ /*)
+ if test -x "${SYSROOT}/bin/gpgme-config" ; then
+ GPGME_CONFIG="${SYSROOT}/bin/gpgme-config"
+ fi
+ ;;
+ '')
+ ;;
+ *)
+ AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+ ;;
+ esac
+ fi
fi
+
AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
if test "$GPGME_CONFIG" != "no" ; then
@@ -31,10 +49,35 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
])
+
+AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
+[
+ gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
+ if test x"$gpgme_config_host" != xnone ; then
+ if test x"$gpgme_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+***
+*** The config script $GPGME_CONFIG was
+*** built for $gpgme_config_host and thus may not match the
+*** used host $host.
+*** You may want to use the configure option --with-gpgme-prefix
+*** to specify a matching config script or use \$SYSROOT.
+***]])
+ gpg_config_script_warn="$gpg_config_script_warn gpgme"
+ fi
+ fi
+])
+
+
dnl AM_PATH_GPGME([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
dnl
+dnl If a prefix option is not used, the config script is first
+dnl searched in $SYSROOT/bin and then along $PATH. If the used
+dnl config script does not match the host specification the script
+dnl is added to the gpg_config_script_warn variable.
+dnl
AC_DEFUN([AM_PATH_GPGME],
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
tmp=ifelse([$1], ,1:0.4.2,$1)
@@ -57,7 +100,7 @@ AC_DEFUN([AM_PATH_GPGME],
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
if test "$gpgme_version_major" -gt "$req_major"; then
ok=yes
- else
+ else
if test "$gpgme_version_major" -eq "$req_major"; then
if test "$gpgme_version_minor" -gt "$req_minor"; then
ok=yes
@@ -88,6 +131,7 @@ AC_DEFUN([AM_PATH_GPGME],
GPGME_LIBS=`$GPGME_CONFIG --libs`
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
else
GPGME_CFLAGS=""
GPGME_LIBS=""
@@ -126,7 +170,7 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
if test "$gpgme_version_major" -gt "$req_major"; then
ok=yes
- else
+ else
if test "$gpgme_version_major" -eq "$req_major"; then
if test "$gpgme_version_minor" -gt "$req_minor"; then
ok=yes
@@ -158,6 +202,7 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
else
GPGME_PTHREAD_CFLAGS=""
GPGME_PTHREAD_LIBS=""
@@ -195,7 +240,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
if test "$gpgme_version_major" -gt "$req_major"; then
ok=yes
- else
+ else
if test "$gpgme_version_major" -eq "$req_major"; then
if test "$gpgme_version_minor" -gt "$req_minor"; then
ok=yes
@@ -226,6 +271,7 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
else
GPGME_GLIB_CFLAGS=""
GPGME_GLIB_LIBS=""
@@ -235,4 +281,3 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
AC_SUBST(GPGME_GLIB_CFLAGS)
AC_SUBST(GPGME_GLIB_LIBS)
])
-
diff --git a/src/sign.c b/src/sign.c
index c55441d..ffbde56 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -55,11 +55,23 @@ typedef struct
static void
+release_signatures (gpgme_new_signature_t sig)
+{
+ while (sig)
+ {
+ gpgme_new_signature_t next = sig->next;
+ free (sig->fpr);
+ free (sig);
+ sig = next;
+ }
+}
+
+
+static void
release_op_data (void *hook)
{
op_data_t opd = (op_data_t) hook;
gpgme_invalid_key_t invalid_signer = opd->result.invalid_signers;
- gpgme_new_signature_t sig = opd->result.signatures;
while (invalid_signer)
{
@@ -70,13 +82,7 @@ release_op_data (void *hook)
invalid_signer = next;
}
- while (sig)
- {
- gpgme_new_signature_t next = sig->next;
- free (sig->fpr);
- free (sig);
- sig = next;
- }
+ release_signatures (opd->result.signatures);
}
@@ -86,6 +92,10 @@ gpgme_op_sign_result (gpgme_ctx_t ctx)
void *hook;
op_data_t opd;
gpgme_error_t err;
+ gpgme_invalid_key_t inv_key, key;
+ gpgme_new_signature_t sig;
+ unsigned int inv_signers = 0;
+ unsigned int signatures = 0;
TRACE_BEG (DEBUG_CTX, "gpgme_op_sign_result", ctx);
@@ -97,49 +107,81 @@ gpgme_op_sign_result (gpgme_ctx_t ctx)
return NULL;
}
- if (_gpgme_debug_trace ())
- {
- gpgme_invalid_key_t inv_key = opd->result.invalid_signers;
- gpgme_new_signature_t sig = opd->result.signatures;
- int inv_signers = 0;
- int signatures = 0;
+ for (inv_key = opd->result.invalid_signers; inv_key; inv_key = inv_key->next)
+ inv_signers++;
+ for (sig = opd->result.signatures; sig; sig = sig->next)
+ signatures++;
- while (inv_key)
- {
- inv_signers++;
- inv_key = inv_key->next;
- }
- while (sig)
- {
- signatures++;
- sig = sig->next;
- }
+ if (gpgme_signers_count (ctx)
+ && signatures + inv_signers != gpgme_signers_count (ctx))
+ {
+ /* In this case at least one signatures was not created perhaps
+ due to a bad passphrase etc. Thus the entire message is
+ broken and should not be used. We add the already created
+ signatures to the invalid signers list and thus this case can
+ be detected. */
+ TRACE_LOG3 ("result: invalid signers: %u, signatures: %u, count: %u",
+ inv_signers, signatures, gpgme_signers_count (ctx));
+
+ for (sig = opd->result.signatures; sig; sig = sig->next)
+ {
+ key = calloc (1, sizeof *key);
+ if (!key)
+ {
+ TRACE_SUC0 ("out of core; result=(null)");
+ return NULL;
+ }
+ if (sig->fpr)
+ {
+ key->fpr = strdup (sig->fpr);
+ if (!key->fpr)
+ {
+ free (key);
+ TRACE_SUC0 ("out of core; result=(null)");
+ return NULL;
+ }
+ }
+ key->reason = GPG_ERR_GENERAL;
+
+ inv_key = opd->result.invalid_signers;
+ if (inv_key)
+ {
+ for (; inv_key->next; inv_key = inv_key->next)
+ ;
+ inv_key->next = key;
+ }
+ else
+ opd->result.invalid_signers = key;
+ }
+
+ release_signatures (opd->result.signatures);
+ opd->result.signatures = NULL;
+ }
+ if (_gpgme_debug_trace())
+ {
TRACE_LOG2 ("result: invalid signers: %i, signatures: %i",
inv_signers, signatures);
- inv_key = opd->result.invalid_signers;
- while (inv_key)
+ for (inv_key=opd->result.invalid_signers; inv_key; inv_key=inv_key->next)
{
TRACE_LOG3 ("result: invalid signer: fpr=%s, reason=%s <%s>",
inv_key->fpr, gpgme_strerror (inv_key->reason),
gpgme_strsource (inv_key->reason));
- inv_key = inv_key->next;
}
- sig = opd->result.signatures;
- while (sig)
+ for (sig = opd->result.signatures; sig; sig = sig->next)
{
TRACE_LOG6 ("result: signature: type=%i, pubkey_algo=%i, "
"hash_algo=%i, timestamp=%li, fpr=%s, sig_class=%i",
sig->type, sig->pubkey_algo, sig->hash_algo,
sig->timestamp, sig->fpr, sig->sig_class);
- sig = sig->next;
}
- }
+ }
TRACE_SUC1 ("result=%p", &opd->result);
return &opd->result;
}
+
static gpgme_error_t
parse_sig_created (char *args, gpgme_new_signature_t *sigp,
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 90fcb02..e849c26 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -256,6 +256,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -304,6 +306,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index e72bd49..5c1266e 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -43,7 +43,7 @@ TESTS = initial.test $(c_tests) final.test
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
+ random_seed S.gpg-agent .gpg-v21-migrated
private_keys = \
13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \
@@ -70,7 +70,7 @@ clean-local:
-$(srcdir)/start-stop-agent --stop
-rm -fR private-keys-v1.d
-all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \
+check-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \
./private-keys-v1.d/gpg-sample.stamp
export GNUPGHOME := $(abs_builddir)
diff --git a/tests/gpg/Makefile.in b/tests/gpg/Makefile.in
index 8513d08..4105268 100644
--- a/tests/gpg/Makefile.in
+++ b/tests/gpg/Makefile.in
@@ -287,6 +287,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -335,6 +337,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
@@ -409,7 +412,7 @@ c_tests = \
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
+ random_seed S.gpg-agent .gpg-v21-migrated
private_keys = \
13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \
@@ -768,9 +771,9 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS) all-local
+all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
@@ -876,7 +879,7 @@ uninstall-am:
.MAKE: check-am install-am install-strip
-.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \
clean clean-generic clean-libtool clean-local \
clean-noinstPROGRAMS ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
@@ -895,7 +898,7 @@ clean-local:
-$(srcdir)/start-stop-agent --stop
-rm -fR private-keys-v1.d
-all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \
+check-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \
./private-keys-v1.d/gpg-sample.stamp
export GNUPGHOME := $(abs_builddir)
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 45b3b50..ecc53a6 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -47,7 +47,8 @@ clean-local:
-gpg-connect-agent KILLAGENT /bye
-rm -fR private-keys-v1.d
-all-local: ./pubring.kbx ./gpgsm.conf ./private-keys-v1.d/$(key_id).key ./trustlist.txt
+check-local: ./pubring.kbx ./gpgsm.conf \
+ ./private-keys-v1.d/$(key_id).key ./trustlist.txt
export GNUPGHOME := $(abs_builddir)
diff --git a/tests/gpgsm/Makefile.in b/tests/gpgsm/Makefile.in
index 2aba85f..5626612 100644
--- a/tests/gpgsm/Makefile.in
+++ b/tests/gpgsm/Makefile.in
@@ -230,6 +230,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -278,6 +280,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@
@@ -643,9 +646,9 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS) all-local
+all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
@@ -751,7 +754,7 @@ uninstall-am:
.MAKE: check-am install-am install-strip
-.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-local \
clean clean-generic clean-libtool clean-local \
clean-noinstPROGRAMS ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
@@ -770,7 +773,8 @@ clean-local:
-gpg-connect-agent KILLAGENT /bye
-rm -fR private-keys-v1.d
-all-local: ./pubring.kbx ./gpgsm.conf ./private-keys-v1.d/$(key_id).key ./trustlist.txt
+check-local: ./pubring.kbx ./gpgsm.conf \
+ ./private-keys-v1.d/$(key_id).key ./trustlist.txt
export GNUPGHOME := $(abs_builddir)
diff --git a/tests/opassuan/Makefile.in b/tests/opassuan/Makefile.in
index bc45cbf..fcb92bc 100644
--- a/tests/opassuan/Makefile.in
+++ b/tests/opassuan/Makefile.in
@@ -183,6 +183,8 @@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
+GPG_ERROR_MT_CFLAGS = @GPG_ERROR_MT_CFLAGS@
+GPG_ERROR_MT_LIBS = @GPG_ERROR_MT_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -231,6 +233,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+SYSROOT = @SYSROOT@
VERSION = @VERSION@
VERSION_NUMBER = @VERSION_NUMBER@
abs_builddir = @abs_builddir@