summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:34 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:34 +0900
commit670d9afb902f264b6410d307c429f02ed8685fd3 (patch)
tree50ffa1fcf45ac864a0ecbed8b61b686c986d3cd8
parent8c4d36ec6eea1511a5241521c1001ebc56d00d6a (diff)
downloadgpgme-670d9afb902f264b6410d307c429f02ed8685fd3.tar.gz
gpgme-670d9afb902f264b6410d307c429f02ed8685fd3.tar.bz2
gpgme-670d9afb902f264b6410d307c429f02ed8685fd3.zip
Imported Upstream version 1.4.2upstream/1.4.2
-rw-r--r--ChangeLog87
-rw-r--r--NEWS16
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--build-aux/ltmain.sh6
-rwxr-xr-xconfigure82
-rw-r--r--configure.ac44
-rw-r--r--doc/gpgme.info222
-rw-r--r--doc/gpgme.info-173
-rw-r--r--doc/gpgme.info-28
-rw-r--r--doc/gpgme.texi70
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--gpgme.spec2
-rw-r--r--lang/cl/gpgme.asd2
-rw-r--r--m4/libtool.m48
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Makefile.in1
-rw-r--r--src/assuan-support.c4
-rw-r--r--src/ath-pthread.c10
-rw-r--r--src/ath.c11
-rw-r--r--src/ath.h10
-rw-r--r--src/data-compat.c8
-rw-r--r--src/data-fd.c8
-rw-r--r--src/data-mem.c8
-rw-r--r--src/data-stream.c8
-rw-r--r--src/data-user.c8
-rw-r--r--src/data.c20
-rw-r--r--src/data.h17
-rw-r--r--src/debug.c15
-rw-r--r--src/encrypt-sign.c26
-rw-r--r--src/engine-gpg.c23
-rw-r--r--src/engine-gpgsm.c2
-rw-r--r--src/engine-uiserver.c2
-rw-r--r--src/gpgme-tool.c11
-rw-r--r--src/gpgme.c4
-rw-r--r--src/gpgme.h.in28
-rw-r--r--src/w32-io.c219
-rw-r--r--tests/gpg/t-encrypt-sign.c28
-rw-r--r--tests/gpgsm/t-verify.c2
40 files changed, 697 insertions, 419 deletions
diff --git a/ChangeLog b/ChangeLog
index ca16062..d360a18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,90 @@
+2013-05-28 Werner Koch <wk@gnupg.org>
+
+ Release 1.4.2.
+ * configure.ac: Set LT version to C21/A10/R0.
+
+ Add convenience macro GPGME_PROTOCOL_OPENPGP.
+ * src/gpgme.h.in (GPGME_PROTOCOL_OPENPGP): New.
+
+2013-05-23 Werner Koch <wk@gnupg.org>
+
+ w32: Fix installing of .def file.
+ * src/Makefile.am (install-def-file): Create libdir first.
+
+ Fix libtool 2.4.2 to correctly detect .def files.
+ * build-aux/ltmain.sh (sed_uncomment_deffile): New.
+ (orig_export_symbols): Uncomment def file before testing for EXPORTS.
+ * m4/libtool.m4: Do the same for the generated code.
+
+2013-05-22 Werner Koch <wk@gnupg.org>
+
+ Support --no-encrypt-to also with gpgme_op_encrypt_sign.
+ * src/engine-gpg.c (gpg_encrypt_sign): Support the
+ GPGME_ENCRYPT_NO_ENCRYPT_TO flag.
+
+2013-05-22 Werner Koch <wk@gnupg.org>
+ Kyle L. Huff <g10bts@curetheitch.com>
+
+ Allow symmetric encryption with gpgme_op_encrypt_sign.
+ * src/encrypt-sign.c (encrypt_sym_status_handler): New.
+ (encrypt_sign_start): Handle recp == NULL case.
+ * src/engine-gpg.c (gpg_encrypt_sign): Implement symmetric encryption.
+ * tests/gpg/t-encrypt-sign.c (main): Add a test case for this.
+
+2013-05-22 Werner Koch <wk@gnupg.org>
+
+ gpgme-tool: Allow for symmetric encryption.
+ * src/gpgme-tool.c (gt_sign_encrypt): Pass NULL for recp if no
+ recipients are given.
+
+ tests: Print auditlog in plain text format.
+ * tests/gpgsm/t-verify.c (show_auditlog): Use plain text format.
+
+2013-05-18 Werner Koch <wk@gnupg.org>
+
+ Improve C++ compatibility of previous patch.
+ * src/gpgme.h.in: Move gpgme_sssize_t and gpgme_off_t typedefs into
+ the extern "C" scope.
+
+2013-05-16 Werner Koch <wk@gnupg.org>
+
+ Make definition of off_t robust against misbehaving w32 toolchains.
+ * configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t
+ and gpgme_ssize_t.
+ (API__OFF_T, API__SSIZE_T): New ac_subst.
+ * src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros.
+ * src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h
+ * src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c
+ * src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c
+ * src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t
+ by gpgme_off_t and sszie_t by gpgme_ssize_t.
+ * src/ath-pthread.c, src/ath.h: Include gpgme.h.
+
+2013-05-11 Werner Koch <wk@gnupg.org>
+
+ w32: Change the way the I/O threads are cleaned up.
+ * src/w32-io.c (reader_context_s, create_reader)
+ (writer_context_s, create_writer): Rename STOPPED to CLOSE_EV.
+ (reader, writer): Remove setting of STOPPED. Wait for CLOSE_EV and
+ then release the context.
+ (destroy_reader, destroy_writer): Do not wait but set the CLOSE_EV.
+ (kill_reader, kill_writer): Remove.
+ (_gpgme_io_close): Add code from kill_reader and kill_writer.
+
+2013-05-08 Werner Koch <wk@gnupg.org>
+
+ Fix hang in socket closing.
+ * src/w32-io.c (destroy_reader): Call shutdown.
+ (reader): Do not print an error in the shutdown case.
+
+ Improve debug output of the I/O reader and writer.
+ * src/w32-io.c (reader, writer): Also print file_sock.
+
+2013-05-06 Werner Koch <wk@gnupg.org>
+
+ Simplify a debug code function.
+ * src/debug.c (_gpgme_debug): Remove static space string.
+
2013-05-01 Werner Koch <wk@gnupg.org>
Release 1.4.1.
diff --git a/NEWS b/NEWS
index 39acc46..7df3cd2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+Noteworthy changes in version 1.4.2 (2013-05-28)
+------------------------------------------------
+
+ * Allow symmetric encryption with gpgme_op_encrypt_sign.
+
+ * Fixed mismatching off_t definitions on Windows.
+
+ * Interface changes relative to the 1.4.1 release:
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ gpgme_off_t NEW.
+ gpgme_size_t NEW.
+ GPGME_PROTOCOL_OPENPGP NEW alias.
+
+
Noteworthy changes in version 1.4.1 (2013-05-01)
------------------------------------------------
@@ -1015,7 +1029,7 @@ gpgme_trust_item_release DEPRECATED: Use gpgme_trust_item_unref.
gpgme_trust_item_get_string_attr DEPRECATED
gpgme_trust_item_get_ulong_attr DEPRECATED
gpgme_get_key CHANGED: Removed force_update argument.
-gpgme_sub_key_t NEW
+gpgme_subkey_t NEW
gpgme_key_sig_t NEW
gpgme_user_id_t NEW
gpgme_key_t CHANGED: Now has user accessible data members.
diff --git a/README b/README
index 59dfdca..e886647 100644
--- a/README
+++ b/README
@@ -57,6 +57,10 @@ If configure can't find the `gpgsm' binary in your path, you can
specify the location with the --with-gpgsm=/path/to/gpgsm argument to
configure.
+On some platforms GPGME based applications might hang at certain
+operations when using GPGME_PROTOCOL_CMS. A workaround for this
+problem is to build with the configure option --disable-fd-passing.
+
For building the GIT version of GPGME please see the file README.GIT
for more information.
diff --git a/VERSION b/VERSION
index 347f583..9df886c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.4.1
+1.4.2
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 905e09a..859599a 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -411,6 +411,10 @@ sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
# (escaped) backslashes. A very naive implementation.
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+# Sed substitution to remove simple comments and empty
+# lines from a Windows .def file.
+sed_uncomment_deffile='/^;/d; /^[ ]*$/d'
+
# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.
@@ -8143,7 +8147,7 @@ EOF
cygwin* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ if test "x`$SED "$sed_uncomment_deffile" $export_symbols | $SED 1q`" != xEXPORTS; then
# and it's NOT already a .def file. Must figure out
# which of the given symbols are data symbols and tag
# them as such. So, trigger use of export_symbols_cmds.
diff --git a/configure b/configure
index 1241945..bc46a58 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.4.1.
+# Generated by GNU Autoconf 2.69 for gpgme 1.4.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.4.1'
-PACKAGE_STRING='gpgme 1.4.1'
+PACKAGE_VERSION='1.4.2'
+PACKAGE_STRING='gpgme 1.4.2'
PACKAGE_BUGREPORT='http://bugs.gnupg.org'
PACKAGE_URL=''
@@ -676,6 +676,8 @@ GPG_ERROR_CFLAGS
GPG_ERROR_CONFIG
GLIBC21
LIBOBJS
+API__SSIZE_T
+API__OFF_T
INSERT__TYPEDEFS_FOR_GPGME_H
NEED__FILE_OFFSET_BITS
BUILD_TIMESTAMP
@@ -1418,7 +1420,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.4.1 to adapt to many kinds of systems.
+\`configure' configures gpgme 1.4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1488,7 +1490,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gpgme 1.4.1:";;
+ short | recursive ) echo "Configuration of gpgme 1.4.2:";;
esac
cat <<\_ACEOF
@@ -1618,7 +1620,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gpgme configure 1.4.1
+gpgme configure 1.4.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2448,7 +2450,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.4.1, which was
+It was created by gpgme $as_me 1.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2811,11 +2813,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
#
-LIBGPGME_LT_CURRENT=20
+LIBGPGME_LT_CURRENT=21
# 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=9
-LIBGPGME_LT_REVISION=1
+LIBGPGME_LT_AGE=10
+LIBGPGME_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
@@ -3300,7 +3302,7 @@ fi
# Define the identity of the package.
PACKAGE='gpgme'
- VERSION='1.4.1'
+ VERSION='1.4.2'
cat >>confdefs.h <<_ACEOF
@@ -5993,7 +5995,7 @@ cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
-VERSION_NUMBER=0x010401
+VERSION_NUMBER=0x010402
# Don't default to build static libs.
@@ -10682,7 +10684,7 @@ _LT_EOF
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
@@ -11143,7 +11145,7 @@ fi
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -14082,7 +14084,7 @@ fi
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds_CXX='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -14123,7 +14125,7 @@ fi
archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ archive_expsym_cmds_CXX='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
@@ -17321,7 +17323,7 @@ fi
#
# Provide information about the build.
#
-BUILD_REVISION="5075c0d"
+BUILD_REVISION="009e26a"
cat >>confdefs.h <<_ACEOF
@@ -17330,7 +17332,7 @@ _ACEOF
BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
-BUILD_FILEVERSION="${BUILD_FILEVERSION}20597"
+BUILD_FILEVERSION="${BUILD_FILEVERSION}158"
BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
@@ -17721,26 +17723,32 @@ fi
# Figure out platform dependent typedefs for gpgme.h
if test "$have_w32_system" = yes; then
- if test "$have_w64_system" = yes; then
- INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 64 bit W32 API. */
-#include <basetsd.h>
-typedef long off_t;
-typedef __int64 ssize_t;"
- else
- INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 32 bit W32 API. */
-#ifndef _OFF_T_DEFINED /* Defined by newer mingw32 toolkits. */
-typedef long off_t;
-#endif
-#ifndef _SSIZE_T_DEFINED /* Defined by newer mingw32 toolkits. */
-typedef long ssize_t;
-#endif"
- fi
-else
- INSERT__TYPEDEFS_FOR_GPGME_H="#include <sys/types.h>"
+ INSERT__TYPEDEFS_FOR_GPGME_H="
+#ifdef _WIN64
+# include <stdint.h>
+ typedef int64_t gpgme_off_t;
+ typedef int64_t gpgme_ssize_t;
+#else /* _WIN32 */
+ typedef long gpgme_off_t;
+ typedef long gpgme_ssize_t;
+#endif /* _WIN32 */"
+ API__OFF_T="gpgme_off_t"
+ API__SSIZE_T="gpgme_ssize_t"
+else
+ INSERT__TYPEDEFS_FOR_GPGME_H="
+#include <sys/types.h>
+typedef off_t gpgme_off_t;
+typedef ssize_t gpgme_ssize_t;"
+ API__OFF_T="off_t"
+ API__SSIZE_T="ssize_t"
fi
+
+
+
+
# Checks for compiler features.
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
@@ -20314,7 +20322,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.4.1, which was
+This file was extended by gpgme $as_me 1.4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20380,7 +20388,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.4.1
+gpgme config.status 1.4.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -22674,7 +22682,7 @@ fi
echo "
GPGME v${VERSION} has been configured as follows:
- Revision: 5075c0d (20597)
+ Revision: 009e26a (158)
Platform: $host
GnuPG path: $GPG
diff --git a/configure.ac b/configure.ac
index 5dee0aa..30392b8 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, [4])
-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
@@ -55,11 +55,11 @@ AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org])
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
#
-LIBGPGME_LT_CURRENT=20
+LIBGPGME_LT_CURRENT=21
# 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=9
-LIBGPGME_LT_REVISION=1
+LIBGPGME_LT_AGE=10
+LIBGPGME_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
@@ -282,25 +282,31 @@ AC_SUBST(NEED__FILE_OFFSET_BITS)
# Figure out platform dependent typedefs for gpgme.h
if test "$have_w32_system" = yes; then
- if test "$have_w64_system" = yes; then
- INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 64 bit W32 API. */
-#include <basetsd.h>
-typedef long off_t;
-typedef __int64 ssize_t;"
- else
- INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 32 bit W32 API. */
-#ifndef _OFF_T_DEFINED /* Defined by newer mingw32 toolkits. */
-typedef long off_t;
-#endif
-#ifndef _SSIZE_T_DEFINED /* Defined by newer mingw32 toolkits. */
-typedef long ssize_t;
-#endif"
- fi
+ INSERT__TYPEDEFS_FOR_GPGME_H="
+#ifdef _WIN64
+# include <stdint.h>
+ typedef int64_t gpgme_off_t;
+ typedef int64_t gpgme_ssize_t;
+#else /* _WIN32 */
+ typedef long gpgme_off_t;
+ typedef long gpgme_ssize_t;
+#endif /* _WIN32 */"
+ API__OFF_T="gpgme_off_t"
+ API__SSIZE_T="gpgme_ssize_t"
else
- INSERT__TYPEDEFS_FOR_GPGME_H="#include <sys/types.h>"
+ INSERT__TYPEDEFS_FOR_GPGME_H="
+#include <sys/types.h>
+typedef off_t gpgme_off_t;
+typedef ssize_t gpgme_ssize_t;"
+ API__OFF_T="off_t"
+ API__SSIZE_T="ssize_t"
fi
AC_SUBST(INSERT__TYPEDEFS_FOR_GPGME_H)
AM_SUBST_NOTMAKE(INSERT__TYPEDEFS_FOR_GPGME_H)
+AC_SUBST(API__OFF_T)
+AM_SUBST_NOTMAKE(API__OFF_T)
+AC_SUBST(API__SSIZE_T)
+AM_SUBST_NOTMAKE(API__SSIZE_T)
# Checks for compiler features.
if test "$GCC" = yes; then
diff --git a/doc/gpgme.info b/doc/gpgme.info
index 2ec045e..5ac6f47 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.4.1, last updated 30 April 2013, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.4.1.
+ This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made
+Easy' Reference Manual', for Version 1.4.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013 g10 Code GmbH.
@@ -41,117 +41,117 @@ General Public License for more details.

Indirect:
-gpgme.info-1: 1758
-gpgme.info-2: 279278
+gpgme.info-1: 1756
+gpgme.info-2: 281093

Tag Table:
(Indirect)
-Node: Top1758
-Node: Introduction8599
-Node: Getting Started9386
-Node: Features10511
-Node: Overview11661
-Node: Preparation12770
-Node: Header13767
-Node: Building the Source14466
-Node: Largefile Support (LFS)16575
-Node: Using Automake20579
-Node: Using Libtool22215
-Node: Library Version Check22565
-Node: Signal Handling26520
-Node: Multi Threading27736
-Ref: Multi Threading-Footnote-129918
-Node: Protocols and Engines30332
-Node: Engine Version Check32681
-Node: Engine Information33258
-Node: Engine Configuration36958
-Node: OpenPGP38220
-Node: Cryptographic Message Syntax38556
-Node: Algorithms38850
-Ref: Algorithms-Footnote-139329
-Node: Public Key Algorithms39457
-Node: Hash Algorithms41388
-Node: Error Handling42486
-Node: Error Values44348
-Node: Error Sources49426
-Node: Error Codes51753
-Node: Error Strings56392
-Node: Exchanging Data58171
-Node: Creating Data Buffers59485
-Node: Memory Based Data Buffers60001
-Node: File Based Data Buffers63355
-Node: Callback Based Data Buffers65526
-Node: Destroying Data Buffers71082
-Node: Manipulating Data Buffers72441
-Node: Data Buffer I/O Operations72860
-Node: Data Buffer Meta-Data75563
-Node: Contexts78913
-Node: Creating Contexts80036
-Node: Destroying Contexts80847
-Node: Result Management81182
-Node: Context Attributes82588
-Node: Protocol Selection83366
-Node: Crypto Engine84378
-Node: ASCII Armor86199
-Node: Text Mode86811
-Node: Included Certificates87742
-Node: Key Listing Mode89117
-Node: Passphrase Callback92474
-Node: Progress Meter Callback95612
-Node: Locale97536
-Node: Key Management99075
-Node: Listing Keys109003
-Node: Information About Keys116265
-Node: Key Signatures124263
-Node: Manipulating Keys128275
-Node: Generating Keys129117
-Node: Exporting Keys133724
-Node: Importing Keys139623
-Ref: Importing Keys-Footnote-1146786
-Node: Deleting Keys146914
-Node: Changing Passphrases148311
-Node: Advanced Key Editing149572
-Node: Trust Item Management152676
-Node: Listing Trust Items153746
-Node: Information About Trust Items156044
-Node: Manipulating Trust Items157926
-Node: Crypto Operations158887
-Node: Decrypt160131
-Node: Verify163989
-Node: Decrypt and Verify181845
-Node: Sign183849
-Node: Selecting Signers184413
-Node: Creating a Signature185394
-Node: Signature Notation Data189983
-Node: Encrypt192167
-Node: Encrypting a Plaintext192523
-Node: Run Control198368
-Node: Waiting For Completion199115
-Node: Using External Event Loops201161
-Node: I/O Callback Interface203128
-Node: Registering I/O Callbacks208222
-Node: I/O Callback Example210213
-Node: I/O Callback Example GTK+216432
-Node: I/O Callback Example GDK218221
-Node: I/O Callback Example Qt219863
-Node: Cancellation222151
-Node: UI Server Protocol224404
-Ref: UI Server Protocol-Footnote-1225835
-Node: UI Server Encrypt225954
-Node: UI Server Sign231135
-Node: UI Server Decrypt233364
-Node: UI Server Verify234802
-Node: UI Server Set Input Files238304
-Node: UI Server Sign/Encrypt Files239104
-Node: UI Server Verify/Decrypt Files240873
-Node: UI Server Import/Export Keys242719
-Node: UI Server Checksum Files243752
-Node: Miscellaneous UI Server Commands245918
-Ref: command SENDER247830
-Node: Debugging249506
-Node: Library Copying251161
-Node: Copying279278
-Node: Function and Data Index316909
-Node: Concept Index342025
+Node: Top1756
+Node: Introduction8595
+Node: Getting Started9382
+Node: Features10507
+Node: Overview11657
+Node: Preparation12766
+Node: Header13763
+Node: Building the Source14462
+Node: Largefile Support (LFS)16571
+Node: Using Automake21882
+Node: Using Libtool23518
+Node: Library Version Check23868
+Node: Signal Handling27823
+Node: Multi Threading29039
+Ref: Multi Threading-Footnote-131221
+Node: Protocols and Engines31635
+Node: Engine Version Check33984
+Node: Engine Information34561
+Node: Engine Configuration38261
+Node: OpenPGP39523
+Node: Cryptographic Message Syntax39859
+Node: Algorithms40153
+Ref: Algorithms-Footnote-140632
+Node: Public Key Algorithms40760
+Node: Hash Algorithms42691
+Node: Error Handling43789
+Node: Error Values45651
+Node: Error Sources50729
+Node: Error Codes53056
+Node: Error Strings57695
+Node: Exchanging Data59474
+Node: Creating Data Buffers61303
+Node: Memory Based Data Buffers61819
+Node: File Based Data Buffers65173
+Node: Callback Based Data Buffers67344
+Node: Destroying Data Buffers72900
+Node: Manipulating Data Buffers74259
+Node: Data Buffer I/O Operations74678
+Node: Data Buffer Meta-Data77381
+Node: Contexts80731
+Node: Creating Contexts81854
+Node: Destroying Contexts82665
+Node: Result Management83000
+Node: Context Attributes84406
+Node: Protocol Selection85184
+Node: Crypto Engine86196
+Node: ASCII Armor88017
+Node: Text Mode88629
+Node: Included Certificates89560
+Node: Key Listing Mode90935
+Node: Passphrase Callback94292
+Node: Progress Meter Callback97430
+Node: Locale99354
+Node: Key Management100893
+Node: Listing Keys110818
+Node: Information About Keys118080
+Node: Key Signatures126078
+Node: Manipulating Keys130090
+Node: Generating Keys130932
+Node: Exporting Keys135539
+Node: Importing Keys141438
+Ref: Importing Keys-Footnote-1148601
+Node: Deleting Keys148729
+Node: Changing Passphrases150126
+Node: Advanced Key Editing151387
+Node: Trust Item Management154491
+Node: Listing Trust Items155561
+Node: Information About Trust Items157859
+Node: Manipulating Trust Items159741
+Node: Crypto Operations160702
+Node: Decrypt161946
+Node: Verify165804
+Node: Decrypt and Verify183660
+Node: Sign185664
+Node: Selecting Signers186228
+Node: Creating a Signature187209
+Node: Signature Notation Data191798
+Node: Encrypt193982
+Node: Encrypting a Plaintext194338
+Node: Run Control200183
+Node: Waiting For Completion200930
+Node: Using External Event Loops202976
+Node: I/O Callback Interface204943
+Node: Registering I/O Callbacks210037
+Node: I/O Callback Example212028
+Node: I/O Callback Example GTK+218247
+Node: I/O Callback Example GDK220036
+Node: I/O Callback Example Qt221678
+Node: Cancellation223966
+Node: UI Server Protocol226219
+Ref: UI Server Protocol-Footnote-1227650
+Node: UI Server Encrypt227769
+Node: UI Server Sign232950
+Node: UI Server Decrypt235179
+Node: UI Server Verify236617
+Node: UI Server Set Input Files240119
+Node: UI Server Sign/Encrypt Files240919
+Node: UI Server Verify/Decrypt Files242688
+Node: UI Server Import/Export Keys244534
+Node: UI Server Checksum Files245567
+Node: Miscellaneous UI Server Commands247733
+Ref: command SENDER249645
+Node: Debugging251321
+Node: Library Copying252976
+Node: Copying281093
+Node: Function and Data Index318724
+Node: Concept Index343986

End Tag Table
diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1
index beb3286..2066b90 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.4.1, last updated 30 April 2013, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.4.1.
+ This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made
+Easy' Reference Manual', for Version 1.4.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013 g10 Code GmbH.
@@ -45,8 +45,8 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir)
Main Menu
*********
-This is Edition 1.4.1, last updated 30 April 2013, of `The `GnuPG Made
-Easy' Reference Manual', for Version 1.4.1 of the GPGME library.
+This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made
+Easy' Reference Manual', for Version 1.4.2 of the GPGME library.
* Menu:
@@ -444,18 +444,38 @@ support by default and just use that. The compatibility modes (small
file sizes or dual mode) can be considered an historic artefact, only
useful to allow for a transitional period.
- GPGME is compiled using largefile support by default. This means
-that your application must do the same, at least as far as it is
-relevant for using the `gpgme.h' header file. All types in this header
-files refer to their largefile counterparts, if they are different from
-any default types on the system.
-
- You can enable largefile support, if it is different from the default
-on the system the application is compiled on, by using the Autoconf
-macro `AC_SYS_LARGEFILE'. If you do this, then you don't need to worry
-about anything else: It will just work. In this case you might also
-want to use `AC_FUNC_FSEEKO' to take advantage of some new interfaces,
-and `AC_TYPE_OFF_T' (just in case).
+ On POSIX platforms GPGME is compiled using largefile support by
+default. This means that your application must do the same, at least
+as far as it is relevant for using the `gpgme.h' header file. All
+types in this header files refer to their largefile counterparts, if
+they are different from any default types on the system.
+
+ On 32 and 64 bit Windows platforms `off_t' is declared as 32 bit
+signed integer. There is no specific support for LFS in the C library.
+The recommendation from Microsoft is to use the native interface
+(`CreateFile' et al.) for large files. Released binary versions of
+GPGME (libgpgme-11.dll) have always been build with a 32 bit `off_t'.
+To avoid an ABI break we stick to this convention for 32 bit Windows by
+using `long' there. GPGME versions for 64 bit Windows have never been
+released and thus we are able to use `int64_t' instead of `off_t'
+there. For easier migration the typedef `gpgme_off_t' has been
+defined. The reason we cannot use `off_t' directly is that some
+toolchains (e.g. mingw64) introduce a POSIX compatible hack for
+`off_t'. Some widely used toolkits make use of this hack and in turn
+GPGME would need to use it also. However, this would introduce an ABI
+break and existing software making use of libgpgme might suffer from a
+severe break. Thus with version 1.4.2 we redefined all functions using
+`off_t' to use `gpgme_off_t' which is defined as explained above. This
+way we keep the ABI well defined and independent of any toolchain
+hacks. The bottom line is that LFS support in GPGME is only available
+on 64 bit versions of Windows.
+
+ On POSIX platforms you can enable largefile support, if it is
+different from the default on the system the application is compiled
+on, by using the Autoconf macro `AC_SYS_LARGEFILE'. If you do this,
+then you don't need to worry about anything else: It will just work.
+In this case you might also want to use `AC_FUNC_FSEEKO' to take
+advantage of some new interfaces, and `AC_TYPE_OFF_T' (just in case).
If you do not use Autoconf, you can define the preprocessor symbol
`_FILE_OFFSET_BITS' to 64 _before_ including any header files, for
@@ -1449,6 +1469,17 @@ all GPGME data operations always have data available, for example by
using memory buffers or files rather than pipes or sockets. This might
be relevant, for example, if the external event loop mechanism is used.
+ -- Data type: gpgme_off_t
+ On POSIX platforms the `gpgme_off_t' type is an alias for `off_t';
+ it may be used interchangeable. On Windows platforms
+ `gpgme_off_t' is defined as a long (i.e. 32 bit) for 32 bit
+ Windows and as a 64 bit signed integer for 64 bit Windows.
+
+ -- Data type: gpgme_ssize_t
+ The `gpgme_ssize_t' type is an alias for `ssize_t'. It has only
+ been introduced to overcome portability problems pertaining to the
+ declaration of `ssize_t' by different toolchains.
+
* Menu:
* Creating Data Buffers:: Creating new data buffers.
@@ -2383,9 +2414,9 @@ are specified. This is always done by specifying the respective keys
that should be used for the operation. The following section describes
how such keys can be selected and manipulated.
- -- Data type: gpgme_sub_key_t
- The `gpgme_sub_key_t' type is a pointer to a subkey structure.
- Sub keys are one component of a `gpgme_key_t' object. In fact,
+ -- Data type: gpgme_subkey_t
+ The `gpgme_subkey_t' type is a pointer to a subkey structure. Sub
+ keys are one component of a `gpgme_key_t' object. In fact,
subkeys are those parts that contains the real information about
the individual cryptographic keys that belong to the same key
object. One `gpgme_key_t' can contain several subkeys. The first
@@ -2393,7 +2424,7 @@ how such keys can be selected and manipulated.
The subkey structure has the following members:
- `gpgme_sub_key_t next'
+ `gpgme_subkey_t next'
This is a pointer to the next subkey structure in the linked
list, or `NULL' if this is the last element.
@@ -2627,7 +2658,7 @@ how such keys can be selected and manipulated.
If `protocol' is `GPGME_PROTOCOL_OpenPGP', then this is the
owner trust.
- `gpgme_sub_key_t subkeys'
+ `gpgme_subkey_t subkeys'
This is a linked list with the subkeys of the key. The first
subkey in the list is the primary key and usually available.
diff --git a/doc/gpgme.info-2 b/doc/gpgme.info-2
index 8d7a6ab..287304f 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.4.1, last updated 30 April 2013, of `The `GnuPG
-Made Easy' Reference Manual', for Version 1.4.1.
+ This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made
+Easy' Reference Manual', for Version 1.4.2.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012,
2013 g10 Code GmbH.
@@ -931,6 +931,7 @@ Function and Data Index
* gpgme_new: Creating Contexts. (line 7)
* gpgme_new_signature_t: Creating a Signature.
(line 58)
+* gpgme_off_t: Exchanging Data. (line 25)
* gpgme_op_card_edit: Advanced Key Editing.
(line 50)
* gpgme_op_card_edit_start: Advanced Key Editing.
@@ -1039,10 +1040,11 @@ Function and Data Index
* gpgme_signers_add: Selecting Signers. (line 15)
* gpgme_signers_clear: Selecting Signers. (line 7)
* gpgme_signers_enum: Selecting Signers. (line 22)
+* gpgme_ssize_t: Exchanging Data. (line 31)
* gpgme_strerror: Error Strings. (line 7)
* gpgme_strerror_r: Error Strings. (line 17)
* gpgme_strsource: Error Strings. (line 27)
-* gpgme_sub_key_t: Key Management. (line 12)
+* gpgme_subkey_t: Key Management. (line 12)
* gpgme_trust_item_get_int_attr: Information About Trust Items.
(line 31)
* gpgme_trust_item_get_string_attr: Information About Trust Items.
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index b47d438..217dc13 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -493,18 +493,42 @@ support by default and just use that. The compatibility modes (small
file sizes or dual mode) can be considered an historic artefact, only
useful to allow for a transitional period.
-@acronym{GPGME} is compiled using largefile support by default. This
-means that your application must do the same, at least as far as it is
-relevant for using the @file{gpgme.h} header file. All types in this
-header files refer to their largefile counterparts, if they are
-different from any default types on the system.
-
-You can enable largefile support, if it is different from the default
-on the system the application is compiled on, by using the Autoconf
-macro @code{AC_SYS_LARGEFILE}. If you do this, then you don't need to
-worry about anything else: It will just work. In this case you might
-also want to use @code{AC_FUNC_FSEEKO} to take advantage of some new
-interfaces, and @code{AC_TYPE_OFF_T} (just in case).
+On POSIX platforms @acronym{GPGME} is compiled using largefile support
+by default. This means that your application must do the same, at
+least as far as it is relevant for using the @file{gpgme.h} header
+file. All types in this header files refer to their largefile
+counterparts, if they are different from any default types on the
+system.
+
+On 32 and 64 bit Windows platforms @code{off_t} is declared as 32 bit
+signed integer. There is no specific support for LFS in the C
+library. The recommendation from Microsoft is to use the native
+interface (@code{CreateFile} et al.) for large files. Released binary
+versions of @acronym{GPGME} (libgpgme-11.dll) have always been build
+with a 32 bit @code{off_t}. To avoid an ABI break we stick to this
+convention for 32 bit Windows by using @code{long} there.
+@acronym{GPGME} versions for 64 bit Windows have never been released
+and thus we are able to use @code{int64_t} instead of @code{off_t}
+there. For easier migration the typedef @code{gpgme_off_t} has been
+defined. The reason we cannot use @code{off_t} directly is that some
+toolchains (e.g. mingw64) introduce a POSIX compatible hack for
+@code{off_t}. Some widely used toolkits make use of this hack and in
+turn @acronym{GPGME} would need to use it also. However, this would
+introduce an ABI break and existing software making use of libgpgme
+might suffer from a severe break. Thus with version 1.4.2 we
+redefined all functions using @code{off_t} to use @code{gpgme_off_t}
+which is defined as explained above. This way we keep the ABI well
+defined and independent of any toolchain hacks. The bottom line is
+that LFS support in @acronym{GPGME} is only available on 64 bit
+versions of Windows.
+
+On POSIX platforms you can enable largefile support, if it is
+different from the default on the system the application is compiled
+on, by using the Autoconf macro @code{AC_SYS_LARGEFILE}. If you do
+this, then you don't need to worry about anything else: It will just
+work. In this case you might also want to use @code{AC_FUNC_FSEEKO}
+to take advantage of some new interfaces, and @code{AC_TYPE_OFF_T}
+(just in case).
If you do not use Autoconf, you can define the preprocessor symbol
@code{_FILE_OFFSET_BITS} to 64 @emph{before} including any header
@@ -1538,6 +1562,20 @@ by using memory buffers or files rather than pipes or sockets. This
might be relevant, for example, if the external event loop mechanism
is used.
+@deftp {Data type} {gpgme_off_t}
+On POSIX platforms the @code{gpgme_off_t} type is an alias for
+@code{off_t}; it may be used interchangeable. On Windows platforms
+@code{gpgme_off_t} is defined as a long (i.e. 32 bit) for 32 bit
+Windows and as a 64 bit signed integer for 64 bit Windows.
+@end deftp
+
+@deftp {Data type} {gpgme_ssize_t}
+The @code{gpgme_ssize_t} type is an alias for @code{ssize_t}. It has
+only been introduced to overcome portability problems pertaining to
+the declaration of @code{ssize_t} by different toolchains.
+@end deftp
+
+
@menu
* Creating Data Buffers:: Creating new data buffers.
* Destroying Data Buffers:: Releasing data buffers.
@@ -2507,8 +2545,8 @@ signers are specified. This is always done by specifying the
respective keys that should be used for the operation. The following
section describes how such keys can be selected and manipulated.
-@deftp {Data type} gpgme_sub_key_t
-The @code{gpgme_sub_key_t} type is a pointer to a subkey structure.
+@deftp {Data type} gpgme_subkey_t
+The @code{gpgme_subkey_t} type is a pointer to a subkey structure.
Sub keys are one component of a @code{gpgme_key_t} object. In fact,
subkeys are those parts that contains the real information about the
individual cryptographic keys that belong to the same key object. One
@@ -2518,7 +2556,7 @@ the linked list is also called the primary key.
The subkey structure has the following members:
@table @code
-@item gpgme_sub_key_t next
+@item gpgme_subkey_t next
This is a pointer to the next subkey structure in the linked list, or
@code{NULL} if this is the last element.
@@ -2757,7 +2795,7 @@ chain ID, which can be used to built the certificate chain.
If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the
owner trust.
-@item gpgme_sub_key_t subkeys
+@item gpgme_subkey_t subkeys
This is a linked list with the subkeys of the key. The first subkey
in the list is the primary key and usually available.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 1131294..42d8cc5 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 30 April 2013
-@set UPDATED-MONTH April 2013
-@set EDITION 1.4.1
-@set VERSION 1.4.1
+@set UPDATED 28 May 2013
+@set UPDATED-MONTH May 2013
+@set EDITION 1.4.2
+@set VERSION 1.4.2
diff --git a/doc/version.texi b/doc/version.texi
index 1131294..42d8cc5 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 30 April 2013
-@set UPDATED-MONTH April 2013
-@set EDITION 1.4.1
-@set VERSION 1.4.1
+@set UPDATED 28 May 2013
+@set UPDATED-MONTH May 2013
+@set EDITION 1.4.2
+@set VERSION 1.4.2
diff --git a/gpgme.spec b/gpgme.spec
index a5a6de7..35f23a4 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.4.1
+Version: 1.4.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/cl/gpgme.asd b/lang/cl/gpgme.asd
index 134577a..d55cd92 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.4.1"
+ :version "1.4.2"
:licence "GPL"
:depends-on ("cffi" "gpg-error")
:components ((:file "gpgme-package")
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 4bedbd3..ff871a0 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4773,7 +4773,7 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
@@ -5150,7 +5150,7 @@ _LT_EOF
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -6149,7 +6149,7 @@ if test "$_lt_caught_CXX_error" != yes; then
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
$SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
else
$SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
@@ -6190,7 +6190,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED \"$sed_uncomment_deffile\" $export_symbols | $SED 1q`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
diff --git a/src/Makefile.am b/src/Makefile.am
index ea8e70e..fa3b077 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -172,6 +172,7 @@ no_undefined = -no-undefined
export_symbols = -export-symbols $(srcdir)/gpgme.def
install-def-file:
+ -$(INSTALL) -d $(DESTDIR)$(libdir)
$(INSTALL) $(srcdir)/gpgme.def $(DESTDIR)$(libdir)/gpgme.def
uninstall-def-file:
diff --git a/src/Makefile.in b/src/Makefile.in
index 8046b0a..49c7c28 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1138,6 +1138,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \
@HAVE_W32_SYSTEM_TRUE@ $(LTRCCOMPILE) -i "$<" -o "$@"
@HAVE_W32_SYSTEM_TRUE@install-def-file:
+@HAVE_W32_SYSTEM_TRUE@ -$(INSTALL) -d $(DESTDIR)$(libdir)
@HAVE_W32_SYSTEM_TRUE@ $(INSTALL) $(srcdir)/gpgme.def $(DESTDIR)$(libdir)/gpgme.def
@HAVE_W32_SYSTEM_TRUE@uninstall-def-file:
diff --git a/src/assuan-support.c b/src/assuan-support.c
index 6ff0679..d06518a 100644
--- a/src/assuan-support.c
+++ b/src/assuan-support.c
@@ -68,14 +68,14 @@ my_close (assuan_context_t ctx, assuan_fd_t fd)
}
-static ssize_t
+static gpgme_ssize_t
my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size)
{
return _gpgme_io_read ((int) fd, buffer, size);
}
-static ssize_t
+static gpgme_ssize_t
my_write (assuan_context_t ctx, assuan_fd_t fd, const void *buffer, size_t size)
{
return _gpgme_io_write ((int) fd, buffer, size);
diff --git a/src/ath-pthread.c b/src/ath-pthread.c
index dfbdac2..47b38ee 100644
--- a/src/ath-pthread.c
+++ b/src/ath-pthread.c
@@ -39,6 +39,8 @@
#include <pthread.h>
+#include "gpgme.h"
+
#include "ath.h"
@@ -130,21 +132,21 @@ ath_mutex_unlock (ath_mutex_t *lock)
}
-ssize_t
+gpgme_ssize_t
ath_read (int fd, void *buf, size_t nbytes)
{
return read (fd, buf, nbytes);
}
-ssize_t
+gpgme_ssize_t
ath_write (int fd, const void *buf, size_t nbytes)
{
return write (fd, buf, nbytes);
}
-ssize_t
+gpgme_ssize_t
ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
struct timeval *timeout)
{
@@ -152,7 +154,7 @@ ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
}
-ssize_t
+gpgme_ssize_t
ath_waitpid (pid_t pid, int *status, int options)
{
return waitpid (pid, status, options);
diff --git a/src/ath.c b/src/ath.c
index 52cee45..ddd8a87 100644
--- a/src/ath.c
+++ b/src/ath.c
@@ -40,8 +40,9 @@
#include <sys/wait.h>
#endif
+#include "gpgme.h"
+
#ifdef _MSC_VER
- typedef long ssize_t;
typedef int pid_t;
#endif
@@ -125,7 +126,7 @@ ath_mutex_unlock (ath_mutex_t *lock)
}
-ssize_t
+gpgme_ssize_t
ath_read (int fd, void *buf, size_t nbytes)
{
#if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER)
@@ -136,7 +137,7 @@ ath_read (int fd, void *buf, size_t nbytes)
}
-ssize_t
+gpgme_ssize_t
ath_write (int fd, const void *buf, size_t nbytes)
{
#if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER)
@@ -147,7 +148,7 @@ ath_write (int fd, const void *buf, size_t nbytes)
}
-ssize_t
+gpgme_ssize_t
ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
struct timeval *timeout)
{
@@ -159,7 +160,7 @@ ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
}
-ssize_t
+gpgme_ssize_t
ath_waitpid (pid_t pid, int *status, int options)
{
#ifdef HAVE_W32_SYSTEM
diff --git a/src/ath.h b/src/ath.h
index eecf8d1..8eb9eb9 100644
--- a/src/ath.h
+++ b/src/ath.h
@@ -88,11 +88,11 @@ int ath_mutex_unlock (ath_mutex_t *mutex);
/* Replacement for the POSIX functions, which can be used to allow
other (user-level) threads to run. */
-ssize_t ath_read (int fd, void *buf, size_t nbytes);
-ssize_t ath_write (int fd, const void *buf, size_t nbytes);
-ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
- struct timeval *timeout);
-ssize_t ath_waitpid (pid_t pid, int *status, int options);
+gpgme_ssize_t ath_read (int fd, void *buf, size_t nbytes);
+gpgme_ssize_t ath_write (int fd, const void *buf, size_t nbytes);
+gpgme_ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
+ struct timeval *timeout);
+gpgme_ssize_t ath_waitpid (pid_t pid, int *status, int options);
int ath_accept (int s, struct sockaddr *addr, socklen_t *length_ptr);
int ath_connect (int s, const struct sockaddr *addr, socklen_t length);
int ath_sendmsg (int s, const struct msghdr *msg, int flags);
diff --git a/src/data-compat.c b/src/data-compat.c
index e9ca90a..99827f1 100644
--- a/src/data-compat.c
+++ b/src/data-compat.c
@@ -41,7 +41,7 @@
non-zero). */
gpgme_error_t
gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname,
- FILE *stream, off_t offset, size_t length)
+ FILE *stream, gpgme_off_t offset, size_t length)
{
#if defined (HAVE_W32CE_SYSTEM) && defined (_MSC_VER)
return gpgme_error (GPG_ERR_NOT_IMPLEMENTED);
@@ -175,7 +175,7 @@ gpgme_error_to_errno (gpgme_error_t err)
}
-static ssize_t
+static gpgme_ssize_t
old_user_read (gpgme_data_t dh, void *buffer, size_t size)
{
gpgme_error_t err;
@@ -191,8 +191,8 @@ old_user_read (gpgme_data_t dh, void *buffer, size_t size)
}
-static off_t
-old_user_seek (gpgme_data_t dh, off_t offset, int whence)
+static gpgme_off_t
+old_user_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
gpgme_error_t err;
TRACE_BEG2 (DEBUG_DATA, "gpgme:old_user_seek", dh,
diff --git a/src/data-fd.c b/src/data-fd.c
index 4b75e94..42d6a0d 100644
--- a/src/data-fd.c
+++ b/src/data-fd.c
@@ -89,22 +89,22 @@ lseek (int fildes, long offset, int whence)
-static ssize_t
+static gpgme_ssize_t
fd_read (gpgme_data_t dh, void *buffer, size_t size)
{
return read (dh->data.fd, buffer, size);
}
-static ssize_t
+static gpgme_ssize_t
fd_write (gpgme_data_t dh, const void *buffer, size_t size)
{
return write (dh->data.fd, buffer, size);
}
-static off_t
-fd_seek (gpgme_data_t dh, off_t offset, int whence)
+static gpgme_off_t
+fd_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
return lseek (dh->data.fd, offset, whence);
}
diff --git a/src/data-mem.c b/src/data-mem.c
index fc7694d..e06a920 100644
--- a/src/data-mem.c
+++ b/src/data-mem.c
@@ -35,7 +35,7 @@
#include "debug.h"
-static ssize_t
+static gpgme_ssize_t
mem_read (gpgme_data_t dh, void *buffer, size_t size)
{
size_t amt = dh->data.mem.length - dh->data.mem.offset;
@@ -54,7 +54,7 @@ mem_read (gpgme_data_t dh, void *buffer, size_t size)
}
-static ssize_t
+static gpgme_ssize_t
mem_write (gpgme_data_t dh, const void *buffer, size_t size)
{
size_t unused;
@@ -109,8 +109,8 @@ mem_write (gpgme_data_t dh, const void *buffer, size_t size)
}
-static off_t
-mem_seek (gpgme_data_t dh, off_t offset, int whence)
+static gpgme_off_t
+mem_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
switch (whence)
{
diff --git a/src/data-stream.c b/src/data-stream.c
index a9bb815..f358a0e 100644
--- a/src/data-stream.c
+++ b/src/data-stream.c
@@ -31,7 +31,7 @@
#include "data.h"
-static ssize_t
+static gpgme_ssize_t
stream_read (gpgme_data_t dh, void *buffer, size_t size)
{
size_t amt = fread (buffer, 1, size, dh->data.stream);
@@ -41,7 +41,7 @@ stream_read (gpgme_data_t dh, void *buffer, size_t size)
}
-static ssize_t
+static gpgme_ssize_t
stream_write (gpgme_data_t dh, const void *buffer, size_t size)
{
size_t amt = fwrite (buffer, 1, size, dh->data.stream);
@@ -51,8 +51,8 @@ stream_write (gpgme_data_t dh, const void *buffer, size_t size)
}
-static off_t
-stream_seek (gpgme_data_t dh, off_t offset, int whence)
+static gpgme_off_t
+stream_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
int err;
diff --git a/src/data-user.c b/src/data-user.c
index 5204614..816ad7d 100644
--- a/src/data-user.c
+++ b/src/data-user.c
@@ -31,7 +31,7 @@
#include "data.h"
-static ssize_t
+static gpgme_ssize_t
user_read (gpgme_data_t dh, void *buffer, size_t size)
{
if (!dh->data.user.cbs->read)
@@ -44,7 +44,7 @@ user_read (gpgme_data_t dh, void *buffer, size_t size)
}
-static ssize_t
+static gpgme_ssize_t
user_write (gpgme_data_t dh, const void *buffer, size_t size)
{
if (!dh->data.user.cbs->write)
@@ -57,8 +57,8 @@ user_write (gpgme_data_t dh, const void *buffer, size_t size)
}
-static off_t
-user_seek (gpgme_data_t dh, off_t offset, int whence)
+static gpgme_off_t
+user_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
if (!dh->data.user.cbs->seek)
{
diff --git a/src/data.c b/src/data.c
index 0657081..7123a82 100644
--- a/src/data.c
+++ b/src/data.c
@@ -72,10 +72,10 @@ _gpgme_data_release (gpgme_data_t dh)
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle DH. Return the number of characters read, 0 on EOF and
-1 on error. If an error occurs, errno is set. */
-ssize_t
+gpgme_ssize_t
gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size)
{
- ssize_t res;
+ gpgme_ssize_t res;
TRACE_BEG2 (DEBUG_DATA, "gpgme_data_read", dh,
"buffer=%p, size=%u", buffer, size);
@@ -100,10 +100,10 @@ gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size)
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle DH. Return the number of characters written, or -1 on
error. If an error occurs, errno is set. */
-ssize_t
+gpgme_ssize_t
gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size)
{
- ssize_t res;
+ gpgme_ssize_t res;
TRACE_BEG2 (DEBUG_DATA, "gpgme_data_write", dh,
"buffer=%p, size=%u", buffer, size);
@@ -128,8 +128,8 @@ gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size)
/* Set the current position from where the next read or write starts
in the data object with the handle DH to OFFSET, relativ to
WHENCE. */
-off_t
-gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence)
+gpgme_off_t
+gpgme_data_seek (gpgme_data_t dh, gpgme_off_t offset, int whence)
{
TRACE_BEG2 (DEBUG_DATA, "gpgme_data_seek", dh,
"offset=%lli, whence=%i", offset, whence);
@@ -253,7 +253,7 @@ _gpgme_data_inbound_handler (void *opaque, int fd)
gpgme_data_t dh = (gpgme_data_t) data->handler_value;
char buffer[BUFFER_SIZE];
char *bufp = buffer;
- ssize_t buflen;
+ gpgme_ssize_t buflen;
TRACE_BEG1 (DEBUG_CTX, "_gpgme_data_inbound_handler", dh,
"fd=0x%x", fd);
@@ -268,7 +268,7 @@ _gpgme_data_inbound_handler (void *opaque, int fd)
do
{
- ssize_t amt = gpgme_data_write (dh, bufp, buflen);
+ gpgme_ssize_t amt = gpgme_data_write (dh, bufp, buflen);
if (amt == 0 || (amt < 0 && errno != EINTR))
return TRACE_ERR (gpg_error_from_syserror ());
bufp += amt;
@@ -284,13 +284,13 @@ _gpgme_data_outbound_handler (void *opaque, int fd)
{
struct io_cb_data *data = (struct io_cb_data *) opaque;
gpgme_data_t dh = (gpgme_data_t) data->handler_value;
- ssize_t nwritten;
+ gpgme_ssize_t nwritten;
TRACE_BEG1 (DEBUG_CTX, "_gpgme_data_outbound_handler", dh,
"fd=0x%x", fd);
if (!dh->pending_len)
{
- ssize_t amt = gpgme_data_read (dh, dh->pending, BUFFER_SIZE);
+ gpgme_ssize_t amt = gpgme_data_read (dh, dh->pending, BUFFER_SIZE);
if (amt < 0)
return TRACE_ERR (gpg_error_from_syserror ());
if (amt == 0)
diff --git a/src/data.h b/src/data.h
index 5076619..3d404af 100644
--- a/src/data.h
+++ b/src/data.h
@@ -36,20 +36,23 @@
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle DH. Return the number of characters read, 0 on EOF and
-1 on error. If an error occurs, errno is set. */
-typedef ssize_t (*gpgme_data_read_cb) (gpgme_data_t dh, void *buffer,
- size_t size);
+typedef gpgme_ssize_t (*gpgme_data_read_cb) (gpgme_data_t dh,
+ void *buffer,
+ size_t size);
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle DH. Return the number of characters written, or -1 on
error. If an error occurs, errno is set. */
-typedef ssize_t (*gpgme_data_write_cb) (gpgme_data_t dh, const void *buffer,
- size_t size);
+typedef gpgme_ssize_t (*gpgme_data_write_cb) (gpgme_data_t dh,
+ const void *buffer,
+ size_t size);
/* Set the current position from where the next read or write starts
in the data object with the handle DH to OFFSET, relativ to
WHENCE. */
-typedef off_t (*gpgme_data_seek_cb) (gpgme_data_t dh, off_t offset,
- int whence);
+typedef gpgme_off_t (*gpgme_data_seek_cb) (gpgme_data_t dh,
+ gpgme_off_t offset,
+ int whence);
/* Release the data object with the handle DH. */
typedef void (*gpgme_data_release_cb) (gpgme_data_t dh);
@@ -109,7 +112,7 @@ struct gpgme_data
/* Allocated size of BUFFER. */
size_t size;
size_t length;
- off_t offset;
+ gpgme_off_t offset;
} mem;
/* For gpgme_data_new_from_read_cb. */
diff --git a/src/debug.c b/src/debug.c
index 56effa7..ca0bb21 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -258,17 +258,10 @@ _gpgme_debug (int level, const char *format, ...)
}
#ifdef FRAME_NR
{
- char spaces[] = " ";
- int nr_spaces = sizeof (spaces) - 1;
- int nr_columns;
-
- nr_columns = 2 * (frame_nr - 1);
- if (nr_columns > nr_spaces)
- nr_columns = nr_spaces;
- if (nr_columns < 0)
- nr_columns = 0;
- spaces[nr_columns] = '\0';
- fprintf (errfp, "%s", spaces);
+ int indent;
+
+ indent = frame_nr > 0? (2 * (frame_nr - 1)):0;
+ fprintf (errfp, "%*s", indent < 40? indent : 40, "");
}
#endif
diff --git a/src/encrypt-sign.c b/src/encrypt-sign.c
index cb0ea61..4f484e9 100644
--- a/src/encrypt-sign.c
+++ b/src/encrypt-sign.c
@@ -47,19 +47,38 @@ encrypt_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
static gpgme_error_t
+encrypt_sym_status_handler (void *priv, gpgme_status_code_t code, char *args)
+{
+ gpgme_error_t err;
+
+ err = _gpgme_progress_status_handler (priv, code, args);
+ if (!err)
+ err = _gpgme_sign_status_handler (priv, code, args);
+ if (!err)
+ err = _gpgme_passphrase_status_handler (priv, code, args);
+ return err;
+}
+
+
+static gpgme_error_t
encrypt_sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t recp[],
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher)
{
gpgme_error_t err;
+ int symmetric;
err = _gpgme_op_reset (ctx, synchronous);
if (err)
return err;
+ symmetric = !recp;
+
if (!plain)
return gpg_error (GPG_ERR_NO_DATA);
- if (!cipher || !recp)
+ if (!cipher)
+ return gpg_error (GPG_ERR_INV_VALUE);
+ if (recp && !*recp)
return gpg_error (GPG_ERR_INV_VALUE);
err = _gpgme_op_encrypt_init_result (ctx);
@@ -79,7 +98,10 @@ encrypt_sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t recp[],
}
_gpgme_engine_set_status_handler (ctx->engine,
- encrypt_sign_status_handler, ctx);
+ symmetric
+ ? encrypt_sym_status_handler
+ : encrypt_sign_status_handler,
+ ctx);
return _gpgme_engine_op_encrypt_sign (ctx->engine, recp, flags, plain,
cipher, ctx->use_armor,
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 3f02503..72d3ad1 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -1700,23 +1700,32 @@ gpg_encrypt_sign (void *engine, gpgme_key_t recp[],
{
engine_gpg_t gpg = engine;
gpgme_error_t err;
+ int symmetric = !recp;
+
+ err = add_arg (gpg, symmetric ? "--symmetric" : "--encrypt");
- err = add_arg (gpg, "--encrypt");
if (!err)
err = add_arg (gpg, "--sign");
if (!err && use_armor)
err = add_arg (gpg, "--armor");
- /* If we know that all recipients are valid (full or ultimate trust)
- we can suppress further checks. */
- if (!err && (flags & GPGME_ENCRYPT_ALWAYS_TRUST))
- err = add_arg (gpg, "--always-trust");
+ if (!symmetric)
+ {
+ /* If we know that all recipients are valid (full or ultimate trust)
+ we can suppress further checks. */
+ if (!err && (flags & GPGME_ENCRYPT_ALWAYS_TRUST))
+ err = add_arg (gpg, "--always-trust");
- if (!err)
- err = append_args_from_recipients (gpg, recp);
+ if (!err && (flags & GPGME_ENCRYPT_NO_ENCRYPT_TO))
+ err = add_arg (gpg, "--no-encrypt-to");
+
+ if (!err)
+ err = append_args_from_recipients (gpg, recp);
+ }
if (!err)
err = append_args_from_signers (gpg, ctx);
+
if (!err)
err = append_args_from_sig_notations (gpg, ctx);
diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c
index 79adde2..391b632 100644
--- a/src/engine-gpgsm.c
+++ b/src/engine-gpgsm.c
@@ -891,7 +891,7 @@ status_handler (void *opaque, int fd)
char *src = line + 2;
char *end = line + linelen;
char *dst = src;
- ssize_t nwritten;
+ gpgme_ssize_t nwritten;
linelen = 0;
while (src < end)
diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c
index a68915a..a0008e4 100644
--- a/src/engine-uiserver.c
+++ b/src/engine-uiserver.c
@@ -754,7 +754,7 @@ status_handler (void *opaque, int fd)
char *src = line + 2;
char *end = line + linelen;
char *dst = src;
- ssize_t nwritten;
+ gpgme_ssize_t nwritten;
linelen = 0;
while (src < end)
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index 978c387..0ebabab 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -1911,11 +1911,14 @@ gt_sign_encrypt (gpgme_tool_t gt, gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher, int sign)
{
gpg_error_t err;
+ gpgme_key_t *recp;
+
+ recp = gt->recipients_nr? gt->recipients : NULL;
if (sign)
- err = gpgme_op_encrypt_sign (gt->ctx, gt->recipients, flags, plain, cipher);
+ err = gpgme_op_encrypt_sign (gt->ctx, recp, flags, plain, cipher);
else
- err = gpgme_op_encrypt (gt->ctx, gt->recipients, flags, plain, cipher);
+ err = gpgme_op_encrypt (gt->ctx, recp, flags, plain, cipher);
gt_recipients_clear (gt);
@@ -3056,7 +3059,7 @@ _cmd_genkey_write (gpgme_data_t data, const void *buf, size_t size)
{
while (size > 0)
{
- ssize_t writen = gpgme_data_write (data, buf, size);
+ gpgme_ssize_t writen = gpgme_data_write (data, buf, size);
if (writen < 0 && errno != EAGAIN)
return gpg_error_from_syserror ();
else if (writen > 0)
@@ -3112,7 +3115,7 @@ cmd_genkey (assuan_context_t ctx, char *line)
do
{
char buf[512];
- ssize_t readn = gpgme_data_read (inp_data, buf, sizeof (buf));
+ gpgme_ssize_t readn = gpgme_data_read (inp_data, buf, sizeof (buf));
if (readn < 0)
{
err = gpg_error_from_syserror ();
diff --git a/src/gpgme.c b/src/gpgme.c
index 281ba9c..a8de64b 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -643,7 +643,7 @@ gpgme_set_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)
/* This function provides access to the internal read function; it is
normally not used. */
-ssize_t
+gpgme_ssize_t
gpgme_io_read (int fd, void *buffer, size_t count)
{
int ret;
@@ -659,7 +659,7 @@ gpgme_io_read (int fd, void *buffer, size_t count)
/* This function provides access to the internal write function. It
is to be used by user callbacks to return data to gpgme. See
gpgme_passphrase_cb_t and gpgme_edit_cb_t. */
-ssize_t
+gpgme_ssize_t
gpgme_io_write (int fd, const void *buffer, size_t count)
{
int ret;
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index 12bd4ac..11780d1 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -18,7 +18,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, see <http://www.gnu.org/licenses/>.
- File: @configure_input@ */
+ Generated from gpgme.h.in for @GPGME_CONFIG_HOST@. */
#ifndef GPGME_H
#define GPGME_H
@@ -33,11 +33,7 @@
/* Include stdio.h for the FILE type definition. */
#include <stdio.h>
-
-@INSERT__TYPEDEFS_FOR_GPGME_H@
-
#include <time.h>
-
#include <gpg-error.h>
#ifdef __cplusplus
@@ -47,6 +43,7 @@ extern "C" {
#endif
#endif /* __cplusplus */
+@INSERT__TYPEDEFS_FOR_GPGME_H@
/* Check for compiler features. */
@@ -345,6 +342,8 @@ typedef enum
GPGME_PROTOCOL_UNKNOWN = 255
}
gpgme_protocol_t;
+/* Convenience macro for the surprisingly mixed spelling. */
+#define GPGME_PROTOCOL_OPENPGP GPGME_PROTOCOL_OpenPGP
/* The available keylist mode flags. */
@@ -1043,8 +1042,8 @@ void gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs);
/* Wrappers around the internal I/O functions for use with
gpgme_passphrase_cb_t and gpgme_edit_cb_t. */
-ssize_t gpgme_io_read (int fd, void *buffer, size_t count);
-ssize_t gpgme_io_write (int fd, const void *buffer, size_t count);
+@API__SSIZE_T@ gpgme_io_read (int fd, void *buffer, size_t count);
+@API__SSIZE_T@ gpgme_io_write (int fd, const void *buffer, size_t count);
int gpgme_io_writen (int fd, const void *buffer, size_t count);
/* Process the pending operation and, if HANG is non-zero, wait for
@@ -1060,19 +1059,20 @@ gpgme_ctx_t gpgme_wait_ext (gpgme_ctx_t ctx, gpgme_error_t *status,
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle HANDLE. Return the number of characters read, 0 on EOF
and -1 on error. If an error occurs, errno is set. */
-typedef ssize_t (*gpgme_data_read_cb_t) (void *handle, void *buffer,
+typedef @API__SSIZE_T@ (*gpgme_data_read_cb_t) (void *handle, void *buffer,
size_t size);
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle HANDLE. Return the number of characters written, or -1
on error. If an error occurs, errno is set. */
-typedef ssize_t (*gpgme_data_write_cb_t) (void *handle, const void *buffer,
+typedef @API__SSIZE_T@ (*gpgme_data_write_cb_t) (void *handle, const void *buffer,
size_t size);
/* Set the current position from where the next read or write starts
in the data object with the handle HANDLE to OFFSET, relativ to
WHENCE. */
-typedef off_t (*gpgme_data_seek_cb_t) (void *handle, off_t offset, int whence);
+typedef @API__OFF_T@ (*gpgme_data_seek_cb_t) (void *handle,
+ @API__OFF_T@ offset, int whence);
/* Close the data object with the handle DL. */
typedef void (*gpgme_data_release_cb_t) (void *handle);
@@ -1089,17 +1089,17 @@ typedef struct gpgme_data_cbs *gpgme_data_cbs_t;
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle DH. Return the number of characters read, 0 on EOF and
-1 on error. If an error occurs, errno is set. */
-ssize_t gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size);
+@API__SSIZE_T@ gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size);
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle DH. Return the number of characters written, or -1 on
error. If an error occurs, errno is set. */
-ssize_t gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size);
+@API__SSIZE_T@ gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size);
/* Set the current position from where the next read or write starts
in the data object with the handle DH to OFFSET, relativ to
WHENCE. */
-off_t gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence);
+@API__OFF_T@ gpgme_data_seek (gpgme_data_t dh, @API__OFF_T@ offset, int whence);
/* Create a new data buffer and return it in R_DH. */
gpgme_error_t gpgme_data_new (gpgme_data_t *r_dh);
@@ -1168,7 +1168,7 @@ gpgme_error_t gpgme_data_new_from_file (gpgme_data_t *r_dh,
non-zero). */
gpgme_error_t gpgme_data_new_from_filepart (gpgme_data_t *r_dh,
const char *fname, FILE *fp,
- off_t offset, size_t length);
+ @API__OFF_T@ offset, size_t length);
/* Reset the read pointer in DH. Deprecated, please use
gpgme_data_seek instead. */
diff --git a/src/w32-io.c b/src/w32-io.c
index cbc3064..d896ec0 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -162,7 +162,9 @@ struct reader_context_s
HANDLE have_data_ev;
/* This is automatically reset. */
HANDLE have_space_ev;
- HANDLE stopped;
+ /* This is manually reset but actually only triggered once. */
+ HANDLE close_ev;
+
size_t readpos, writepos;
char buffer[READBUF_SIZE];
};
@@ -194,7 +196,7 @@ struct writer_context_s
/* This is manually reset. */
HANDLE have_data;
HANDLE is_empty;
- HANDLE stopped;
+ HANDLE close_ev;
size_t nbytes;
char buffer[WRITEBUF_SIZE];
};
@@ -264,8 +266,8 @@ reader (void *arg)
int nbytes;
DWORD nread;
int sock;
- TRACE_BEG1 (DEBUG_SYSIO, "gpgme:reader", ctx->file_hd,
- "thread=%p", ctx->thread_hd);
+ TRACE_BEG2 (DEBUG_SYSIO, "gpgme:reader", ctx->file_hd,
+ "file_sock=%d, thread=%p", ctx->file_sock, ctx->thread_hd);
if (ctx->file_hd != INVALID_HANDLE_VALUE)
sock = 0;
@@ -316,6 +318,21 @@ reader (void *arg)
}
else
{
+ /* Check whether the shutdown triggered the error -
+ no need to to print a warning in this case. */
+ if ( ctx->error_code == WSAECONNABORTED
+ || ctx->error_code == WSAECONNRESET)
+ {
+ LOCK (ctx->mutex);
+ if (ctx->stop_me)
+ {
+ UNLOCK (ctx->mutex);
+ TRACE_LOG ("got shutdown");
+ break;
+ }
+ UNLOCK (ctx->mutex);
+ }
+
ctx->error = 1;
TRACE_LOG1 ("recv error: ec=%d", ctx->error_code);
}
@@ -357,6 +374,7 @@ reader (void *arg)
UNLOCK (ctx->mutex);
break;
}
+
TRACE_LOG1 ("got %u bytes", nread);
ctx->writepos = (ctx->writepos + nread) % READBUF_SIZE;
@@ -367,9 +385,18 @@ reader (void *arg)
}
/* Indicate that we have an error or EOF. */
if (!SetEvent (ctx->have_data_ev))
- TRACE_LOG2 ("SetEvent (0x%x) failed: ec=%d", ctx->have_data_ev,
- (int) GetLastError ());
- SetEvent (ctx->stopped);
+ TRACE_LOG2 ("SetEvent (0x%x) failed: ec=%d", ctx->have_data_ev,
+ (int) GetLastError ());
+
+ TRACE_LOG ("waiting for close");
+ WaitForSingleObject (ctx->close_ev, INFINITE);
+
+ CloseHandle (ctx->close_ev);
+ CloseHandle (ctx->have_data_ev);
+ CloseHandle (ctx->have_space_ev);
+ CloseHandle (ctx->thread_hd);
+ DESTROY_LOCK (ctx->mutex);
+ free (ctx);
return TRACE_SUC ();
}
@@ -400,6 +427,9 @@ create_reader (int fd)
TRACE_SYSERR (EIO);
return NULL;
}
+ TRACE_LOG4 ("fd=%d -> handle=%p socket=%d dupfrom=%d",
+ fd, fd_table[fd].handle, fd_table[fd].socket,
+ fd_table[fd].dup_from);
ctx->file_hd = fd_table[fd].handle;
ctx->file_sock = fd_table[fd].socket;
@@ -408,16 +438,16 @@ create_reader (int fd)
if (ctx->have_data_ev)
ctx->have_space_ev = CreateEvent (&sec_attr, FALSE, TRUE, NULL);
if (ctx->have_space_ev)
- ctx->stopped = CreateEvent (&sec_attr, TRUE, FALSE, NULL);
- if (!ctx->have_data_ev || !ctx->have_space_ev || !ctx->stopped)
+ ctx->close_ev = CreateEvent (&sec_attr, TRUE, FALSE, NULL);
+ if (!ctx->have_data_ev || !ctx->have_space_ev || !ctx->close_ev)
{
TRACE_LOG1 ("CreateEvent failed: ec=%d", (int) GetLastError ());
if (ctx->have_data_ev)
CloseHandle (ctx->have_data_ev);
if (ctx->have_space_ev)
CloseHandle (ctx->have_space_ev);
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
+ if (ctx->close_ev)
+ CloseHandle (ctx->close_ev);
free (ctx);
/* FIXME: Translate the error code. */
TRACE_SYSERR (EIO);
@@ -442,8 +472,8 @@ create_reader (int fd)
CloseHandle (ctx->have_data_ev);
if (ctx->have_space_ev)
CloseHandle (ctx->have_space_ev);
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
+ if (ctx->close_ev)
+ CloseHandle (ctx->close_ev);
free (ctx);
TRACE_SYSERR (EIO);
return NULL;
@@ -461,6 +491,9 @@ create_reader (int fd)
}
+/* Prepare destruction of the reader thread for CTX. Returns 0 if a
+ call to this function is sufficient and destroy_reader_finish shall
+ not be called. */
static void
destroy_reader (struct reader_context_s *ctx)
{
@@ -492,24 +525,32 @@ destroy_reader (struct reader_context_s *ctx)
}
#endif
- TRACE1 (DEBUG_SYSIO, "gpgme:destroy_reader", ctx->file_hd,
- "waiting for termination of thread %p", ctx->thread_hd);
- WaitForSingleObject (ctx->stopped, INFINITE);
- TRACE1 (DEBUG_SYSIO, "gpgme:destroy_reader", ctx->file_hd,
- "thread %p has terminated", ctx->thread_hd);
+ /* The reader thread is usually blocking in recv or ReadFile. If
+ the peer does not send an EOF or breaks the pipe the WFSO might
+ get stuck waiting for the termination of the reader thread. This
+ happens quite often with sockets, thus we definitely need to get
+ out of the recv. A shutdown does this nicely. For handles
+ (i.e. pipes) it would also be nice to cancel the operation, but
+ such a feature is only available since Vista. Thus we need to
+ dlopen that syscall. */
+ if (ctx->file_hd != INVALID_HANDLE_VALUE)
+ {
+ /* Fixme: Call CancelSynchronousIo (handle_of_thread). */
+ }
+ else if (ctx->file_sock != INVALID_SOCKET)
+ {
+ if (shutdown (ctx->file_sock, 2))
+ TRACE2 (DEBUG_SYSIO, "gpgme:destroy_reader", ctx->file_hd,
+ "shutdown socket %d failed: %s",
+ ctx->file_sock, (int) WSAGetLastError ());
+ }
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
- if (ctx->have_data_ev)
- CloseHandle (ctx->have_data_ev);
- if (ctx->have_space_ev)
- CloseHandle (ctx->have_space_ev);
- CloseHandle (ctx->thread_hd);
- DESTROY_LOCK (ctx->mutex);
- free (ctx);
+ /* After setting this event CTX is void. */
+ SetEvent (ctx->close_ev);
}
+
/* Find a reader context or create a new one. Note that the reader
context will last until a _gpgme_io_close. */
static struct reader_context_s *
@@ -546,26 +587,6 @@ find_reader (int fd, int start_it)
}
-static void
-kill_reader (int fd)
-{
- int i;
-
- LOCK (reader_table_lock);
- for (i = 0; i < reader_table_size; i++)
- {
- if (reader_table[i].used && reader_table[i].fd == fd)
- {
- destroy_reader (reader_table[i].context);
- reader_table[i].context = NULL;
- reader_table[i].used = 0;
- break;
- }
- }
- UNLOCK (reader_table_lock);
-}
-
-
int
_gpgme_io_read (int fd, void *buffer, size_t count)
{
@@ -652,8 +673,8 @@ writer (void *arg)
struct writer_context_s *ctx = arg;
DWORD nwritten;
int sock;
- TRACE_BEG1 (DEBUG_SYSIO, "gpgme:writer", ctx->file_hd,
- "thread=%p", ctx->thread_hd);
+ TRACE_BEG2 (DEBUG_SYSIO, "gpgme:writer", ctx->file_hd,
+ "file_sock=%d, thread=%p", ctx->file_sock, ctx->thread_hd);
if (ctx->file_hd != INVALID_HANDLE_VALUE)
sock = 0;
@@ -735,7 +756,16 @@ writer (void *arg)
/* Indicate that we have an error. */
if (!SetEvent (ctx->is_empty))
TRACE_LOG1 ("SetEvent failed: ec=%d", (int) GetLastError ());
- SetEvent (ctx->stopped);
+
+ TRACE_LOG ("waiting for close");
+ WaitForSingleObject (ctx->close_ev, INFINITE);
+
+ CloseHandle (ctx->close_ev);
+ CloseHandle (ctx->have_data);
+ CloseHandle (ctx->is_empty);
+ CloseHandle (ctx->thread_hd);
+ DESTROY_LOCK (ctx->mutex);
+ free (ctx);
return TRACE_SUC ();
}
@@ -766,6 +796,9 @@ create_writer (int fd)
TRACE_SYSERR (EIO);
return NULL;
}
+ TRACE_LOG4 ("fd=%d -> handle=%p socket=%d dupfrom=%d",
+ fd, fd_table[fd].handle, fd_table[fd].socket,
+ fd_table[fd].dup_from);
ctx->file_hd = fd_table[fd].handle;
ctx->file_sock = fd_table[fd].socket;
@@ -774,16 +807,16 @@ create_writer (int fd)
if (ctx->have_data)
ctx->is_empty = CreateEvent (&sec_attr, TRUE, TRUE, NULL);
if (ctx->is_empty)
- ctx->stopped = CreateEvent (&sec_attr, TRUE, FALSE, NULL);
- if (!ctx->have_data || !ctx->is_empty || !ctx->stopped)
+ ctx->close_ev = CreateEvent (&sec_attr, TRUE, FALSE, NULL);
+ if (!ctx->have_data || !ctx->is_empty || !ctx->close_ev)
{
TRACE_LOG1 ("CreateEvent failed: ec=%d", (int) GetLastError ());
if (ctx->have_data)
CloseHandle (ctx->have_data);
if (ctx->is_empty)
CloseHandle (ctx->is_empty);
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
+ if (ctx->close_ev)
+ CloseHandle (ctx->close_ev);
free (ctx);
/* FIXME: Translate the error code. */
TRACE_SYSERR (EIO);
@@ -808,8 +841,8 @@ create_writer (int fd)
CloseHandle (ctx->have_data);
if (ctx->is_empty)
CloseHandle (ctx->is_empty);
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
+ if (ctx->close_ev)
+ CloseHandle (ctx->close_ev);
free (ctx);
TRACE_SYSERR (EIO);
return NULL;
@@ -826,6 +859,7 @@ create_writer (int fd)
return ctx;
}
+
static void
destroy_writer (struct writer_context_s *ctx)
{
@@ -855,21 +889,8 @@ destroy_writer (struct writer_context_s *ctx)
}
#endif
- TRACE1 (DEBUG_SYSIO, "gpgme:destroy_writer", ctx->file_hd,
- "waiting for termination of thread %p", ctx->thread_hd);
- WaitForSingleObject (ctx->stopped, INFINITE);
- TRACE1 (DEBUG_SYSIO, "gpgme:destroy_writer", ctx->file_hd,
- "thread %p has terminated", ctx->thread_hd);
-
- if (ctx->stopped)
- CloseHandle (ctx->stopped);
- if (ctx->have_data)
- CloseHandle (ctx->have_data);
- if (ctx->is_empty)
- CloseHandle (ctx->is_empty);
- CloseHandle (ctx->thread_hd);
- DESTROY_LOCK (ctx->mutex);
- free (ctx);
+ /* After setting this event CTX is void. */
+ SetEvent (ctx->close_ev);
}
@@ -909,26 +930,6 @@ find_writer (int fd, int start_it)
}
-static void
-kill_writer (int fd)
-{
- int i;
-
- LOCK (writer_table_lock);
- for (i = 0; i < writer_table_size; i++)
- {
- if (writer_table[i].used && writer_table[i].fd == fd)
- {
- destroy_writer (writer_table[i].context);
- writer_table[i].context = NULL;
- writer_table[i].used = 0;
- break;
- }
- }
- UNLOCK (writer_table_lock);
-}
-
-
int
_gpgme_io_write (int fd, const void *buffer, size_t count)
{
@@ -1149,8 +1150,36 @@ _gpgme_io_close (int fd)
return TRACE_SYSRES (-1);
}
- kill_reader (fd);
- kill_writer (fd);
+ TRACE_LOG4 ("fd=%d -> handle=%p socket=%d dupfrom=%d",
+ fd, fd_table[fd].handle, fd_table[fd].socket,
+ fd_table[fd].dup_from);
+
+ LOCK (reader_table_lock);
+ for (i = 0; i < reader_table_size; i++)
+ {
+ if (reader_table[i].used && reader_table[i].fd == fd)
+ {
+ destroy_reader (reader_table[i].context);
+ reader_table[i].context = NULL;
+ reader_table[i].used = 0;
+ break;
+ }
+ }
+ UNLOCK (reader_table_lock);
+
+ LOCK (writer_table_lock);
+ for (i = 0; i < writer_table_size; i++)
+ {
+ if (writer_table[i].used && writer_table[i].fd == fd)
+ {
+ destroy_writer (writer_table[i].context);
+ writer_table[i].context = NULL;
+ writer_table[i].used = 0;
+ break;
+ }
+ }
+ UNLOCK (writer_table_lock);
+
LOCK (notify_table_lock);
for (i = 0; i < DIM (notify_table); i++)
{
@@ -1544,7 +1573,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
args = calloc (2 + i + 1, sizeof (*args));
args[0] = (char *) _gpgme_get_w32spawn_path ();
args[1] = tmp_name;
- args[2] = path;
+ args[2] = (char *)path;
memcpy (&args[3], &argv[1], i * sizeof (*args));
memset (&sec_attr, 0, sizeof sec_attr);
@@ -1734,7 +1763,9 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_select", fds,
"nfds=%u, nonblock=%u", nfds, nonblock);
+#if 0
restart:
+#endif
TRACE_SEQ (dbg_help, "select on [ ");
any = 0;
nwait = 0;
diff --git a/tests/gpg/t-encrypt-sign.c b/tests/gpg/t-encrypt-sign.c
index 9d00340..1e1262f 100644
--- a/tests/gpg/t-encrypt-sign.c
+++ b/tests/gpg/t-encrypt-sign.c
@@ -3,17 +3,17 @@
Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH
This file is part of GPGME.
-
+
GPGME is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
-
+
GPGME is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -83,7 +83,7 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
}
-int
+int
main (int argc, char **argv)
{
gpgme_ctx_t ctx;
@@ -95,7 +95,7 @@ main (int argc, char **argv)
char *agent_info;
init_gpgme (GPGME_PROTOCOL_OpenPGP);
-
+
err = gpgme_new (&ctx);
fail_if_err (err);
gpgme_set_textmode (ctx, 1);
@@ -135,6 +135,24 @@ main (int argc, char **argv)
gpgme_key_unref (key[1]);
gpgme_data_release (in);
gpgme_data_release (out);
+
+ /* Now a second time using symmetric encryption. */
+ err = gpgme_data_new_from_mem (&in, "Hallo Leute\n", 12, 0);
+ fail_if_err (err);
+
+ err = gpgme_data_new (&out);
+ fail_if_err (err);
+
+ err = gpgme_op_encrypt_sign (ctx, NULL, GPGME_ENCRYPT_ALWAYS_TRUST, in, out);
+ fail_if_err (err);
+ sign_result = gpgme_op_sign_result (ctx);
+ check_result (sign_result, GPGME_SIG_MODE_NORMAL);
+ print_data (out);
+
+ gpgme_data_release (in);
+ gpgme_data_release (out);
+
+
gpgme_release (ctx);
return 0;
}
diff --git a/tests/gpgsm/t-verify.c b/tests/gpgsm/t-verify.c
index 062c5a1..a26617e 100644
--- a/tests/gpgsm/t-verify.c
+++ b/tests/gpgsm/t-verify.c
@@ -118,7 +118,7 @@ show_auditlog (gpgme_ctx_t ctx)
err = gpgme_data_new (&data);
fail_if_err (err);
- err = gpgme_op_getauditlog (ctx, data, GPGME_AUDITLOG_HTML);
+ err = gpgme_op_getauditlog (ctx, data, 0);
if (err)
{
fprintf (stderr, "%s:%i: Can't get audit log: %s\n",