diff -Nru gpgme1.0-1.6.0/acinclude.m4 gpgme1.0-1.8.0/acinclude.m4 --- gpgme1.0-1.6.0/acinclude.m4 2013-03-15 19:27:33.000000000 +0000 +++ gpgme1.0-1.8.0/acinclude.m4 2016-05-17 12:32:37.000000000 +0000 @@ -58,3 +58,19 @@ AC_MSG_RESULT($gnupg_cv_must_copy_va_byval) fi ]) + +dnl LIST_MEMBER() +dnl Check wether an element ist contained in a list. Set `found' to +dnl `1' if the element is found in the list, to `0' otherwise. +AC_DEFUN([LIST_MEMBER], +[ +name=$1 +list=$2 +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done +]) diff -Nru gpgme1.0-1.6.0/aclocal.m4 gpgme1.0-1.8.0/aclocal.m4 --- gpgme1.0-1.6.0/aclocal.m4 2015-08-26 07:54:41.000000000 +0000 +++ gpgme1.0-1.8.0/aclocal.m4 2016-11-16 12:29:24.000000000 +0000 @@ -108,6 +108,43 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -845,6 +882,241 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1183,6 +1455,9 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/ax_cxx_compile_stdcxx.m4]) +m4_include([m4/ax_pkg_swig.m4]) +m4_include([m4/ax_python_devel.m4]) m4_include([m4/glib-2.0.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnupg-ttyname.m4]) @@ -1193,4 +1468,6 @@ m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/pkg.m4]) +m4_include([m4/qt.m4]) m4_include([acinclude.m4]) diff -Nru gpgme1.0-1.6.0/AUTHORS gpgme1.0-1.8.0/AUTHORS --- gpgme1.0-1.6.0/AUTHORS 2015-06-08 12:57:52.000000000 +0000 +++ gpgme1.0-1.8.0/AUTHORS 2016-09-21 07:42:50.000000000 +0000 @@ -1,5 +1,5 @@ Package: gpgme -Homepage: http://www.gnupg.org/related_software/gpgme/ +Homepage: https://gnupg.org/related_software/gpgme/ Download: ftp://ftp.gnupg.org/gcrypt/gpgme/ Repository: git://git.gnupg.org/gpgme.git Maintainer: Werner Koch diff -Nru gpgme1.0-1.6.0/autogen.sh gpgme1.0-1.8.0/autogen.sh --- gpgme1.0-1.6.0/autogen.sh 2014-07-30 09:40:16.000000000 +0000 +++ gpgme1.0-1.8.0/autogen.sh 2016-11-16 12:20:17.000000000 +0000 @@ -347,7 +347,7 @@ [ -z "${SILENT}" ] && cat <. @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,19 +168,29 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -197,6 +207,13 @@ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +224,13 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -223,6 +240,10 @@ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -235,6 +256,9 @@ *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,42 +275,42 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -359,16 +383,16 @@ exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -393,7 +417,7 @@ exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -618,13 +642,13 @@ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -663,11 +687,11 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -680,12 +704,12 @@ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -790,14 +814,14 @@ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -879,7 +903,7 @@ exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -902,7 +926,7 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -933,6 +957,9 @@ crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -945,6 +972,9 @@ ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -1021,7 +1051,7 @@ echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1100,7 +1130,7 @@ # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1249,6 +1279,9 @@ SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1262,9 +1295,9 @@ UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1286,7 +1319,7 @@ exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1317,7 +1350,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1359,7 +1392,7 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1370,23 +1403,25 @@ x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff -Nru gpgme1.0-1.6.0/build-aux/config.sub gpgme1.0-1.8.0/build-aux/config.sub --- gpgme1.0-1.6.0/build-aux/config.sub 2015-01-30 09:38:35.000000000 +0000 +++ gpgme1.0-1.8.0/build-aux/config.sub 2016-08-04 13:03:09.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-06-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +116,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -255,11 +254,12 @@ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ + | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -305,7 +305,7 @@ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,12 +376,13 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -428,12 +429,13 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +520,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -638,6 +643,14 @@ basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1373,18 +1386,18 @@ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1393,7 +1406,8 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1525,6 +1539,8 @@ ;; -nacl*) ;; + -ios) + ;; -none) ;; *) diff -Nru gpgme1.0-1.6.0/ChangeLog gpgme1.0-1.8.0/ChangeLog --- gpgme1.0-1.6.0/ChangeLog 2015-08-26 08:06:53.000000000 +0000 +++ gpgme1.0-1.8.0/ChangeLog 2016-11-16 12:47:28.000000000 +0000 @@ -1,3 +1,3486 @@ +2016-11-16 Werner Koch + + Release 1.8.0. + * configure.ac: Set version to 1.8.0. Set LT version C28/A17/RO. + Set CPP LT version to C9/A3/R0. Set Qt LT version to C8/A1/R0. + + core: Do not leak the override session key to ps(1). + * src/engine-gpg.c (struct engine_gpg): New field + override_session_key. + (gpg_release): Free that field. + (gpg_decrypt): With gnupg 2.1.16 use --override-session-key-fd. + + * tests/run-decrypt.c (main): Fix setting over the override key. + +2016-11-16 Daniel Kahn Gillmor + + doc,tests: Require use of ctx_flag before use of session_key. + * doc/gpgme.texi: Document requirements of verifying that it is OK to + use session_key. + * tests/run-decrypt.c: Ensure that we fail if we're unable to access + the session key, so that we do not violate the guidance above. + + + Changed the description + + -@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns + -@code{GPG_ERR_NO_ERROR} or @code{gpgme_get_ctx_flag (ctx, + -"export-session-key")} returns @code{"1"}. + +@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns success + +or @code{gpgme_get_ctx_flag (ctx, "export-session-key")} returns true + +(non-empty string). + + to get gpgme_get_ctx_flag for boolean values in sync with its own + description. + + Note that I don't agree with the above suggestion but it does not + really harm to have it in the man page. + +2016-11-15 Andre Heinecke + + qt, cpp: Add cmake config files for w32. + * lang/cpp/src/GpgmeppConfig-w32.cmake.in.in + lang/qt/src/QGpgmeConfig-w32.cmake.in.in: New. + * lang/cpp/src/GpgmeppConfig.cmake.in.in, + lang/qt/src/QGpgmeConfig.cmake.in.in: Remove libsuffix handling. + * lang/cpp/src/Makefile.am, + lang/qt/src/Makefile.am: Create / install w32 config files. + * configure.ac: Configure them. + + qt: Use new style connect in th..mixin. + * lang/qt/src/threadedjobmixin.h + (ThreadedJobMixin::lateInitialization): Use new style connect. + +2016-11-15 Werner Koch + + core: Implement context flag "override-session-key". + * src/gpgme.c (gpgme_set_ctx_flag): Add flags "export-session-key" and + "override-session-key". + (gpgme_get_ctx_flag): Ditto. + (gpgme_set_export_session_keys): Remove. + (gpgme_get_export_session_keys): Remove. + * src/gpgme.def, src/libgpgme.vers: Remove them. + * src/context.h (struct gpgme_context): Add field + override_session_key. + * src/decrypt-verify.c (decrypt_verify_start): Pass + override_session_key value to the engine. + * src/decrypt.c (decrypt_start): Ditto. + * src/engine.c (_gpgme_engine_op_decrypt): Ditto. + (_gpgme_engine_op_decrypt_verify): Ditto. + * src/engine-backend.h (struct engine_ops): Extend DECRYPT and + DECRYPT_VERIFY_START with override_session_key. + * src/engine-uiserver.c (_uiserver_decrypt): Add stub arg + override_session_key. + (uiserver_decrypt): Ditto. + (uiserver_decrypt_verify): Ditto. + * src/engine-gpgsm.c (gpgsm_decrypt): Ditto. + * src/engine-gpg.c (gpg_decrypt): Add arg override_session_key and set + corresponding gpg option. + + * tests/run-decrypt.c (print_result): Print the session key if + available. + (main): Add options --export-session-key and --override-session-key. + + core: Add public function gpgme_get_ctx_flag. + * src/gpgme.h.in (gpgme_get_ctx_flag): New. + * src/gpgme.c (gpgme_set_ctx_flag): Move down the file and add a trace + statement. + (gpgme_get_ctx_flag): New. + * src/gpgme.def, src/libgpgme.vers: Add new interface. + +2016-11-15 Daniel Kahn Gillmor + + core: Enable extraction of session keys. + * src/gpgme.c (gpgme_set_export_session_keys): New function. + (gpgme_get_export_session_keys): New function. + * src/gpgme.h.in (struct _gpgme_op_decrypt_result): Add session_key + member. + (gpgme_{set,get}_export_session_keys): Declare new functions. + * src/libgpgme.vers, src/gpgme.def: Export new functions in shared + object. + * src/engine.h: (_gpgme_engine_op_decrypt) Add export_session_key + parameter. + (_gpgme_engine_op_decrypt_verify): Add export_session_key parameter. + * src/engine-backend.h: (struct engine_ops): Change function + pointer declarations to match. + * src/context.h (struct gpgme_context): Add export_session_keys member. + * src/decrypt.c (release_op_data): Free result.session_key. + (_gpgme_decrypt_status_handler): Store a copy of the exported session + key. + (decrypt_start): Pass export_session_keys from the context. + * src/decrypt-verify.c (decrypt_verify_start): Pass + export_session_keys from context. + * src/engine.c (_gpgme_engine_op_decrypt): Pass through + export_session_key flag. + (_gpgme_engine_op_decrypt_verify): Pass through export_session_key + flag. + * src/engine-gpg.c (gpg_decrypt): If export_session_key is set, add + --export-session-key to argument list. + * src/engine-gpgsm.c (gpgsm_decrypt): Ignore export_session_key for + now, since gpgsm offers no such mechanism. + * src/engine-uiserver.c (_uiserver_decrypt): If export_session_key is + set, add --export-session-key flag to cmd. + * doc/gpgme.texi: Document new functions and session_key member of + decrypt_result_t. + * doc/uiserver.texi: Add --export-session-key flag to DECRYPT command. + +2016-11-14 Andre Heinecke + + qt: Add API to get the context for a Job. + * lang/qt/src/job.cpp, + lang/qt/src/job.h (Job::context): New. + * lang/qt/src/threadedjobmixin.cpp + (ThreadedJobMixin::~ThreadedJobMixin): New. Unregister context. + (ThreadedJobMixin::lateInitialization): Register context. + * NEWS: Update for cpp and qt. + + cpp: Add get / set Sender API. + * cpp/src/context.cpp, cpp/src/context.h (Context::setSender), + (Context::getSender): Add simple wrappers. + + qt, cpp: Enable dll build for windows. + * lang/cpp/src/Makefile.am, + lang/qt/src/Makefile.am: Add -no-undefined to LDFLAGS. + + w32: Fix build of w32-glib. + * src/Makefile.am (main_sources): Remove system_components_not_extra. + (libgpgme_la_SOURCES): Add system_components_not_extra. + (libgpgme_glib_la_SOURCES): Remove duplicated ath files. + +2016-11-11 Daniel Kahn Gillmor + + doc: Correct deftypefun for gpgme_op_decrypt_verify_start. + * doc/gpgme.texi: Documentationabout gpgme_op_decrypt_verify_start was + stored under the name gpgme_op_decrypt_verify instead. + + doc: Correct text about gpgme_cancel_async. + * doc/gpgme.texi: Documentation about gpgme_cancel_async should refer + to the correct name. + + core: Non-zero values should set _armor, _textmode, and _online. + * src/gpgme.c (gpgme_set_armor, gpgme_set_textmode, + gpgme_set_offline): Ensure that non-zero values actually set the + appropriate internal bit. + +2016-11-11 Alon Bar-Lev + + tests,python: Atomic directory creation. + * lang/python/tests/Makefile.am: Use MIDIR_P. + * tests/gpg/Makefile.am: Ditto. + * tests/gpgsm/Makefile.am: Ditto. + +2016-11-10 Werner Koch + + core: Use better error code when using select with a too high fd. + * src/posix-io.c (_gpgme_io_select): Return EMFILE instead of EBADF. + +2016-11-10 Andre Heinecke + + tests: Reduce thread count in new thread tests. + * gpg/t-thread-keylist-verify.c, + gpg/t-thread-keylist.c: Reduce threads to 100 + +2016-11-10 Werner Koch + + core: Detect unreadable keyrings. + * src/keylist.c (op_data_t): Add field keydb_search_err. + (keylist_status_handler): Parse STATUS_ERROR into that var. + (gpgme_op_keylist_next): Use that err instead of GPG_ERR_EOF. + +2016-11-10 Andre Heinecke + + tests: Fix additional memleaks in thread tests. + * tests/gpg/t-thread-keylist-verify.c (start_verify): Release + data. + (start_keylist): Unref keys. + * tests/gpg/t-thread-keylist.c (start_keylist): Unref keys. + + tests: Improve new thread tests. + * tests/gpg/t-thread-keylist-verify.c (start_keylist): Mark + arg as unused. Release context. + (start_verify): Ditto. + (main): Mark args as unused. + * tests/gpg/t-thread-keylist.c (start_keylist): Mark + arg as unused. Release context. + (main): Mark args as unused. + + core: Use gpgrt locking for thread safeness. + * configure.ac: Require libgpg-error 1.17. No longer + check for pthread. + * doc/gpgme.texi: Document removed neccessity for thread + safe gpgme flavours. + * src/sema.h (DEFINE_GLOBAL_LOCK), + (DEFINE_STATIC_LOCK, INIT_LOCK, DECLARE_LOCK) + (DESTROY_LOCK, LOCK, UNLOCK): Change to gpgrt equivalents. + * src/posix-sema.c, src/w32-sema.c: Removed. + * src/Makefile.am: Remove libpthread and + Update accordingly. + * src/ath.c, src/ath.h (ath_mutex_init) + (ath_mutex_destroy, ath_mutex_lock, ath_mutex_unlock): Removed. + * src/ath.h (ATH_MUTEX_INITIALIZER): Removed. + * src/version.c (do_subsystem_inits): sema_subsystem_init is + no longer required. + * tests/gpg/Makefile.am: Add new threading tests. + (t_thread1_LDADD, t_cancel_LDADD): + Use just gpgme. + * tests/gpg/t-thread-keylist-verify.c, + tests/gpg/t-thread-keylist.c: New. + * src/gpgme-config.in: Use -lgpgme for thread-model pthread. + +2016-11-09 Justus Winter + + python: Require at least GPGME 1.7 for out-of-tree builds. + * lang/python/setup.py.in: Bump required version to 1.7. + +2016-11-09 Werner Koch + + w32: Better protect the IO-system's fd_table. + * src/w32-io.c (fd_table_lock): New. + (new_fd): Lock allocation of a new slot. + (release_fd): Lock deallocation of a slot. + +2016-11-04 Andre Heinecke + + cpp: Add API for swdb queries. + * lang/cpp/src/swdbresult.cpp, + lang/cpp/src/swdbresult.h (SwdbResult): New. + * lang/cpp/src/Makefile.am: Update accordingly. + + cpp: Add more EngineInfo::Version ctors. + * lang/cpp/src/engineinfo.h + (EngineInfo::Version::Version(const char*)), + (EngineInfo::Version::Version()): New. + + cpp: Don't include gpgme.h in tofuinfo header. + * lang/cpp/src/tofuinfo.h: Don't include gpgme.h + + cpp: Extend gpgmefw for tofuinfo and swdb query. + * lang/cpp/src/gpgmefw.h (gpgme_tofu_info_t) + (gpgme_query_swdb_result_t): New forwards. + +2016-11-04 Werner Koch + + w32: Fix locating gpgconf on 64 bit systems. + * src/w32-util.c (find_program_at_standard_place): Use access to check + whether the binary is at CSIDL_PROGRAM_FILES before testing + CSIDL_PROGRAM_FILESX86. + +2016-11-03 Werner Koch + + core: Add gpgme_op_query_swdb and helper. + * src/gpgme.h.in (gpgme_query_swdb_result_t): New. + (gpgme_op_query_swdb): New. + (gpgme_op_query_swdb_result): New. + * src/libgpgme.vers, src/gpgme.def: Add the two new functions. + * src/queryswdb.c: New. + * src/Makefile.am (main_sources): Add new file. + * src/context.h (OPDATA_QUERY_SWDB): New. + * src/engine-backend.h (struct engine_ops): Add field 'query_swdb'. + Adjust all initializer. + * src/engine.c (_gpgme_engine_op_query_swdb): New. + * src/engine-gpgconf.c (parse_swdb_line): New. + (gpgconf_query_swdb): New. + (_gpgme_engine_ops_gpgconf): Register that function. + + * src/util.h (GPG_ERR_TOO_OLD): Define for older libgpg-error. + (GPG_ERR_ENGINE_TOO_OLD): Ditto. + + * tests/run-swdb.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add new debug tool. + +2016-11-03 Andre Heinecke + + qt: Change license of export / version header. + * lang/qt/src/qgpgme_export.h, + lang/qt/src/qgpgme_version.h: Change license to GPLv2+ + +2016-11-03 Werner Koch + + core: Make use of --homedir in gpgconf. + * src/engine-gpgconf.c (struct engine_gpgconf): Add field 'version'. + (have_gpgconf_version): New. + (gpgconf_release): Free VERSION. + (gpgconf_new): Set VERSION. + (gpgconf_read, gpgconf_write): Use --homedir with recent gnupg. + +2016-11-02 Andras Mantia + + qt: Fix build with g++ 4.8.x. + * lang/qt/src/defaultkeygenerationjob.cpp + (DefaultKeyGenerationJob::start): Explicitly connect pointer + in the QPointer. + +2016-11-02 Andre Heinecke + + qt, cpp: Fix versioning in cmake config and header. + * configure.ac (VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO): New + subst variables for the version header. + * lang/cpp/src/GpgmeppConfigVersion.cmake.in, + lang/cpp/src/gpgmepp_version.h.in, + lang/qt/src/QGpgmeConfigVersion.cmake.in, + lang/qt/src/qgpgme_version.h.in: Use new variables. + + qt: Install cmake config into qgpgme subdir. + * lang/qt/src/Makefile.am: Install cmake config file in qgpgme subdir. + + qt: Require gpgmepp from cmake config script. + * lang/qt/src/QGpgmeConfig.cmake.in.in: Require cpp. + + qt, cpp: Add all generated files to cleanfiles. + * cpp/src/Makefile.am (CLEANFILES), + qt/src/Makefile.am (CLEANFILES): Add all generated files + to cleanfiles. + +2016-11-01 Andre Heinecke + + qt: Add Distinguished Name parser from libkleo. + * lang/qt/src/dn.cpp (DN, DN::Attribute): New public API. + * lang/qt/src/dn.h: New. + * lang/qt/src/Makefile.am: Update accordingly. + + qt, cpp: Install version headers in subdirs. + * lang/cpp/src/Makefile.am, + lang/qt/src/Makefile.am: Install version headers in include + subdirs. + +2016-10-31 Justus Winter + + python: Use vanity modules for constants in tests and examples. + * lang/python/gpg/constants/sig/notation.py: New file. + * lang/python/gpg/constants/sig/__init__.py: Import new module. + + * lang/python/examples/assuan.py: Use more specific module for + constants, e.g. 'protocol.ASSUAN' instead of 'PROTOCOL_ASSUAN'. + * lang/python/examples/testCMSgetkey.py: Likewise. + * lang/python/tests/initial.py: Likewise. + * lang/python/tests/t-callbacks.py: Likewise. + * lang/python/tests/t-decrypt-verify.py: Likewise. + * lang/python/tests/t-decrypt.py: Likewise. + * lang/python/tests/t-edit.py: Likewise. + * lang/python/tests/t-encrypt-large.py: Likewise. + * lang/python/tests/t-encrypt-sign.py: Likewise. + * lang/python/tests/t-encrypt-sym.py: Likewise. + * lang/python/tests/t-encrypt.py: Likewise. + * lang/python/tests/t-export.py: Likewise. + * lang/python/tests/t-file-name.py: Likewise. + * lang/python/tests/t-idiomatic.py: Likewise. + * lang/python/tests/t-import.py: Likewise. + * lang/python/tests/t-keylist.py: Likewise. + * lang/python/tests/t-protocol-assuan.py: Likewise. + * lang/python/tests/t-sig-notation.py: Likewise. + * lang/python/tests/t-sign.py: Likewise. + * lang/python/tests/t-signers.py: Likewise. + * lang/python/tests/t-trustlist.py: Likewise. + * lang/python/tests/t-verify.py: Likewise. + * lang/python/tests/t-wait.py: Likewise. + + python: Import the topmost module in tests and examples. + * examples/verifydetails.py: Only import the topmost module 'gpg' and + update the code accordingly. + * tests/support.py: Likewise. + * tests/t-callbacks.py: Likewise. + * tests/t-data.py: Likewise. + * tests/t-decrypt-verify.py: Likewise. + * tests/t-decrypt.py: Likewise. + * tests/t-edit.py: Likewise. + * tests/t-encrypt-large.py: Likewise. + * tests/t-encrypt-sign.py: Likewise. + * tests/t-encrypt-sym.py: Likewise. + * tests/t-encrypt.py: Likewise. + * tests/t-export.py: Likewise. + * tests/t-file-name.py: Likewise. + * tests/t-import.py: Likewise. + * tests/t-keylist.py: Likewise. + * tests/t-sig-notation.py: Likewise. + * tests/t-sign.py: Likewise. + * tests/t-signers.py: Likewise. + * tests/t-trustlist.py: Likewise. + * tests/t-verify.py: Likewise. + * tests/t-wait.py: Likewise. + * tests/t-wrapper.py: Likewise. + + python: Improve constants module. + * lang/python/gpg/constants/__init__.py: Import all modules below + 'constants/'. Interface hygiene: delete 'util'. + * lang/python/gpg/constants/data/encoding.py: Delete 'util'. + * lang/python/gpg/constants/event.py: Likewise. + * lang/python/gpg/constants/import.py: Likewise. + * lang/python/gpg/constants/keylist/mode.py: Likewise. + * lang/python/gpg/constants/md.py: Likewise. + * lang/python/gpg/constants/pk.py: Likewise. + * lang/python/gpg/constants/protocol.py: Likewise. + * lang/python/gpg/constants/sig/mode.py: Likewise. + * lang/python/gpg/constants/sigsum.py: Likewise. + * lang/python/gpg/constants/validity.py: Likewise. + * lang/python/gpg/errors.py: Likewise. + +2016-10-31 Daniel Kahn Gillmor + + python: Rename Python module from PyME to gpg. + This follows weeks of discussion on the gnupg-devel mailing list. + Hopefully it will make it easier for people using Python to use GnuPG + in the future. + +2016-10-25 Werner Koch + + core: New API functions gpgme_set_sender, gpgme_get_sender. + * src/context.h (struct gpgme_context): Add field 'sender'. + * src/gpgme.c: Include mbox-util.h. + (gpgme_release): Free SENDER. + (gpgme_set_sender): New. + (gpgme_get_sender): New. + * src/gpgme.def, src/libgpgme.vers: Add new functions. + + * src/engine-gpg.c (append_args_from_sender): New. + (gpg_encrypt_sign, gpg_sign): Call append_args_from_sender. + (gpg_verify): Add arg CTX. Call append_args_from_sender/ + * src/engine-gpgsm.c (gpgsm_verify): Add dummy arg CTX. + * src/engine-uiserver.c (uiserver_verify): Ditto. + * src/engine.c (_gpgme_engine_op_verify): Add arg CTX. + * src/verify.c (verify_start): Pass CTX to engine function. + + * tests/gpg/t-verify.c (main): Add some checks for new functions. + * tests/run-sign.c (main): Add option --sender. + * tests/run-verify.c (main): Ditto. + +2016-10-19 Andre Heinecke + + qt: Improve WKSPublishJob apidoc. + * lang/qt/src/wkspublishjob.h: Improve doc. + +2016-10-18 Werner Koch + + Release 1.7.1. + * configure.ac: Set LT version to C27/A16/R0. Note that the LT + versions for cpp and Qt have already been updated. + +2016-10-14 Werner Koch + + tests: Make t-cancel more portable. + * tests/gpg/t-cancel.c: Include sys/time.h and protect sys/select.h. + + python: Call ln(1) in a portable way. + * lang/python/Makefile.am: Specify target dir for ln. + +2016-10-14 Andre Heinecke + + cpp: Fix init of string from null. + * lang/cpp/src/key.cpp (UserID::addrSpecFromString): Check return + value before creating the string. + +2016-10-13 Justus Winter + + python: Make 'get_key' more idiomatic. + * lang/python/pyme/core.py (Context.get_key): Raise errors.KeyNotFound + if the key is not found. This error is both a KeyError for idiomatic + error handling as well as a GPGMEError so we don't break existing + code. + * lang/python/pyme/errors.py (KeyNotFound): New class. + * lang/python/tests/support.py (no_such_key): New variable. + * lang/python/tests/t-keylist.py: Test the new behavior. + + python: Return public keys by default. + * lang/python/pyme/core.py (Core.get_key): Return public keys by + default, improve docstring. + * lang/python/examples/testCMSgetkey.py: Update example. + * lang/python/examples/verifydetails.py: Likewise. + + GnuPG-bug-id: 2751 + + python: Fix example. + * lang/python/examples/inter-edit.py: Fix example. + + Fixes-commit: a458e7fe + +2016-10-13 Andre Heinecke + + cpp: Fix version number. + * configure.ac (LIBGPGMEPP_LT_CURRENT): Bump. + + qt, cpp: Fix permissions of Config files. + * lang/cpp/src/Makefile.am, + lang/qt/src/Makefile.am: Do not install config files as executable. + + qt: Install SpecialJob. + * lang/qt/src/Makefile.am: Install SpecialJob + * NEWS: mention it. + + qt, cpp: Fix expected targets in Config files. + * lang/cpp/src/GpgmeppConfig.cmake.in.in, + lang/qt/src/QGpgmeConfig.cmake.in.in: Remove KF5 variants. + +2016-10-11 Daniel Vrátil + + qt: Add missing implementation of MultiDeleteJob. + * lang/qt/src/multideletejob.h: Fix include, cryptobackend.h is now + called protocol.h + * lang/qt/src/multideletejob.cpp: New file. + * lang/qt/src/Makefile.am: Add multideletejob.cpp. + + qt: Install abstractimportjob.h. + * lang/cpp/src/Makefile.am: Install abstractimportjob.h since it's + included from importjob.h + +2016-10-11 Andre Heinecke + + cpp: Add API for gpgme_addrspec_from_uid. + * lang/cpp/src/key.cpp (UserID::addrSpecFromString): New static + function to expose addrspec from uid. + (UserID::addrSpec): New. Get addrSpec from Userid. + * NEWS: Update accordingly. + +2016-10-10 Andre Heinecke + + Add NEWS for cpp and qt, bump cpp version. + * NEWS: Add entries for cpp and qt changes. + * configure.ac: Bump cpp version because of added API. + + Add convenience function to get key from sig. + * lang/cpp/src/verificationresult.cpp (Signature::key(bool, bool)): + New. Can be used to search / update the key associcated with this + signature. + + cpp: Return null key if the signature had no key. + * lang/cpp/src/verificationresult.cpp (Private): Add null key + to list when there is no key associated with the signature. + + qt: Add simple verify test. + * lang/qt/tests/t-verify.cpp: New. Small test if a signature + returns a key with fingerprint. + * lang/qt/tests/Makefile.am: Add new test. + + core: Fix w32 crash in find_program_in_dir. + * src/w32-util.c (find_program_in_dir): Fix call to _gpgme_strconcat. + +2016-10-08 Werner Koch + + core: New helper function gpgme_addrspec_from_uid. + * src/gpgme.h.in: Add gpgme_addrspec_from_uid. + * src/gpgme.def, src/libgpgme.vers: Ditto. + * src/mbox-util.c (gpgme_addrspec_from_uid): New. + +2016-10-06 Justus Winter + + Add missing includes. + * lang/cpp/src/key.cpp: Include for 'strcasecmp'. + * tests/gpg/t-cancel.c: Include for 'fd_set' and + friends. + +2016-10-05 Andre Heinecke + + cpp: Bump Revision. + * configure.ac (LIBGPGMEPP_LT_REVISION): Bump revision. + + qt: Fix spelling error in WKSPublishJob. + * src/qgpgmewkspublishjob.cpp, + src/qgpgmewkspublishjob.h, + src/wkspublishjob.h, + tests/t-wkspublish.cpp: Fix spelling of received. + * src/configure.ac (LIBQGPGME_LT_CURRENT): Bump + accordingly. + + qt: Disable tests that require a password for 2.0. + * lang/qt/tests/t-encrypt.cpp: Disable tests that require + a password for 2.0. + + Add warning flags for c++ compiler, too. + * configure.ac (CXXFLAGS): Add Wall and Wextra. + + qt: Fix unused variable warnings. + * qt/src/qgpgmenewcryptoconfig.cpp, + qt/src/threadedjobmixin.h, + qt/tests/t-encrypt.cpp, + qt/tests/t-support.h, + qt/tests/t-wkspublish.cpp: Mark additional variables as unused. + + cpp: Add support for URL Data encodings. + * lang/cpp/src/data.h (Data::Encoding): Extend enum. + * lang/cpp/src/data.cpp (Data::encoding), + Data::setEncoding): Support new values. + + cpp: Fix gcc diagnostic push / pop. + * lang/cpp/src/context.cpp: Fix pragmas. + + qt: Disable t-wkspublish test. + * lang/qt/tests/Makefile.am (TESTS): Remove t-wkspublish. + +2016-09-30 Alon Bar-Lev + + python: Link 'data.h' and 'config.h' into the builddir. + * lang/python/Makefile.am: Link to the files. + * lang/python/gpgme.i: Update path. + * lang/python/setup.py.in: Do not add the top builddir to the include + path. + + python: Add 'prepare' target. + * lang/python/Makefile.am: Add 'prepare' target. + +2016-09-29 Andre Heinecke + + cpp, qt: Handle modified includedir installation. + * lang/cpp/src/Makefile.am, + lang/qt/src/Makefile.am: Replace resolved_includedir. + * lang/cpp/src/GpgmeppConfig.cmake.in.in, + lang/qt/src/QGpgmeConfig.cmake.in.in: Use resolved_includedir + instead of relying on a common installation prefix. + +2016-09-27 Daniel Kahn Gillmor + + Clarify licensing. + * src/b64dec.c, src/mbox-util.c, src/mbox-util.h: These three files + are explicitly licensed under LGPL, but their comments suggest that + details about the warranty can be found in the GPL. Adjust comments + to refer to the correct license. + +2016-09-27 Justus Winter + + tests: Fix check for gpg versions not reporting the critical flag. + * lang/python/tests/t-sig-notation.py: Also blacklist 2.0.x. + * tests/gpg/t-sig-notation.c: Likewise. + +2016-09-26 Justus Winter + + python: Correctly translate to size_t. + * lang/python/gpgme.i: Correctly translate Python number to size_t. + + python: Correctly translate off_t. + * lang/python/gpgme.i: Improve int/long translations, correctly handle + off_t with large file support. + + python: Include 'config.h'. + * lang/python/Makefile.am: Pass 'top_builddir' to 'setup.py'. + * lang/python/gpgme.i: Include 'config.h'. + * lang/python/helpers.c: Likewise. + * lang/python/helpers.h: Likewise. + * lang/python/setup.py.in: Make sure that 'config.h' can be found. + +2016-09-23 Daniel Kahn Gillmor + + Fix spelling. + * lang/cpp/src/context.h, lang/qt/src/protocol.h, + lang/qt/src/wkspublishjob.h, src/data-identify.c, src/engine-gpg.c: + minor spelling cleanup. + + move some file encodings to UTF-8. + * THANKS, doc/ChangeLog-2011, tests/ChangeLog-2011, + tests/gpg/geheim.txt: convert from iso 8859-1 to utf-8. + * lang/qt/src/dataprovider.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp, + lang/qt/src/qgpgmesecretkeyexportjob.cpp: replace U+FFFD REPLACEMENT + CHARACTER with proper U+00E4 LATIN SMALL LETTER A WITH DIAERESIS. + +2016-09-23 Andre Heinecke + + tests: Check data after decryption. + * tests/gpgsm/t-decrypt.c (main): Check data matches expected. + Only print result if it does not. + + cpp, qt: Include config.h. + lang/cpp/src/callbacks.cpp, + lang/cpp/src/configuration.cpp, + lang/cpp/src/context.cpp, + lang/cpp/src/context_glib.cpp, + lang/cpp/src/context_qt.cpp, + lang/cpp/src/context_vanilla.cpp, + lang/cpp/src/data.cpp, + lang/cpp/src/decryptionresult.cpp, + lang/cpp/src/defaultassuantransaction.cpp, + lang/cpp/src/editinteractor.cpp, + lang/cpp/src/encryptionresult.cpp, + lang/cpp/src/engineinfo.cpp, + lang/cpp/src/eventloopinteractor.cpp, + lang/cpp/src/exception.cpp, + lang/cpp/src/gpgadduserideditinteractor.cpp, + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, + lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, + lang/cpp/src/gpgsetownertrusteditinteractor.cpp, + lang/cpp/src/gpgsignkeyeditinteractor.cpp, + lang/cpp/src/importresult.cpp, + lang/cpp/src/key.cpp, + lang/cpp/src/keygenerationresult.cpp, + lang/cpp/src/keylistresult.cpp, + lang/cpp/src/scdgetinfoassuantransaction.cpp, + lang/cpp/src/signingresult.cpp, + lang/cpp/src/tofuinfo.cpp, + lang/cpp/src/trustitem.cpp, + lang/cpp/src/verificationresult.cpp, + lang/cpp/src/vfsmountresult.cpp, + lang/qt/src/dataprovider.cpp, + lang/qt/src/defaultkeygenerationjob.cpp, + lang/qt/src/gpgme_backend_debug.cpp, + lang/qt/src/job.cpp, + lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmebackend.cpp, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmedecryptjob.cpp, + lang/qt/src/qgpgmedecryptverifyjob.cpp, + lang/qt/src/qgpgmedeletejob.cpp, + lang/qt/src/qgpgmedownloadjob.cpp, + lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmeexportjob.cpp, + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, + lang/qt/src/qgpgmeimportjob.cpp, + lang/qt/src/qgpgmekeyformailboxjob.cpp, + lang/qt/src/qgpgmekeygenerationjob.cpp, + lang/qt/src/qgpgmekeylistjob.cpp, + lang/qt/src/qgpgmelistallkeysjob.cpp, + lang/qt/src/qgpgmenewcryptoconfig.cpp, + lang/qt/src/qgpgmerefreshkeysjob.cpp, + lang/qt/src/qgpgmesecretkeyexportjob.cpp, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmesignjob.cpp, + lang/qt/src/qgpgmesignkeyjob.cpp, + lang/qt/src/qgpgmetofupolicyjob.cpp, + lang/qt/src/qgpgmeverifydetachedjob.cpp, + lang/qt/src/qgpgmeverifyopaquejob.cpp, + lang/qt/src/qgpgmewkspublishjob.cpp, + lang/qt/src/threadedjobmixin.cpp, + lang/qt/tests/run-keyformailboxjob.cpp, + lang/qt/tests/t-encrypt.cpp, + lang/qt/tests/t-keylist.cpp, + lang/qt/tests/t-keylocate.cpp, + lang/qt/tests/t-ownertrust.cpp, + lang/qt/tests/t-support.cpp, + lang/qt/tests/t-tofuinfo.cpp, + lang/qt/tests/t-wkspublish.cpp: Include config.h + +2016-09-22 Werner Koch + + w32: Silence some warnings about unused parameters. + * src/assuan-support.c (my_recvmsg, my_sendmsg, my_waitpid) + (my_socketpair) [W32]: Mark unused parameters. + + core: Fix error checking in _gpgme_mkstemp. + * src/w32-util.c (_gpgme_mkstemp): Fix error checking. + (dlopen): Mark FLAGS as unused. + + core: New helper function _gpgme_strconcat. + * src/conversion.c: Include stdarg.h. + (do_strconcat): New. + (_gpgme_strconcat): New. + * src/util.h: Provide fallback for GPGRT_ATTR_SENTINEL. + (_gpgme_strconcat): New with sentinel. + + * src/w32-util.c (find_program_in_dir): Replace malloc and stpcpy by + _gpgme_strconcat. + (find_program_at_standard_place): Ditto. + (_gpgme_set_default_gpg_name): Ditto. + (_gpgme_set_default_gpgconf_name): Ditto. + (_gpgme_mkstemp): Ditto. + (_gpgme_set_override_inst_dir): Repalce malloc and strcpy by strdup. + +2016-09-22 Daiki Ueno + + tests: Add test for cancellation. + * tests/gpg/t-cancel.c: New file. + * tests/gpg/Makefile.am (tests_skipped): New variable, default to + t-genkey and t-cancel. + (noinst_PROGRAMS): Add $(tests_skipped). + * tests/gpg/.gitignore: Add t-cancel. + + gpg: Add option --exit-on-status-write-error. + * src/engine-gpg.c (gpg_new): Add --exit-on-status-write-error if the + engine version is latest enough to expect progress output from gpg. + + tests: Fix select usage in t-eventloop. + * tests/gpg/t-eventloop.c (do_select): Supply timeout value to select. + + doc: Fix minor errors in I/O callback example. + * gpgme.texi (I/O Callback Example): Fix typos, add timeout to select, + and initialize mutex as recursive. + +2016-09-21 Andreas Stieger + + cpp: Avoid missing returns in non-void functions. + * lang/cpp/src/context.cpp + (Context::signaturePolicyURL): return nullptr on default + (to_tofu_policy_t): add default case for unknown + * lang/cpp/src/key.cpp + (Key::primaryFingerprint): return nullptr on default + * lang/cpp/src/tofuinfo.cpp + (GpgME::TofuInfo::policy): add default case for unknown + +2016-09-21 Werner Koch + + Release 1.7.0. + * configure.ac: Bump LT vesion to C26/A15/R0. + + python: Create install dir. + * lang/python/Makefile.am (install-exec-local): Create dir. + +2016-09-20 Werner Koch + + tests: Make "make -j distcheck" work in Python. + * lang/python/Makefile.am (SUBDIRS): Make current dir fist. + * lang/python/tests/Makefile.am (xcheck): Depend on pubring-stamp. + (CLEANFILES): Remove private-keys-v1.d/gpg-sample.stamp. + (check-local): Remove. + (initial.py): Remove dependency. + (./pubring-stamp): Depend on conf files and the + private-keys-v1.d/gpg-sample.stamp file. Also replace use of + basename. + + tests: Use --batch for gpg import. + * lang/python/tests/Makefile.am (./pubring-stamp): Use --batch with + GPG to avoid Pinentries during import when using GnuPG >= 2.1. + Replace touch by echo. + * tests/gpg/Makefile.am (./pubring-stamp): Ditto. + + tests: Improve portability. + * lang/qt/tests/Makefile.am (clean-local): Avoid non-portable "--" + * lang/python/Makefile.am (copystamp): Use well defined cp -R instead + of cp -r. + + build: Create swdb file. + * Makefile.am (distcheck-hook): New. + (dist-hook): s/VERSION/PACKAGE_VERSION/ for future compatibility. + +2016-09-20 Justus Winter + + python: Fix detection of Python available versions. + * configure.ac: Test for 'PYTHON_VERSION' as 'AX_PYTHON_DEVEL' sets + 'PYTHON' but clears the former. + + Fixes-commit: 99db3512 + +2016-09-19 Andre Heinecke + + core: Remove moc artifact. + * src/moc_kdpipeiodevice.cpp: Removed. + * src/Makefile.am (EXTRA_DIST): Remove moc_kdpipeiodevice.cpp. + + qt: Improve README. + * lang/qt/README: Add more content. Clearly note license difference. + + cpp: Improve README. + * lang/cpp/README: Add more content, move license to bottom. + + qt: Add debug output for testTofuPolicy. + * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add + debug output. + +2016-09-19 Ben Kibbey + + core: Check for GPG_TTY as well as DISPLAY. + * src/engine-assuan.c (llass_new): Update --ttyname from GPG_TTY. + * src/engine-g13.c (g13_new): Ditto. + * src/engine-gpg.c (gpg_new): Ditto. + * src/engine-uiserver.c (uiserver_new): Ditto. + * src/engine-gpgsm.c (gpgsm_new): Ditto. + +2016-09-16 Andre Heinecke + + qt: Add test for setting tofu policy. + * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New. + + qt: Add job for tofupolicy. + * lang/qt/src/job.cpp, lang/qt/src/protocol.h, + lang/qt/src/protocol_p.h: Register job. + * lang/qt/src/qgpgmetofupolicyjob.cpp, + lang/qt/src/qgpgmetofupolicyjob.h, + lang/qt/src/tofupolicyjob.h: New. + * lang/qt/src/Makefile.am: Update accordingly. + + cpp: Add support for gpgme_op_tofu_policy. + * src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): + New. + + cpp: Declare sizes of tofu-info enums. + * lang/cpp/src/tofuinfo.h (Policy, Validity): Declare sizes. + +2016-09-16 Werner Koch + + cpp: Silence use of deprecated function warning. + * lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning. + + core: Document the version a function has been deprecated. + * src/gpgme.h.in (_GPGME_DEPRECATED): Change to take versio numbers + for documentation. Change all places. + (_GPGME_DEPRECATED_OUTSIDE_GPGME): Ditto. + * lang/python/gpgme-h-clean.py: Adjust RE. + + core: Map GPGME_STATUS_EOF to the empty string. + * src/status-table.c (_gpgme_status_to_string): Return "" for EOF. + * src/engine-gpg.c (read_status): Ditto. The old code accidently used + GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string. + +2016-09-16 Justus Winter + Kai Michaelis + + python: Release the GIL during calls into GPGME. + * lang/python/helpers.c (pyme_raise_callback_exception): Re-acquire + the Global Interpreter Lock. + (pyPassphraseCb, pyme_set_passphrase_cb, pyProgressCb, + pyme_set_progress_cb, pyStatusCb, pyme_set_status_cb, + _pyme_interact_cb, pyDataReadCb, pyDataWriteCb, pyDataSeekCb, + pyDataReleaseCb, pyme_data_new_from_cbs, _pyme_assuan_data_cb, + _pyme_assuan_inquire_cb, _pyme_assuan_status_cb): Likewise. + * lang/python/setup.py.in: Make 'gpgme-config' emit the correct + cflags, and SWIG generate code to release the GIL before calling us. + +2016-09-16 Justus Winter + + python: Adapt to 'gpgme_op_interact'. + * lang/python/examples/inter-edit.py: Update example. + * lang/python/gpgme.i (gpgme_edit_cb_t): Turn into + 'gpgme_interact_cb_t'. + * lang/python/helpers.c (_pyme_edit_cb): Turn into + '_pyme_interact_cb_t'. + * lang/python/private.h (_pyme_edit_cb): Likewise. + * lang/python/pyme/constants/__init__.py: Replace numeric status codes + with the keywords. + * lang/python/pyme/constants/status.py: Likewise. + * lang/python/pyme/core.py (Context.interact): New method. + (Context.op_edit): Deprecate, update docstring, implement using + Context.interact. + * lang/python/tests/t-edit.py: Test both interfaces. + +2016-09-16 Werner Koch + + core: Remove stub to try implementing gpg < 2.1 support for createkey. + * src/engine-gpg.c (gpg_createkey_legacy): Remove. + (gpg_genkey): Remove call. + + core: Fix setting og the verification result. + * src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG + status. + +2016-09-15 Werner Koch + + core: New function gpgme_op_interact, deprecate gpgme_op_edit. + * src/gpgme.h.in (gpgme_interact_cb_t): New. + (GPGME_INTERACT_CARD): New. + (gpgme_op_interact_start, gpgme_op_interact): New. + * src/libgpgme.vers, src/gpgme.def: Add new functions. + * src/edit.c (op_data_t): Rename fnc to fnc_old and change users. Add + fnc. + (edit_status_handler): Call old or new callback. + (command_handler): Ditto. + (interact_start): New. + (gpgme_op_interact_start, gpgme_op_interact_start): New. + * src/status-table.c (_gpgme_status_to_string): New. + + * tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change + type of STATUS. Use gpgme_io_writen. + (main): s/gpgme_op_edit/gpgme_op_interact/. + + core: Minor change of the gpgme_op_edit semantics. + * src/edit.c (command_handler): Handle special error code. + * src/engine-gpg.c (read_status): Ditto. + * src/engine-gpgsm.c (status_handler): Ditto. + * src/engine-uiserver.c (status_handler): Ditto. + * src/util.h (GPG_ERR_FALSE): Define for older libgpg-error versions. + +2016-09-14 Werner Koch + + core: New function gpgme_op_tofu_policy. + * src/gpgme.h.in (gpgme_op_tofu_policy_start): New function. + (gpgme_op_tofu_policy): New function. + * src/libgpgme.vers, src/gpgme.def: Add new functions. + * src/tofupolicy.c: New. + * src/Makefile.am (main_sources): Add that file. + * src/context.h (ctx_op_data_id_t): Add OPDATA_TOFU_POLICY. + * src/engine.c (_gpgme_engine_op_tofu_policy): New. + * src/engine-backend.h (engine_ops): Add funcptr 'tofu_policy'. + Adjust all engine initializations. + * src/engine-gpg.c (gpg_tofu_policy): New. + (_gpgme_engine_ops_gpg): Register this function. + + * tests/run-tofu.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add it. + + core: Defer implementation of gpgme_op_createkey with gpg < 2.1. + * src/engine-gpg.c (gpg_createkey_legacy): Mark unused variables. + + core: New function gpgme_op_keysign. + * src/gpgme.h.in (gpgme_op_keysign_start, gpgme_op_keysign): New. + (GPGME_KEYSIGN_LOCAL): New. + (GPGME_KEYSIGN_LFSEP): New. + (GPGME_KEYSIGN_NOEXPIRE): New. + * src/context.h (ctx_op_data_id_t): Add OPDATA_KEYSIGN. + * src/keysign.c: New. + * src/Makefile.am (main_sources): Add keysig. + * src/libgpgme.vers, src/gpgme.def: Add gpgme_op_keysign_start. + * src/engine.c (_gpgme_engine_op_keysign): New. + * src/engine-backend.h (engine_ops): Add 'keysign' and adjust all + engine initializers. + * src/engine-gpg.c (_add_arg): Add args PREFIX and ARGLEN and change + callers to set them. + (add_arg_pfx): New. + (add_arg_len): New. + (gpg_keysign): New. + (_gpgme_engine_ops_gpg): Set keysign to gpg_keysign. + * tests/run-keysign.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-keysign. + +2016-09-14 Justus Winter + + python: Clarify that we support Python 2.7 too. + * lang/python/README: Use 'Python' instead of 'Python 3'. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/setup.py.in: Add classifier for 2.7, drop 3 only. + + python: Trim imports. + * lang/python/examples/encrypt-to-all.py: Drop unused import of 'os'. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + + python: Improve error handling. + * lang/python/gpgme.i (gpgme_engine_info_t): Improve error handling. + + python: Adapt to TOFU changes. + * lang/python/pyme/results.py (TofuInfo): Drop. + (Signature): The TOFU information moved to the key. + + python: Improve build system integration. + * configure.ac: Try to compile a Python module for each version. + * m4/m4_ax_swig_python.m4: Drop unused file. + +2016-09-14 Werner Koch + + core: New function gpgme_op_revuid. + * src/engine.h (GENKEY_EXTRAFLAG_REVOKE): New. + * src/genkey.c (adduid_start): Rename to addrevuid_start. Add arg + REVOKE and pass it as extraflags. Remove useless ARMOR extraflag. + Adjust callers. + (gpgme_op_revuid_start, gpgme_op_revuid): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + + * tests/run-genkey.c: Add option --revuid. + + core: Change a parameter for the engine's genkey function. + * src/engine.h (GENKEY_EXTRAFLAG_ARMOR): New. + * src/engine-backend.h (engine_ops): Rename USE_ARMOR in genkey to + EXTRAFLAGS. + * src/engine.c (_gpgme_engine_op_genkey): Ditto. + * src/engine-gpg.c (gpg_createkey_from_param): Ditto and test the + flags. + (gpg_createkey_legacy): Ditto. + (gpg_createkey): Ditto. + (gpg_addkey): Ditto. + (gpg_genkey): Ditto. + +2016-09-14 Justus Winter + + python: Build for both Python2 and Python3. + * NEWS: Update. + * configure.ac: Check for multiple Python versions. + * lang/python/Makefile.am: Build and install for both Python versions. + * lang/python/tests/Makefile.am: Test both versions. + * lang/python/tests/run-tests.py: New test runner. + +2016-09-14 Werner Koch + + core: New function gpgme_op_adduid. + * src/genkey.c: Replace most error codes GPG_ERR_INV_VALUE by + GPG_ERR_INV_ARG. + (struct op_data_t): Add field UIDMODE. + (genkey_status_handler): Use UIDMODE. + (adduid_start): New. + (gpgme_op_adduid_start, gpgme_op_adduid): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + * tests/run-genkey.c: Add option --adduid. + + core: New function gpgme_op_createsubkey. + * src/genkey.c (createsubkey_start): New. + (gpgme_op_createsubkey_start, gpgme_op_createsubkey): New. + * src/gpgme.def, src/libgpgme.vers: Add them. + * src/engine-gpg.c (gpg_createkey): Factor some code out to ... + (gpg_add_algo_usage_expire): new. + (gpg_addkey): Implement. + * tests/run-genkey.c: Add option --addkey. + +2016-09-13 Werner Koch + + core: Use const char * where appropriate. + + core: Cast away the common const problem with spawn and argv. + * src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV. + + core: Fix condition-always-true warning in trace macro. + * src/data-compat.c (old_user_read): Cast AMT. + + core: Mark unused function args. + + tests: Mark lots of unused vars and fix const mismatches. + + tests: Use gpgme_io_write in passhrase callbacks. + * tests/gpg/t-support.h (passphrase_cb): Use gpgme_io_write. + * tests/gpgsm/t-support.h (passphrase_cb): Ditto. + * tests/run-support.h (passphrase_cb): Ditto. + + core: Do not pass const char* to functions taking a char*. + + build: Use more compiler warnings. + * configure.ac: Add useful compiler warnings. + + core: New function gpgme_op_create_key. + * src/engine-backend.h (engine_ops): Change prototype of genkey. + * src/engine-gpgsm.c (gpgsm_genkey): Change accordingly. + * src/engine-gpg.c (gpg_genkey): Change it to a dispatcher. + (gpg_createkey_from_param): New for the old functionality. + (gpg_createkey_legacy): New. Stub for now. + (gpg_createkey): New. + (gpg_addkey): New. Stub for now. + (gpg_adduid): New. Stub for now. + * src/engine.c (_gpgme_engine_op_genkey): Add new args. + * src/genkey.c (op_data_t): Add field ERROR_CODE. + (parse_error): New. + (genkey_status_handler): Parse ERROR status line. + (genkey_start): Use NULL/0 for the new args. + (createkey_start): New. + (gpgme_op_createkey_start, gpgme_op_createkey): New. + * src/gpgme.def, src/libgpgme.vers: Add gpgme_op_createkey_start and + gpgme_op_createkey. + * src/gpgme.h.in (_gpgme_op_genkey_result): Add fields PUBKEY and + SECKEY. + (GPGME_CREATE_SIGN): New. + (GPGME_CREATE_ENCR): New. + (GPGME_CREATE_CERT): New. + (GPGME_CREATE_AUTH): New. + (GPGME_CREATE_NOPASSWD): New. + (GPGME_CREATE_SELFSIGNED): New. + (GPGME_CREATE_NOSTORE): New. + (GPGME_CREATE_WANTPUB): New. + (GPGME_CREATE_WANTSEC): New. + (GPGME_CREATE_FORCE): New. + + * tests/run-genkey.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add it. + +2016-09-13 Justus Winter + + python: Handle slight differences between Python 2 and 3. + * lang/python/helpers.c (pyDataWriteCb): Handle Python integers being + returned on Python 2. + (pyDataSeekCb): Likewise. + * lang/python/pyme/core.py (Data.__init__): Fix testing for string + argument. + (Data.new_from_filepart): Likewise. + * lang/python/pyme/util.py (is_a_string): New function. + * lang/python/tests/t-encrypt-large.py (read_cb): Force evaluation of + generator. + * lang/python/tests/t-idiomatic.py: Partly skip test on Python 2. + * lang/python/tests/t-verify.py (check_result): Here, the difference + between 2 and 3 really matters. We cannot change the char * + conversion in Python 2 without breaking all existing applications, and + using bytestrings in Python 3 would be very inconvenient. + + python: Fix types and error handling. + * lang/python/helpers.c (_pyme_edit_cb): Drop the const. + (_pyme_assuan_{data,inquire,status}_cb): Fix error handling. + +2016-09-12 Justus Winter + + python: Avoid Python3-only form of super(). + * lang/python/pyme/core.py (GpgmeWrapper.__repr__): Use more + compatible form of super. + (GpgmeWrapper.__setattr__): Likewise. + (Context.__init__): Likewise. + (Data.__init__): Likewise. + + python: Make type translation compatible with Python 2.7. + * lang/python/gpgme.i: Avoid functions not available in Python 2.7. + * lang/python/helpers.c: Likewise. + + python: Avoid hardcoding the interpreter. + * lang/python/setup.py.in: Avoid hardcoding the interpreter. + + python: Do not rely on subprocess.DEVNULL. + * lang/python/setup.py.in: Do not rely on subprocess.DEVNULL. + + tests: Fix version comparison. + * tests/gpg/t-sig-notation.c: Fix version comparison. + + Fixes-commit: a0263ad2 + + tests: Make signature notation test compatible with older GnuPGs. + * lang/python/tests/t-sig-notation.py: Only check the critical flag + when GnuPG >= 2.1.13 is used. + * tests/gpg/t-sig-notation.c: Likewise. + + Fixes-commit: c88c9ef3 + +2016-09-12 Andre Heinecke + + qt: Fix some includes. + * lang/qt/src/qgpgmekeyformailboxjob.cpp: Explicitly include + QStringList. + * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp: Move + includes into impl. Explicitly include QDir. + +2016-09-12 Justus Winter + + qt: Fix tofu test. + * lang/qt/tests/t-tofuinfo.cpp: Adjust member names. + + Fixes-commit: 120b1478 + +2016-09-07 Werner Koch + + core,cpp: Extend the TOFU information. + * src/gpgme.h.in (struct _gpeme_tofu_info): Rename FIRSTSEEN to + SIGNFIRST and LASTSEEN to SIGNLAST. Add ENCRFIST and ENCRLAST. + * src/keylist.c (parse_tfs_record): Parse to ENCRFIRST and ENCRLAST. + * src/verify.c (parse_tofu_stats): Ditto. + * tests/run-keylist.c (main): Adjust and print encrypt stats. + * tests/run-verify.c (print_result): Ditto. + + * lang/cpp/src/tofuinfo.h (TofuInfo): Rename firstSeen to signFirst + and lastSeen to signLast. Add encrCount, encrFirst and encrLast. + * lang/cpp/src/tofuinfo.cpp (encrCount, encrFirst, encrLast): New. + +2016-09-06 Andre Heinecke + + tests: Set passphrase cb in t-encrypt-mixed. + * tests/gpg/t-encrypt-mixed.c (main): Set passphrase cb. + + core: Check for gpg version for loopback mode. + * src/engine-gpg.c (build_argv): Check for version 2.1.0 + before adding pinentry-mode. + + core: Fix passphrase cb for mixed sym encrypt. + * src/encrypt.c (encrypt_start): Handle SYMMETRIC flag. + * src/encrypt-sign.c (encrypt_sign_start): Ditto. + +2016-09-05 Andre Heinecke + + qt: Clarify comment and strings in tofuinfo test. + * lang/qt/tests/t-tofuinfo.cpp (testTofuSignCount) + (testTofuKeyList): Ensure distinct messages. Clarify comment. + + qt: Enable signcount checks in tofuinfo test. + * lang/qt/tests/t-tofuinfo.cpp: Enable checks for signcount. + + cpp: Add convenience update function to a key. + * lang/cpp/src/key.cpp (Key::update): New. + * lang/cpp/src/key.h: Update accordingly. + + cpp: Add ostream operators for key and uid. + * lang/cpp/src/key.cpp (Key, UserID): Add ostream operator. + * lang/cpp/src/key.h: Update accordingly. + + qt: Add missing header redirection. + * lang/qt/src/keyformailboxjob.h, + lang/qt/src/qgpgmekeyformailboxjob.h: Fix includes. + + qt: Include cpp before core directory. + * lang/qt/src/Makefile.am (AM_CPPFLAGS): Include cpp before core. + +2016-08-25 Andre Heinecke + + qt: Fix 2.1 t-support copy. + * lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy. + + qt: Fix and extend TofuInfo test. + * lang/qt/tests/t-tofuinfo.cpp: Delete executed jobs. + (testTofuKeyList): New. + (testSupported): Activate for 2.1.16 + (signAndVerify): Disable sigcount tests. + + qt: Fix keyring copy in tests. + * lang/qt/test/t-encrypt.cpp, + lang/qt/test/t-tofuinfo.cpp: Assert on copy failure. + * lang/qt/test/t-support.cpp (copyKeyrings): Fix path. + + qt: Add generic flag support for keylistjobs. + * lang/qt/src/keylistjob.h (addMode): New. + * lang/qt/src/qgpgmekeylistjob.h (addMode): New. + * lang/qt/src/qgpgmekeylistjob.cpp (addMode: New. + + qt: Ensure that current src dir is included first. + * lang/qt/src/Makefile.am: Reorder include directives. + + cpp: Add WithTofu Keylist Mode. + * lang/cpp/src/context.cpp: Handle WithTofu. + * lang/cpp/src/global.h (KeyListMode): Add WithTofu. + * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Handle WithTofu. + + qt: Fix tofuinfo test when gpg is gpg2. + * lang/qt/tests/t-support.cpp (QGpgMETest::copyKeyrings): New helper. + * lang/qt/tests/t-support.h: Declare. + * lang/qt/tests/t-encrypt.cpp: use it + * lang/qt/tests/t-tofuinbo.cpp: ditto. + + qt: Remove unused variable in test. + * t-wkspublish.cpp (testWKSPublishCreate): Remove context. + + qt: Add test for wkspublishjob. + * lang/qt/tests/t-wkspublish.cpp: New. + * lang/qt/tests/Makefile.am: Update accordingly. + + qt: Add WKSPublishJob. + * lang/qt/src/Makefile.am: Add new files. + * lang/qt/src/job.cpp: Include moc / subclass stub. + * lang/qt/src/protocol.h: Add virtual for new job. + * lang/qt/src/protocol_p.h: Add job. + * lang/qt/src/wkspublishjob.h: Interface for WKSPublishJob. + * lang/qt/src/qgpgmewkspublishjob.cpp, + lang/qt/src/qgpgmewkspublishjob.h: New. + + Cpp: Change firstSeen / lastSeen return values. + * lang/cpp/src/tofuinfo.cpp, + lang/cpp/src/tofuinfo.h (TofuInfo::firstSeen, TofuInfo::lastSeen): + Change return values to unsigned long and update doc. + + Cpp: Add wrapper for gpgme_get_dirinfo. + * lang/cpp/src/context.cpp (dirInfo): New. + * lang/cpp/src/global.h (dirInfo): New. + + Cpp: Add support for spawn engine. + * lang/cpp/src/context.cpp (Context::spawn, Context::spawnAsync): New. + * lang/cpp/src/context.h: Add prototypes. + (SpawnFlags): New. + * lang/cpp/src/global.h (SpawnEngine): Added. + +2016-08-25 Werner Koch + + core: Add GPGME_KEYLIST_MODE_WITH_TOFU. + * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_TOFU): New. + * src/engine-gpg.c (gpg_keylist_build_options): Use that. + * src/keylist.c: Include limits.h. + (parse_tfs_record): New. + (keylist_colon_handler): Support TFS record. + * tests/run-keylist.c: Include time.h. + (isotimestr): New. + (main): Add option --tofu. Print TOFU info. + * tests/run-verify.c: Include time.h. + (isotimestr): New. + (print_result): Use isotimestr for TOFU dates. + +2016-08-24 Werner Koch + + core: Adjust for TOFU_STATS change in gnupg 2.1.16. + * src/gpgme.h.in (_gpgme_tofu_info): Change 'firstseen' and 'lastseen' + to a timestamp value. + * src/verify.c (parse_tofu_stats): Do not cap these values at UINT_MAX. + + core: Set the 'encrcount' field in gpgme_tofu_info_t. + * src/verify.c (parse_tofu_stats): Set ENCRCOUNT field. + + cpp: Get rid of AssuanResult due to its deprecation. + * lang/cpp/src/assuanresult.cpp: Remove. + * lang/cpp/src/assuanresult.h: Remove. + * lang/cpp/src/Makefile.am: Remove these files. + * lang/cpp/src/context.cpp: Remove header assuanresult.h + (assuanTransact): Change return type to Error. Use + gpgme_op_assuan_transact_ext. + (startAssuanTransaction): Change return type to Error. + (assuanResult): Remove + * lang/cpp/src/context.h (assuanResult): Adjust for changes. + +2016-08-24 Andre Heinecke + + Qt: Adapt (disabled) tofuinfo test to new API. + * lang/qt/tests/t-tofuinfo.cpp: Switch to UID based API. + + Cpp: Add Key to signature. + * lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h (Signature::key): New. + + Cpp: Use fpr field for primaryFingerprint. + * lang/cpp/src/key.cpp (Key::primaryFingerprint): Return + fpr value if available. + +2016-08-23 Andre Heinecke + + Cpp: Move tofuinfo from signature to userid. + * lang/cpp/src/key.cpp (UserID::tofuInfo): New. + * lang/cpp/src/key.h: Update accordingly. + * lang/cpp/src/tofuinfo.cpp: Remove dropped fields. + * lang/cpp/src/tofuinfo.h: Update accordingly. + * lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h: Remove tofu info. + * lang/qt/tests/t-tofuinfo.cpp: Disable for now. + +2016-08-23 Werner Koch + + core: Put the protocol into a TOFU created key object. + * src/verify.c (parse_tofu_user): Add arg 'protocol' and store it in + the KEY. + (_gpgme_verify_status_handler): Pass protocol. + + core: Change the way TOFU information are represented. + * src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'. Add + field 'key'. + (struct _gpgme_key): Add field 'fpr'. + (struct _gpgme_user_id): Add field 'tofu'. + (struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'. + * src/key.c (gpgme_key_unref): Release TOFU and FPR. + * src/keylist.c (keylist_colon_handler): Store the fingerprint of the + first subkey also in KEY. + * src/verify.c (release_tofu_info): Remove. + (release_op_data): Release KEY. + (parse_tofu_user): Rewrite for new data structure. + (parse_tofu_stats): Ditto. + (parse_tofu_stats_long): Ditto. + * tests/run-verify.c (print_result): Ditto. + * tests/run-keylist.c (main): Print more fields. + + core: Extend gpgme_user_id_t with 'address'. + * src/mbox-util.c, src/mbox-util.h: Adjust for use in gpgme. + * src/Makefile.am (main_sources): Add mbox-util. + * src/key.c (_gpgme_key_append_name): Set 'address' field of uid. + (gpgme_key_unref): Free it. + +2016-08-22 Werner Koch + + core: New code for parsing mail addresses. + * src/mbox-util.c: New. + * src/mbox-util.h: New. + + core: Add new items for gpgme_get_dirinfo. + * src/dirinfo.c (WANT_SYSCONFDIR, WANT_LIBEXECDIR, WANT_LIBDIR): New. + (WANT_DATADIR, WANT_LCOALEDIR, WANT_AGENT_SSH_SOCKET): New + (WANT_DIRMNGR_SOCKET): New. + (dirinfo): Add fields 'sysconfdir', 'bindir', 'libexecdir', 'libdir', + 'datadir', 'localedir', 'agent_ssh_socket', and 'dirmngr_socket'. + (parse_output): Set these fields. + (get_gpgconf_item): Return them. + (gpgme_get_dirinfo): Likewise. + + core: Base gpgme_get_dirinfo(uiserver-socket) on the socket dir. + * src/dirinfo.c (dirname_len): New. + (parse_output): Change computation of UISRV_SOCKET. + +2016-08-21 Werner Koch + + core: New commands --lang and --have-lang for gpgme-config. + * configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst. + * src/gpgme-config.in (avail_lang): Add commands --lang and + --have-lang. + +2016-08-18 Andre Heinecke + + core: Remove (now) useless diagnostic. + * src/w32-io.c(_gpgme_io_spawn): Remove spawnhelper not found + diagnostic. + + core: Fail loudly in case w32 spawner not found. + * src/w32-io.c (_gpgme_io_spawn): Show a message box in + case gpgme-w32spawn.exe not found. + +2016-08-17 Andre Heinecke + + Cpp: Fix some pedantic warnings. + * lang/cpp/src/context.cpp, + lang/cpp/src/context.h (Context::getKeysFromRecipients): Remove + ignored / invalid const qualifier. + * lang/cpp/src/result.h: Don't shadow error function in ctor. + +2016-08-16 Werner Koch + + core: New global flag "require-gnupg". + * src/gpgme.c (gpgme_set_global_flag): Add flag. + * src/engine.c (engine_minimal_version): New variable. + (_gpgme_set_engine_minimal_version): New function. + (gpgme_get_engine_info): Check that flag. + + * tests/run-keylist.c (main): New option --require-gnupg. + + core: Simplify setting of dummy versions. + * src/engine.c (_gpgme_engine_info_release): Do not assert but free + FILE_NAME. + (gpgme_get_engine_info): Provide default for VERSION and REQ_VERSION. + Use calloc instead of malloc. + (_gpgme_set_engine_info): Ditto. + * src/engine-assuan.c (llass_get_version): Return NULL. + (llass_get_req_version): Ditto. + * src/engine-spawn.c (engspawn_get_version): Ditto. + (engspawn_get_req_version): Ditto. + * src/engine-uiserver.c (uiserver_get_version): Ditto. + (uiserver_get_req_version): Ditto. + +2016-08-12 Andre Heinecke + + Qt: Add test for progress signal of encryptjob. + * lang/qt/tests/t-encrypt.cpp (testProgress): New. + + Cpp: Provide size-hint for seekable and mem data. + * lang/cpp/src/data.cpp (GpgME::Data::Data): Set size-hint for + mem and DataProvider based Data. + +2016-08-12 Werner Koch + + core: Make use of the "size-hint" in engine-gpg. + * src/engine-gpg.c: Include data.h. + (add_input_size_hint): New. + (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign) + (gpg_verify): Call new function, + + * tests/run-encrypt.c (status_cb): Print to stderr. + (progress_cb): New.o + (main): Add option --progress. Print full-status lines. Provide a + size for the input data. + + core: Add gpgme_data_set_flag to add more meta data to data objects. + * src/gpgme.h.in (gpgme_data_set_flag): New public function. + * src/data.c (gpgme_data_set_flag): New. + (_gpgme_data_get_size_hint): New. + * src/data.h (strucy gpgme_data): Add field 'size_hint'. + * src/gpgme.def, src/libgpgme.vers: Add new function. + * src/conversion.c (_gpgme_string_to_off): New. + +2016-08-12 Andre Heinecke + + Qt: Fix defaultkeygenerationjob build. + * lang/qt/src/defaultkeygenerationjob.cpp: Include moc. + +2016-08-11 Andre Heinecke + + Qt: Add DefaultKeyGenerationJob. + * lang/qt/src/defaultkeygenerationjob.cpp, + lang/qt/src/defaultkeygenerationjob.h: New. + * lang/qt/src/Makefile.am: Update accordingly. + + Qt: Ensure all public classes are exported. + * src/abstractimportjob.h, + src/cryptoconfig.h, + src/deletejob.h, + src/exportjob.h, + src/importfromkeyserverjob.h, + src/importjob.h, + src/keygenerationjob.h, + src/keylistjob.h, + src/listallkeysjob.h, + src/refreshkeysjob.h, + src/signencryptjob.h, + src/specialjob.h, + src/verifydetachedjob.h: Export classes. + + Qt: Add KeyForMailboxJob. + * lang/qt/src/job.cpp: Include moc and make subclass. + * lang/qt/src/keyformailboxjob.h, + lang/qt/src/qgpgmekeyformailboxjob.cpp, + lang/qt/src/qgpgmekeyformailboxjob.h: New. + * lang/qt/tests/run-keyformailboxjob.cpp: New manual test. + * lang/qt/tests/Makefile.am: Add run-keyformailboxjob. + * lang/qt/src/Makefile.am: Update accordingly. + * lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add + keyformailboxjob. + +2016-08-10 Werner Koch + + doc: Get rid of version.texi. + * configure.ac (CC_FOR_BUILD): New. + * doc/mkdefsinc.c: New. Taken from GnuPG and modified for gpgme. + * doc/Makefile.am (EXTRA_DIST): Add defsincdate and mkdefsinc.c + (BUILT_SOURCES): new. + (gpgme.texi): New dependency. + (mkdefsinc, defsincdate, defs.inc): New rules. + (dist-hook): New. + * doc/gpgme.texi: Include defs.inc. Remove version.texi. + + build: Declare all languages for make dist. + * lang/Makefile.am (DIST_SUBDIRS): New. + + core: Do not identify PNG files as PGP signatures. + * src/data-identify.c (next_openpgp_packet): Blacklist PNG files. + +2016-08-10 Andre Heinecke + + Cpp: Handle empty recipients consistently. + * lang/cpp/src/context.cpp (Context::getKeysFromRecipients): + New helper. + (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) + (Context::startCombinedSigningAndEncryption): Use new helper. + * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add + as private helper. + + core: Handle ENCRYPT_SYMMETRIC also for sig & enc. + * src/engine-gpg.c (gpg_encrypt_sign): Handle ENCRYPT_SYMMETRIC + flag. + + Qt: Remove unused variable. + * lang/qt/src/qgpgmerefreshkeysjob.cpp (slotStatus): Remove + unused variable typ. + + Qt: Create TestPassphraseProvider on stack. + * lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp: Create + TestPassphraseProvider on stack. + + Cpp: Clarify ownership of provider classes. + * lang/cpp/src/context.h: Note that the context does not take + ownership of providers. + +2016-08-10 Justus Winter + + tests: Fix memory leak. + * tests/gpg/t-encrypt-mixed.c (main): Free 'text2'. + +2016-08-10 Andre Heinecke + + core: Ensure err is initalized in gpg_encrypt. + * src/engine-gpg.c (gpg_encrypt): Initialize err. + + Qt: Fix t-keylist moc include. + * lang/qt/tests/t-keylist.cpp: Don't include t-support.moc + +2016-08-09 Andre Heinecke + + Qt: Clean up debug output in tests. + * lang/qt/tests/t-support.cpp: Remove accidentally commited + debug output. + + Qt: Add encryption test and refactor testsuite. + * lang/qt/tests/Makefile.am: Add t-encrypt and t-support. + * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest): + New. Class to handle common cleanup / init. + * lang/qt/tests/t-keylist.cpp, + lang/qt/tests/t-keylocate.cpp, + lang/qt/tests/t-ownertrust.cpp, + lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest. + * lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric + encryption. Mixed encryption test is disabled. + + Qt: Add support for EncryptJobs with generic flags. + * lang/qt/src/encryptjob.h, lang/qt/src/signencryptjob.h, + lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmeencryptjob.cpp: Add start and exec overloads + that accept generic EncryptFlags. + + Cpp: Add support for all EncryptionFlags. + * lang/cpp/src/context.h (EncryptionFlags): Extend. + * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto. + + Cpp: Fix simple symmetric encryption. + * lang/cpp/src/context.cpp (Context::encrypt): If no recipients + are provided encrypt with NULL and not an empty array. + + core: Add support for mixed symmetric and asym enc. + * src/gpgme.h.in (gpgme_encrypt_flags_t): New flag + GPGME_ENCRYPT_SYMMETRIC. + * src/engine-gpg.c (gpg_encrypt): Also add --symmetric if the flag + is given. + * NEWS: Mention new flag. + * tests/run-encrypt.c (show_usage): Extend for --symmetric. + (main): Handle --symmetric. + (main): Set passphrase_cb in loopback mode. + (main): Fix encrypt call if no recipients are given. + * tests/gpg/t-encrypt-mixed.c: New. + * tests/gpg/Makefile.am (c_tests): Add new test. + * doc/gpgme.texi: Document new flag. + +2016-08-08 Werner Koch + + core: Let GPGME_PROTOCOL_ASSUAN pass Assuan comments through. + * src/engine-assuan.c (llass_new): Set ASSUAN_CONVEY_COMMENTS, + +2016-08-08 Andre Heinecke + + Prepend LD_LIBRARY_PATH for python tests. + * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Prepend path + instead of setting the value. + +2016-08-05 Justus Winter + + python: Clean up and modernize examples. + * lang/python/examples/Examples.rst: Delete file. + * lang/python/examples/t-edit.py: Likewise. This is actually a test + case and has been moved to 'tests'. + * lang/python/examples/assuan.py: New file. + * lang/python/examples/decryption-filter.py: Likewise. + * lang/python/examples/delkey.py: Modernize. + * lang/python/examples/encrypt-to-all.py: Likewise. + * lang/python/examples/exportimport.py: Likewise. + * lang/python/examples/genkey.py: Likewise. + * lang/python/examples/inter-edit.py: Likewise. + * lang/python/examples/sign.py: Likewise. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/testCMSgetkey.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + +2016-08-04 Werner Koch + + core: Extend gpgme_subkey_t to carry the keygrip. + * src/gpgme.h.in (struct _gpgme_subkey): Add file 'keygrip'. + * src/key.c (gpgme_key_unref): Free KEYGRIP. + * src/keylist.c (keylist_colon_handler): Parse GRP records. + * src/engine-gpg.c (gpg_keylist_build_options): Do not use + --with-fingerprint options for gpg versions >= 2.1.15. + + * tests/run-keylist.c (main): Print subkeys and keygrips. + +2016-08-03 Justus Winter + + python: Add a nicer interface to list keys. + * lang/python/pyme/core.py (Context.keylist): New method. + * lang/python/tests/t-keylist.py: Test new method. + +2016-08-02 Justus Winter + + python: Add a flag identifying in-tree builds. + * lang/python/helpers.c (pyme_in_tree_build): New variable. + * lang/python/helpers.h (pyme_in_tree_build): New declaration. + * lang/python/pyme/version.py.in (in_tree_build): New variable. + * lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD' + as appropriate. + + python: Fix build system integration. + * lang/python/Makefile.am: Be more careful when cleaning the build + directory, we must not delete the generated file 'pyme/version.py'. + + doc: Document the Assuan protocol. + * doc/gpgme.texi: Document the Assuan protocol. + + GnuPG-bug-id: 2407 + +2016-07-28 Justus Winter + + python: Fix out-of-tree build. + * lang/python/MANIFEST.in: Add 'private.h'. + + Fixes-commit: 3d4dc3f0 + + python: Improve error handling. + * lang/python/pyme/core.py (Context.protocol): Check that the engine + is usable before setting the protocol. + (Context._errorcheck): Add missing functions. + + src: Fix dummy engine versions. + Previously, 'gpgme_engine_check_version' failed for these protocols + because the version parser failed to parse the dummy versions. + + * src/engine-assuan.c (llass_get_version): Use a version triple that + the parser can understand. + (llass_get_req_version): Likewise. + * src/engine-spawn.c (engspawn_get_version): Likewise. + (engspawn_get_req_version): Likewise. + * src/engine-uiserver.c (uiserver_get_version): Likewise. + (uiserver_get_req_version): Likewise. + + python: Drop superfluous imports and trim public interface. + * lang/python/pyme/__init__.py: Avoid leaking low-level 'gpgme', make + sure the main module looks nice and tidy, appease pyflakes. + * lang/python/pyme/errors.py: Appease pyflakes. + * lang/python/pyme/util.py: Avoid leaking low-level 'gpgme' into the + module namespace. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/tests/t-keylist.py: Drop superfluous imports. + * lang/python/tests/t-sig-notation.py: Likewise. + * lang/python/tests/t-sign.py: Likewise. + * lang/python/tests/t-signers.py: Likewise. + + python: Rename compiled SWIG module. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames the compiled Python module produced by SWIG. + + * lang/python/Makefile.am: Rename the compiled Python module. + * lang/python/gpgme.i: Likewise. + * lang/python/pyme/core.py: Likewise. + * lang/python/pyme/errors.py: Likewise. + * lang/python/pyme/util.py: Likewise. + * lang/python/pyme/version.py.in: Likewise. + * lang/python/setup.py.in: Likewise. + + python: Rename exported functions. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames all functions that are exported to the Python + world. + + * lang/python/helpers.c: Rename all exported functions. + * lang/python/helpers.h: Likewise. + * lang/python/pyme/core.py: Likewise. + + python: Rename private functions. + Avoid the name pygpgme, as this is the name of another popular Python + binding for GPGME. + + This commit renames all functions that are not exported to the Python + world. + + * lang/python/gpgme.i: Rename all private functions. + * lang/python/helpers.c: Likewise. + * lang/python/helpers.h: Likewise. + * lang/python/private.h: Likewise. Also move the SWIG runtime helper + prototypes here. + + python: Support the Assuan engine. + * lang/python/gpgme.i: Add typemaps for the Assuan protocol callbacks. + * lang/python/helpers.c (_pyme_assuan_{data,inquire,status}_cb): New + functions. + * lang/python/private.h (_pyme_assuan_{data,inquire,status}_cb): New + prototypes. + * lang/python/pyme/core.py (Context.assuan_transact): New method. + * lang/python/pyme/util.py (percent_escape): New function. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-protocol-assuan.py: New file. + + python: Improve engine information handling. + * lang/python/gpgme.i (gpgme_engine_info_t): Wrap engine infos. + * lang/python/pyme/core.py (Context.engine_info): New property. + (Context.{g,s}et_engine_info): Improve docstrings. + * lang/python/pyme/results.py (EngineInfo): New class. + + python: Add accessors for the protocol. + * lang/python/pyme/core.py (Context.__init__): Add 'protocol' + parameter. + (Context.protocol): New accessors. + + python: Expose less functions to the Python world. + * lang/python/Makefile.am (EXTRA_DIST, COPY_FILES): Add new file. + * lang/python/gpgme.i: Include new file and add comments. + * lang/python/helpers.c: Include new file. + * lang/python/helpers.h: Move functions we do not need to expose... + * lang/python/private.h: ... here. + +2016-07-19 Ben Kibbey + + Fix including nil bytes in keylist output. + * src/gpgme-tool.c (cmd_keylist,gt_result): use strlen(). + +2016-07-15 Justus Winter + + python: Make GPGME's version easily accessible. + * lang/python/pyme/version.py.in (gpgme_versionstr): New variable. + + python: Add an idiomatic interface. + * configure.ac: Bump required Python version. + * lang/python/pyme/__init__.py: Update docstring. Import Context and + Data. + * lang/python/pyme/core.py (Context.encrypt): New function. + (Context.decrypt): Likewise. + (Context.sign): Likewise. + (Context.verify): Likewise. + * lang/python/pyme/errors.py: Add new errors. + * lang/python/pyme/util.py (process_constants): Rework and return the + inserted keys. + * lang/python/tests/Makefile.am (EXTRA_DIST): Add new keys. + * lang/python/tests/encrypt-only.asc: New file. + * lang/python/tests/sign-only.asc: Likewise. + * lang/python/tests/initial.py: Mark key 'Alpha' as trusted, import + new keys. + * lang/python/tests/support.py: Add fingerprints of known keys. + (in_srcdir): New function. + (print_data): Handle bytes too. + (mark_key_trusted): New function. + * lang/python/tests/t-decrypt-verify.py: Adjust test. Test idiomatic + interface. + * lang/python/tests/t-decrypt.py: Test idiomatic interface. + * lang/python/tests/t-encrypt-sign.py: Likewise. + * lang/python/tests/t-encrypt-sym.py: Likewise. + * lang/python/tests/t-encrypt.py: Likewise. + * lang/python/tests/t-idiomatic.py: Simplify. + * lang/python/tests/t-keylist.py: Adjust to newly trusted key. + * lang/python/tests/t-sign.py: Likewise. Test idiomatic interface. + * lang/python/tests/t-signers.py: Likewise. + * lang/python/tests/t-verify.py: Likewise. + +2016-07-14 Andre Heinecke + + Qt: Disable keylocate test for gnupg < 2.0.10. + * lang/qt/tests/t-keylocate.cpp: Disable test for gnupg < 2.0.10 + + Cpp: Add EngineInfo::Version class. + * lang/cpp/src/engineinfo.cpp (EngineInfo::engineVersion): New. + * lang/cpp/src/engineinfo.h (EngineInfo::engineVersion): Declare. + (EngineInfo::Version): Small helper to work with versions. + + Qt: Fix usage of ignore-invalid-option in tests. + * Makefile.am (pubring-stamp): Fix config. + + Qt: Fix tests if gpg2 is gpg. + * lang/qt/tests/Makefile.am (pubring-stamp): Loopback and provide + passphrase on command line when importing. + +2016-07-14 Justus Winter + + python: Fix test. + * lang/python/tests/t-keylist.py: Do not assume key alpha is trusted + yet. + +2016-07-13 Werner Koch + + build: Update config.{guess,sub} to {2016-05-15,2016-06-20}. + * build-aux/config.guess: Update. + * build-aux/config.sub: Update. + + core: New GPGME_DATA_ENCODING_MIME. + * src/gpgme.h.in (GPGME_DATA_ENCODING_MIME): New. + * src/data.c (gpgme_data_set_encoding): Adjust check. + * src/engine-gpg.c (have_gpg_version): New. + (gpg_encrypt, gpg_encrypt_sign): Pass flag '--mimemode'. + (gpg_sign): Ditto. + + * lang/cpp/src/data.h (GpgME): Add MimeEncoding. + * lang/cpp/src/data.cpp (encoding, setEncoding): Support MimeEncoding. + + * src/gpgme-tool.c (server_data_encoding): Add flag --mime. + + core: Pass the engine's version string to the engine's new function. + * src/engine-backend.h (engine_ops): Add arg 'version' to NEW. + * src/engine-assuan.c (llass_new): Add dummy arg 'version'. + * src/engine-g13.c (g13_new): Ditto. + * src/engine-gpgconf.c (gpgconf_new): Ditto. + * src/engine-gpgsm.c (gpgsm_new): Ditto. + * src/engine-spawn.c (engspawn_new): Ditto. + * src/engine-uiserver.c (uiserver_new): Ditto. + * src/engine.c (_gpgme_engine_new): Pass version string to the new + function. + * src/engine-gpg.c (struct engine_gpg): Add field 'version'. + (gpg_new): Add arg 'version'. + (gpg_release): Free VERSION. + +2016-07-13 Andre Heinecke + + Cpp: Add feature enum for new identify. + * lang/cpp/src/context.cpp (supported_features2): Add + BinaryAndFineGrainedIdentify + * lang/cpp/src/global.h (Feature2): ditto. + +2016-07-12 Justus Winter + + python: Port more tests. + * lang/python/pyme/core.py (Context.op_keylist_all): Add missing + 'op_keylist_end'. + (Context.op_trustlist_all): Fix function. Add missing + 'op_trustlist_end'. + * lang/python/tests/Makefile.am (pytests): Add new files. + * lang/python/tests/t-import.py: New file. + * lang/python/tests/t-keylist.py: Likewise. + * lang/python/tests/t-trustlist.py: Check alternate interface. + + python: Improve python packaging. + * lang/python/Makefile.am: Sign source releases, and upload them. + * lang/python/setup.py.in: Add categories. + +2016-07-12 Andre Heinecke + + m4: Don't set fpic for qt on windows. + * m4/qt.m4 (FIND_QT): Do not set fpic for windows. + + m4: Use LIBS instead of LDFLAGS for Qt libs. + * m4/qt.m4: Modify LIBS instead of LDFLAGS for link test. + + Bump version to 1.7.0. + * configure.ac(mym4_version_minor), + (mym4_version_micro): Next release will be 1.7.0 + + Qt: Install CamelCase forward includes. + * lang/qt/src/Makefile.am (camelcase_headers): New. Create and install + CamelCase headers. + + Qt: Export VerifyDetachedJob. + * lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Export it. + + Qt/Cpp: Add version headers. + * lang/cpp/src/gpgmepp_version.h.in, + lang/qt/src/qgpgme_version.h.in: New. Version information. + * lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them. + * configure.ac: Configure them. + + Qt/Cpp: Add license blurb to export headers. + * lang/cpp/src/gpgmepp_export.h, + lang/qt/src/qgpgme_export.h: Add license blurb. + +2016-07-11 Justus Winter + + python: Fix distcheck. + * lang/python/Makefile.am (EXTRA_DIST): Add missing files. + +2016-07-11 Andre Heinecke + + m4: Add compile / link check for qt. + * m4/qt.m4 (FIND_QT): Check if a qt application can be compiled and + linked. + +2016-07-11 Justus Winter + + python: Enable out-of-tree build of pyme bindings. + * lang/python/MANIFEST.in: Update manifest template. + * lang/python/Makefile.am: Copy more files, move generation of files + to Python build script, add 'sdist' target to build a Python source + distribution. + * lang/python/gpgme-h-clean.py: Add code to build 'errors.i'. + * lang/python/setup.py.in: Generate files, enable out-of-tree builds. + + python: Do not depend on access to internal data structures. + * lang/python/gpgme.i (gpgme_data_t): Rework so that it works without + access to the definition of 'struct gpgme_data'. + * lang/python/helpers.c (object_to_gpgme_data_t): Add assertion. + + python: Make result wrapping backwards compatible. + * lang/python/pyme/results.py (Result.__init__): Skip missing fields. + +2016-07-11 Andre Heinecke + + Qt: Fix memleaks in tests. + * lang/qt/tests/t-keylist.cpp(cleanupTestCase): Ensure that + posted events are handled for autodeletion. + (testSingleKeylistSync): delete job. + * lang/qt/tests/t-ownertrust.cpp(cleanupTestCase): Ditto + * lang/qt/tests/t-ownertrust.cpp(testChangeOwnerTrust): Delete + keylistjobs. + * lang/qt/tests/t-keylocate.cpp(cleanupTestCase): Ditto + + Qt: Add some general Protocol documentation. + * lang/qt/src/protocol.h (Protocol): Add doc. + + Qt: Disable t-tofuinfo tests. + * lang/qt/tests/t-tofuinfo.cpp: Disable tests. + +2016-07-08 Justus Winter + + src: Fix error handling. + * src/encrypt.c (encrypt_status_handler): Fix error handling, || + conflates errors. + + python: Fix raising stashed exceptions. + Fixes an issue with newer versions of Python. + + * lang/python/helpers.c (pygpgme_raise_callback_exception): Be more + careful when restoring the exception. + +2016-07-07 Justus Winter + + python: Fix distcheck. + * lang/python/INSTALL: Drop obsolete file. + * lang/python/Makefile.am (EXTRA_DIST): Add missing files. + (CLEANFILES): Remove generated files. + (clean-local): Fix permissions of copied files. + * lang/python/tests/Makefile.am (TESTS): Use our own setup and + teardown scripts. + (EXTRA_DIST): Add missing files. + * lang/python/tests/final.py: New file. + * lang/python/tests/initial.py: Likewise. + + qt: Fix distcheck. + * lang/qt/src/Makefile.am (qgpgme_headers): Add missing file. + (CLEANFILES): Add generated file. + * lang/qt/tests/Makefile.am (clean-local): Remove private keys. + + cpp: Fix distcheck. + * lang/cpp/src/Makefile.am (CLEANFILES): Remove generated file. + +2016-07-06 Andre Heinecke + + Qt: Add test for publicKeyAlgorithmAsString. + * lang/qt/tests/t-keylist.cpp (testPubkeyAlgoAsString): New. + + Cpp: Expose gpgme_pubkey_algo_name. + * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithmAsString): New + static variant. + * lang/cpp/src/key.h: Declare function. Clarify comment about name + mismatch. + + Qt: Add check for pubkeyAlgo in t-keylist. + * lang/qt/tests/t-keylist.cpp (testSingleKeyListSync): Check + pubkeyAlgo. + + Cpp: Add PubkeyAlgo enum. + * lang/cpp/src/key.h (Subkey::PubkeyAlgo): New enum. + (Subkey::publicKeyAlgorithm): Change return type. + * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithm): Use enum. + + Qt: Fix include order when buildin test. + * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include cpp before + gpgme src directory. + + Revert "Qt: More robust lookup of Cpp's context.h" + * lang/qt/src/threadedjobmixin.h: Revert using full path + for context.h + +2016-07-05 Andre Heinecke + + Qt: Fix test build with Qt < 5.4.0. + * lang/qt/tests/t-keylist.cpp, + lang/qt/tests/t-keylocate.cpp, + lang/qt/tests/t-ownertrust.cpp: Use old style SIGNAl syntax for + QSignalSpy + + Qt: More robust lookup of Cpp's context.h. + * lang/qt/src/threadedjobmixin.h: When building qgpgme look for + context.h in the full cpp subdirectory. + + w32: Fallback to 2.1 reg key for gpgconf search. + * src/w32-util.c (_gpgme_get_gpgconf_path): Fallback to 2.1 installer + registry key. + +2016-07-04 Andre Heinecke + + Doc: Document pinentry mode. + * doc/gpgme.texi (Passphrase Callback): Document as context + attribute. + (gpgme_set_passphrase_cb): Note that this requires LOOPBACK mode + with GnuPG 2.1. + + Qt: Add testTofuSignCount. + * src/lang/qt/tests/t-tofuinfo.cpp(testTofuSignCount): New. + (initTestCase): Set gpg-agent loopback pinentry config. + (signAndVerify): Helper for tofuTestSignCount. + + Qt: Add test passphrase provider. + * lang/qt/tests/t-support.h (TestPassphraseProvider): New. + * lang/qt/tests/Makefile.am (t_tofuinfo_SOURCES): Add t-support.h + + Cpp: Add support for TOFU_CONFLICT sigsum. + * lang/cpp/src/verificationresult.cpp (GpgME::Signature::Summary): + Handle TOFU_CONFLICT. + * lang/cpp/src/verificationresult.h (Summary): Add TofuConflict. + + Cpp: Add support for pinentry_mode. + * lang/cpp/src/context.cpp (Context::pinentryMode): Return mode. + (Context::setPinentryMode): Set mode. + * lang/cpp/src/context.h (PinentryMode): Add enum. + +2016-07-01 Andre Heinecke + + Qt: Add test for TofuInfo. + * lang/qt/tests/t-tofuinfo.cpp: New. + * lang/qt/tests/Makefile.am: Update accordingly. + + Cpp: Add TofuInfo to signatures. + * lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h: New class. + * lang/cpp/src/verificationresult.cpp (Signature::tofuInfo): New. + (VerificationResult::Private): Handle tofu info. + (GpgME::operator<<(std::ostream &os, const Signature &sig)): Include + TofuInfo in dump. + * lang/cpp/src/verificationresult.h (Signature::tofuInfo): New. + * lang/cpp/src/Makefile.am (main_sources, gpgmepp_headers): Add + new files. + * configure.ac (LIBGPGMEPP_LT_REVISION): Bump for new API. + + core: Clarify documentation of tofu_stats address. + * src/gpgme.h.in: Mention that Address is not always in addr-spec. + + core: Fix identify for armored detached sigs. + * src/data-identify.c (basic_detection): Return signature for + signature. + +2016-06-27 Andre Heinecke + + Cpp: Expose new data_identify values. + * lang/cpp/src/data.cpp (GpgME::Data::type): Handle PGP Encrypted + and Signature. + * lang/cpp/src/data.h: Add values accordingly. + + Cpp: Do not treat KEYEXPIRED as error. + * lang/cpp/src/editinteractor.cpp (status_to_error): No error + for KEYEXPIRED. + +2016-06-24 Andre Heinecke + + tests: Add new test tool run-decrypt. + * tests/run-decrypt.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-decrypt. + +2016-06-23 Werner Koch + + core: Add closer inspection of "PGP MESSAGE". + * src/data-identify.c (inspect_pgp_message): New. + (basic_detection): Un-const arg DATA. Call inspect_pgp_message. + + core: Add a base 64 decoder. + * src/b64dec.c: New. Taken from gnupg. Prefix function names with + _gpgme_ and change to use standard C malloc functions. + * src/util.h.h (struct b64state): New. + * src/Makefile.am (main_sources): Add file. + +2016-06-22 Werner Koch + + core: Detect compressed signed OpenPGP data. + * src/data-identify.c (next_openpgp_packet): Allow partial encoding. + (pgp_binary_detection): Handle compressed packets. + +2016-06-21 Werner Koch + + tests: Add new test tool run-identify. + * src/gpgme-tool.c (gt_identify): Add new strings. + * tests/run-identify.c: New. + * tests/Makefile.am (noinst_PROGRAMS): Add run-identify. + + core: Enhance gpgme_data_identify to detect binary PGP messages. + * src/gpgme.h.in (GPGME_DATA_TYPE_PGP_ENCRYPTED): New. + (GPGME_DATA_TYPE_PGP_SIGNATURE): New. + * src/data-identify.c: Add enum for OpenPGP packet types. + (buf32_to_ulong): New. + (next_openpgp_packet): New. Based on the gnupg/kbx/keybox-openpgp.c + implementation and relicensed to LGPL by g10 Code. + (pgp_binary_detection): New. + (basic_detection): Call pgp_binary_detection instead of returning + unknown. + +2016-06-16 Justus Winter + + python: Improve autmatically generated docstrings. + * lang/python/gpgme.i: Add comment. + * lang/python/pyme/core.py (__getattr__): Rewrite automatically + generated doctrings for the wrapper methods. + + python: Make result objects more robust. + Results returned by the GPGME are fragile, i.e. they are only valid + until the next operation is performed in the context. + + We cannot arbitrarily constrain the lifetime of Python objects, we + therefore create deep copies of the results. + + * lang/python/gpgme.i (gpgme_tofu_info_t): Turn these into a list. + (gpgme_*_result_t): Create deep copies of these objects. + * lang/python/helpers.c (pygpgme_wrap_fragile_result): New function. + * lang/python/helpers.h (pygpgme_wrap_fragile_result): New prototype. + * lang/python/pyme/results.py: New file. + + python: Avoid creating SWIG proxy classes. + * lang/python/Makefile.am (gpgme_wrap.c): Use '-builtin' to make SWIG + generate builtin types for c types. + * lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Adapt slightly. + + python: Simplify wrapping glue. + * lang/python/pyme/core.py: Rename '_getctype' to '_ctype' and turn it + into a string. Likewise rename '_getnameprepend' to '_cprefix'. + * lang/python/helpers.c: Adapt accordingly. + + python: Rework callbacks. + Simplify how the lifetime of callback arguments is managed. + + * lang/python/gpgme.i (gpgme_edit_cb_t): Check arguments. + (PyObject_p_p, void_p_p): Drop rather dangerous interface. + (pygpgme_unwrap_gpgme_ctx_t): New function. + * lang/python/helpers.c (pygpgme_clear_generic_cb): Drop dangerous + function. + (pyPassphraseCb): Assert contract. + (pygpgme_set_passphrase_cb): Use Python's calling convention so that + we can raise exceptions. Hand in 'self', get the wrapped object, and + simply store the hook data as attribute of the wrapper object. + (pyProgressCb, pygpgme_set_progress_cb): Likewise. + (pygpgme_set_status_cb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + * lang/python/helpers.h (pygpgme_clear_generic_cb): Drop prototype. + (pygpgme_set_passphrase_cb): Update prototype. + (pygpgme_set_progress_cb): Likewise. + (pygpgme_set_status_cb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + (pygpgme_unwrap_gpgme_ctx_t): New prottotype. + * lang/python/pyme/core.py (Context, Data): Update callsites. + + python: Wrap objects implementing the buffer protocol. + * lang/python/Makefile.am: Add the toplevel source directory to CFLAGS + when compiling the bindings so that we can use private header files. + * lang/python/gpgme.i (gpgme_data_t): Rework the object wrapping. Do + not create a Python wrapper object, merely a gpgme_data_t object, and + keep references to buffer objects, if any. If necessary, update the + buffer after the function call. + (pygpgme_wrap_gpgme_data_t): New function. + * lang/python/helpers.c (object_to_gpgme_data_t): Rework object + wrapping. Also wrap objects implementing the buffer protocol. + * lang/python/helpers.h (object_to_gpgme_data_t): Update prototype. + (pygpgme_wrap_gpgme_data_t): New prototype. + * lang/python/tests/t-idiomatic.py: Demonstrate this. + + python: Add properties to wrapped object. + * lang/python/pyme/core.py (GpgmeWrapper.__repr__): Saner + representation. + (GpgmeWrapper.__str__): Construct a nicer human readable string. + (GpgmeWrapper._boolean_properties): New field. + (GpgmeWrapper.__wrap_boolean_property): New function. + (GpgmeWrapper.__getattr__): Wrap functions using properties. + (GpgmeWrapper.__setattr__): New method. Likewise wrap functions. + (Context.signers): New property. + (Context.pinentry_mode): Likewise. + (Context._boolean_properties): List boolean properties. + (Context.__init__): Add keyword arguments for properties and apply + them. + + python: Improve the documentation. + * lang/python/Makefile.am: Copy the README file. + * lang/python/README: Rename, convert to org, and update. + * lang/python/pyme/__init__.py: Move license out of the docstring, + update docstring. + * lang/python/pyme/core.py: Add and update docstrings. + + python: Get version information from the build system. + * configure.ac: Generate 'setup.py' and 'version.py'. + * lang/python/Makefile.am: Use generated setup script. + * lang/python/pyme/version.py: Turn it into a template, and get + version information from the build system. Also drop some variables. + * lang/python/setup.py: Likewise. This way we can avoid importing the + version module, which is frowned upon and actually caused a problem. + + python: Fix exception leak. + * lang/python/helpers.c (pygpgme_stash_callback_exception): Fix leak. + + python: Fix license. + Other parts of the build system are also LGPLed. + + * lang/python/Makefile.am: Fix license. + +2016-06-14 Werner Koch + + core: Make sure FD_SET is not used with an out of range fd. + * src/posix-io.c (_gpgme_io_select): Check for FD out of range. + +2016-06-08 Justus Winter + + python: Improve error handling. + * lang/python/helpers.c (pyPassphraseCb): Handle write errors. + (pyEditCb): Likewise. + + python: Add function to raise exceptions from c. + * lang/python/helpers.c (pygpgme_raise_exception): New function. + + python: Fix stripping deprecated functionality. + * lang/python/Makefile.am (gpgme.h): Add script as input. + * lang/python/gpgme-h-clean.py (deprec_func): Also match struct + members. + (line_break): Fix matching on struct members. + + python: Fix type. + * lang/python/gpgme.i: Use correct Python type for size. + + python: Implement the context manager protocol. + * lang/python/pyme/core.py (Context.__del__): Make function + idemptotent. + (Context.{__enter__,__exit__}): Implement the context manager + protocol. + (Data.__del__): Make function idemptotent, drop debug print. + (Data.{__enter__,__exit__}): Implement the context manager + protocol. + * lang/python/tests/t-idiomatic.py: Demonstrate this. + +2016-06-07 Justus Winter + + python: Fix error handling. + * lang/python/gpgme.i: Fix freeing an uninitialized pointer in the + error handling of generated wrapper functions by explicitly storing + the pointer in a local variable which can be initialized. + +2016-06-06 Justus Winter + + python: Wrap file-like objects on demand. + * lang/python/gpgme.i (gpgme_data_t): Use new function to create + wrapper objects if necessary, and deallocate them after the function + call. + * lang/python/helpers.c (object_to_gpgme_data_t): New function. + * lang/python/helpers.h (object_to_gpgme_data_t): New prototype. + * lang/python/tests/Makefile.am (pytests): Add new test. + * lang/python/tests/t-idiomatic.py: New file. + + python: Move helper function. + * lang/python/gpgme.i (object_to_gpgme_t): Move... + * lang/python/helpers.c: ... here. + * lang/python/helpers.h (object_to_gpgme_t): New prototype. + + python: Fix error handling. + * lang/python/gpgme.i (object_to_gpgme_t): Properly propagate + exceptions. + + python: Initialize GPGME for the user. + * lang/python/pyme/core.py: Call 'check_version' and explain why. + * lang/python/tests/support.py (init_gpgme): Drop call here. + +2016-06-01 Justus Winter + + python: Fix test suite with GnuPG prior to 2.1.12. + * lang/python/tests/Makefile.am (gpg-agent.conf): Use + 'allow-loopback-pinentry'. + + python: Make Python detection more robust. + Previously, missing Python development packages made configure fail + instead of merely disabling the bindings. + + * configure.ac: Check for 'PYTHON_VERSION'. + * m4/ax_python_devel.m4: Make test non-fatal. + + python: Improve build system integration, fix warnings. + * lang/python/Makefile.am: Pass CFLAGS to python build system. + * lang/python/helpers.c (pyPassphraseCb): Use correct type for length. + (pygpgme_data_new_from_cbs): Drop unused variable. + +2016-06-01 Andre Heinecke + + Cpp: Use whitelist for status messages. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Use whitelist instead of blacklist. + + Qt: Fix debug output in t-ownertrust. + * lang/qt/tests/t-ownertrust.cpp (testChangeOwnerTrust): Remove + general debug of trust level. Add debug output for error. + +2016-06-01 Justus Winter + + tests: Fix notation tests. + * lang/python/tests/t-sig-notation.py (check_result): Check critical + flag. + * tests/gpg/t-sig-notation.c (check_result): Likewise. + + Fixes-commit: 1cacd7d0 + +2016-06-01 Werner Koch + + core: Set notation flags for verify. + * src/gpgme.h.in (GPGME_STATUS_NOTATION_FLAGS): New. + * src/status-table.c (status_table): Add new status. + * src/verify.c (parse_notation): Handle flags. Also fix NOTATION_DATA + in case gpg would not percent-escape spaces. + (_gpgme_verify_status_handler): Handle flags. + * tests/run-verify.c (print_result): Print notaion data. + +2016-05-31 Tobias Mueller + + python: use GPG_ERROR_CONFIG variable. + instead of calling gpg-error-config. + This is useful when configuring with --with-gpgerror-prefix + because then GPG_ERROR_CONFIG contains the correct + /path/to/bin/gpg-error-config whereas calling gpg-error-config + directly would look in the user's PATH (and not in the prefix + where gpg-error-config was installed). + +2016-05-31 Justus Winter + + python: Port more tests. + * lang/python/gpgme.i: Hide length fields of notations. + * lang/python/tests/Makefile.am (pytests): Add new tests. + * lang/python/tests/t-decrypt-verify.py: New file. + * lang/python/tests/t-sig-notation.py: Likewise. + * lang/python/tests/t-verify.py: Likewise. + +2016-05-27 Werner Koch + + Speedup closing of fds before exec. + * src/posix-io.c [__linux__]: Include dirent.h. + (get_max_fds) [__linux__]: Try to figure out the highest used fd. + +2016-05-27 Justus Winter + + python: Port more tests. + * lang/python/pyme/core.py (Data._error_check): Add + 'gpgme_data_get_file_name' to the list of functions not returning an + error code. + * lang/python/tests/Makefile.am (pytests): Add new tests. + * lang/python/tests/support.py (verbose): New variable. + * lang/python/tests/t-data.py: Test setting and getting the filename. + * lang/python/tests/t-encrypt-large.py: New file. + * lang/python/tests/t-file-name.py: Likewise. + * lang/python/tests/t-trustlist.py: Likewise. + + python: Implement data callbacks. + * lang/python/gpgme.i (object_to_gpgme_t): Set exception on error. + * lang/python/helpers.c (pyDataReadCb): New function. + (pyDataWriteCb): Likewise. + (pyDataSeekCb): Likewise. + (pyDataReleaseCb): Likewise. + (pygpgme_data_new_from_cbs): Likewise. + * lang/python/helpers.h (pygpgme_data_new_from_cbs): New prototype. + * lang/python/pyme/core.py (Data.__init__): Fix docstring, fix read + callbacks. + (Data.__del__): Fix read callbacks. + (Data._free_readcb): Drop function. + (Data._free_datacbs): New function. + (Data.new_from_cbs): Fix setting the callbacks. + (Data.write): Raise stashed exceptions. + (Data.read): Likewise. + * lang/python/tests/t-callbacks.py: Test new functionality. + * lang/python/tests/t-data.py: Likewise. + + python: Fix object deallocation. + Handing a reference to the wrapper object created a non-trivial + circular reference that Pythons garbage collector is unable to break. + Explicitly break it by using a weak reference. + + * lang/python/helpers.c (pygpgme_stash_callback_exception): Retrieve + object from weak reference. + * lang/python/pyme/core.py (Context.__del__): Free status callback. + (Context.set_passphrase_cb): Use a weak reference. + (Context.set_progress_cb): Likewise. + (Context.set_status_cb): Likewise. + (Context.op_edit): Likewise. + + Improve comments. + * src/gpgme.h.in (gpgme_data_seek_cb_t, gpgme_data_seek): Clarify that + these functions return the new offset. + (gpgme_data_release_cb_t): Fix name of parameter. + + python: Fix reading data from existing files. + * lang/python/pyme/core.py (Data.__init__): Add 'copy' kwargument, and + pass it to functions supporting it. PEP8 fix. + (Data.new_from_fd): PEP8 fix. + (Data.new_from_file): Give a more helpful error message if copy is + False. PEP8 fix. + (Data.new_from_fd): Hand the file descriptor to + 'gpgme_data_new_from_fd', not a stream. Fix docstring. + * lang/python/tests/t-data.py: Add tests for this. + +2016-05-25 Justus Winter + + src: Fix trace string. + * src/data-compat.c (gpgme_data_new_from_file): Fix trace string. + +2016-05-24 Justus Winter + + python: Improve and test Context.wait. + * lang/python/pyme/core.py (Context.wait): Improve docstring. As the + context passed to 'gpgme_wait' is never NULL, it is pointless to look + at the returned context. Always raise exceptions. + * lang/python/tests/Makefile.am (pytests): Add new test. + * lang/python/tests/t-wait.py: New file. + + python: Make all GnuPG errors available. + * lang/python/Makefile.am (errors.i): Generate file. + * lang/python/gpgme.i: Include generated file. + * lang/python/pyme/errors.py: Pull in all errors and error sources. + + python: Move the base wrapper class. + * python/lang/pyme/util.py (GpgmeWrapper): Move... + * python/lang/pyme/core.py: ... here. + + python: Support status callbacks. + * lang/python/helpers.c (pyStatusCb): New function. + (pygpgme_set_status_cb): Likewise. + * lang/python/helpers.h (pygpgme_set_status_cb): New prototype. + * lang/python/pyme/core.py (Context.__init__): Initialize + 'last_statuscb'. + (Context._free_statuscb): New function. + (Context.set_status_cb): Likewise. + * lang/python/tests/t-callbacks.py: Test status callbacks. + + python: Improve docstring. + * lang/python/pyme/core.py (Context.set_progress_cb): Improve + docstring. + +2016-05-24 Andre Heinecke + + Qt: Fix test build with clang. + * lang/qt/tests/Makefile.am (LDADD): Explicitly add -lstdc++ + + Cpp: Set -std=c++11 also if CXXCPP is already set. + * m4/ax_cxx_compile_stdxx.m4 (AX_CXX_COMPILE_STDCXX): Set CXXCPP if + neccessary. + +2016-05-24 Justus Winter + + python: Improve support for edit callbacks. + * lang/python/helpers.c (pyEditCb): Stash exceptions. + * lang/python/pyme/core.py (Context.op_edit): Hand in 'self'. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-callbacks.py: Test edit callbacks. + * lang/python/tests/t-edit.py: New file. + +2016-05-23 Justus Winter + + python: Fix hook. + * lang/python/helpers.c (pyProgressCb): Fix getting hook data. + * lang/python/tests/t-callbacks.py: Show that this works. + + python: Move edit callback function. + * lang/python/gpgme.i (pyEditCb): Move... + * lang/python/helpers.c: ... here. + * lang/python/helpers.h (pyEditCb): New prototype. + + python: Port more tests. + * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Set + LD_LIBRARY_PATH. + (pytests): Add new tests. + * lang/python/tests/t-callbacks.py: Trim imports. + * lang/python/tests/t-encrypt-sign.py: New file. + * lang/python/tests/t-export.py: Likewise. + * lang/python/tests/t-signers.py: Likewise. + + python: Translate list of strings. + * lang/python/gpgme.i: Add typemap translating list of strings. + +2016-05-21 Werner Koch + + api: Return Tofu info for signatures. + * src/gpgme.h.in (gpgme_tofu_policy_t): New. + (gpgme_status_code_t): Add status codes for TOFU. + (struct _gpgme_tofu_info, gpgme_tofu_info_t): New. + (struct _gpgme_signature): Add field 'tofu'. + * src/status-table.c (status_table): Add new codes. + * src/verify.c: Include limits.h. + (release_tofu_info): New. + (release_op_data): Call that. + (parse_tofu_user): New. + (parse_tofu_stats): New. + (parse_tofu_stats_long): New. + (_gpgme_verify_status_handler): Handle TOFU status lines. + + * tests/run-verify.c (print_description): New. + (print_result): print tofu info. + + api: Add new context flag "raw-description". + * src/context.h (struct gpgme_context): Add field raw_description. + * src/gpgme.c (gpgme_set_ctx_flag): New flag. + + core: New functions to help parsing of status lines. + * src/conversion.c (_gpgme_split_fields): New. + (_gpgme_strtoul_field): New. + +2016-05-20 Andre Heinecke + + Qt: Add test for changeownertrust. + * lang/qt/tests/t-ownertrust.cpp: New test. + * lang/qt/tests/Makefile.am: Add test. + + Cpp: Ignore STATUS_KEY_CONSIDERED when editing. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Handle GPGME_STATUS_KEY_CONSIDERED. + +2016-05-19 Werner Koch + + api: Add new function gpgme_set_ctx_flag. + * src/gpgme.h.in (gpgme_set_ctx_flag): New prototype. + * src/gpgme.c (gpgme_set_ctx_flag): New. + * src/gpgme.def, src/libgpgme.vers: Add new function. + * src/context.h (struct gpgme_context): Add FULL_STATUS. + * src/decrypt.c (_gpgme_decrypt_status_handler): Do not call the + status callback if FULL_STATUS is set. + * src/genkey.c (genkey_status_handler): Ditto. + * src/passphrase.c (_gpgme_passphrase_status_handler): Ditto. + * src/sign.c (_gpgme_sign_status_handler): Ditto. + + * src/engine-backend.h (struct engine_ops): Add SET_STATUS_CB and add + adjust all definitions of that variable. + * src/engine.c (_gpgme_engine_set_status_cb): New. + * src/op-support.c (_gpgme_op_reset): Call this function. + + * src/engine-gpg.c (struct engine_gpg): Add fields MON_CB and + MON_CB_VALUE. + (gpg_set_status_cb): New. + (_gpgme_engine_ops_gpg): Register that function. + (read_status): Call the monitor callback. + + * src/engine-gpgsm.c (struct engine_gpgsm): Add fields MON_CB and + MON_CB_VALUE. + (_gpgme_engine_ops_gpgsm): Register that function. + (gpgsm_assuan_simple_command): Change first arg to be an engine + context and adjust call callers. Call the monitor callback. + + * src/engine-uiserver.c (struct engine_uiserver): Add fields MON_CB + and MON_CB_VALUE. + (_gpgme_engine_ops_uiserver): Register that function. + (uiserver_assuan_simple_command): Change first arg to be an engine + context and adjust call callers. Call the monitor callback. + + * tests/run-verify.c (status_cb): New. + (print_result): Print algo names. + (main): Add option --status. + + api: Remove arbitrary restriction from gpgme_op_verify. + * src/verify.c (verify_start): Do not return GPG_ERR_INV_VALUES when + when SIGNED_TEXT is not given. + +2016-05-19 Justus Winter + + python: Improve progress callbacks. + * lang/python/helpers.c (pyProgressCb): Stash python errors, convert + 'what' to Unicode object. + * lang/python/pyme/core.py (Context.set_progress_cb): Hand in 'self'. + * lang/python/tests/t-callbacks.py: Test progress callbacks. + + python: Robust exception handling in callbacks. + * lang/python/helpers.c (pygpgme_stash_callback_exception): New + function. + (pygpgme_raise_callback_exception): Likewise. + (pyPassphraseCb): Stash python errors. + * lang/python/helpers.h (pygpgme_raise_callback_exception): New + prototype. + * lang/python/pyme/core.py ({Context,Data}.__init__): Move common + initialization to superclass. + (Context.set_progress_cb): Hand in 'self'. + * lang/python/pyme/util.py (GpgmeWrapper.__init__): New function. + (GpgmeWrapper.__getattr__): Raise stashed exceptions. + * lang/python/tests/Makefile.am (py_tests): Add new test. + * lang/python/tests/t-callbacks.py: New file. + +2016-05-19 Andre Heinecke + + Qt: Check for graphviz and set HAVE_DOT correctly. + * configure.ac: Check for graphviz and define HAVE_DOT. + * lang/qt/doc/Doxyfile.in (HAVE_DOT): Use variable. + +2016-05-19 Justus Winter + + python: Add more tests. + * lang/python/tests/Makefile.am (py_tests): Add new tests. + * lang/python/tests/support.py (print_data): New function. + * lang/python/tests/t-decrypt.py: Use new function. + * lang/python/tests/t-encrypt.py: Likewise. + * lang/python/tests/t-sign.py: New file. + * lang/python/tests/t-encrypt-sym.py: Likewise. + + python: More type conversion fixes. + * lang/python/helpers.c (pyPassphraseCb): Cope with 'uid_hint' being + NULL, convert it to an Unicode object, and cope with the callback + returning both Unicode and bytes objects. + + python: Fix import. + * lang/python/helpers.c (pygpgme_exception_init): Make module import + relative. + +2016-05-19 Andre Heinecke + + Qt: Fix compilation of unit tests. + * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME. + +2016-05-18 Justus Winter + + python: Various fixes. + * configure.ac: Fix SWIG detection, bump required Python version. + * lang/python/Makefile.am: Portability fix. + +2016-05-18 Andre Heinecke + + Fix typo in compatibility declaration. + * src/op-support.c (GPG_ERR_SUBKEYS_EXP_REV): Change to + GPG_ERR_SUBKEYS_EXP_OR_REV. + +2016-05-17 Werner Koch + + tests: New maintenance helper run-encrypt. + * tests/run-encrypt.c: New. + + Return dedicated error code for all subkeys expired or revoked. + * src/gpgme.h.in (GPGME_STATUS_KEY_CONSIDERED): New. + (GPGME_SIGSUM_TOFU_CONFLICT): New. + * src/status-table.c (KEY_CONSIDERED): New. + * src/op-support.c (_gpgme_parse_inv_recp): Add argc KC_FPR and + KC_FLAGS. Use calloc. Detect all expired or revoked subkeys. + (_gpgme_parse_key_considered): New. + * src/sign.c (op_data_t): Add fields KC_FPR and KC_FLAGS. + (release_op_data): Free KC_FPR. + (_gpgme_sign_status_handler): Handle STATUS_KEY_CONSIDERED. + * src/encrypt.c (op_data_t): Add fields KC_FPR and KC_FLAGS. + (release_op_data): Free KC_FPR. + (_gpgme_encrypt_status_handler): Handle STATUS_KEY_CONSIDERED. + +2016-05-17 Andre Heinecke + + Qt / Cpp: Port auto_ptr to unique_ptr. + * lang/cpp/src/context.cpp, + lang/cpp/src/context.h, + lang/cpp/src/context_p.h (Context::createForEngine), + (Context::edit, Context::startEditing), + (Context::takeLastEditInteractor, Context::cardEdit), + (Context::startCardEditing, Context::takeLastCardEditInteractor), + (Context::assuanTransact, Context::startAssuanTransaction), + (Context::takeLastAssuanTransaction): Port to unique_ptr. + * lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. + +2016-05-17 Justus Winter + + build: Add python autoconf macro. + * m4/ax_python_devel.m4: New file. + + python: Clean up examples. + * lang/python/examples/delkey.py: Clean up example. + * lang/python/examples/encrypt-to-all.py: Likewise. + * lang/python/examples/genkey.py: Likewise. + * lang/python/examples/inter-edit.py: Likewise. + * lang/python/examples/sign.py: Likewise. + * lang/python/examples/signverify.py: Likewise. + * lang/python/examples/simple.py: Likewise. + * lang/python/examples/t-edit.py: Likewise. + * lang/python/examples/verifydetails.py: Likewise. + * lang/python/pyme/__init__.py: Likewise. + + python: Import GPGMEError. + * pyme/core.py: Import GPGMEError. + + Fixes c5d118b2. + + python: Port more tests. + * lang/python/Makefile.am: Add bits from the c test suite. + * lang/python/support.py: New file. + * lang/python/t-decrypt.py: Likewise. + * lang/python/t-encrypt.py: Likewise. + +2016-05-13 Andre Heinecke + + Qt: Add keyLocateJob and test for it. + * configure.ac (LIBQGPGME_LT_REVISION): Bump. + * lang/qt/src/protocol.h (locateKeysJob): Add Job. + * lang/qt/src/protocol_p.h (locateKeysJob): Implement. + * lang/qt/tests/Makefile.am: Add t-keylocate. + * lang/qt/tests/t-keylocate.cpp: New. + + Qt: Add missing copyright header in test. + * lang/qt/tests/t-keylist.cpp: Add copyright header. + +2016-05-12 Justus Winter + + python: Share generated methods between objects. + * lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch + the class. + * lang/python/tests/t-wrapper.py: Demonstrate the sharing. + + python: Raise exceptions on write errors. + * lang/python/pyme/core.py (Data.write): Handle errors. + * lang/python/pyme/errors.py (GPGMEError.fromSyserror): New function. + + python: Fix writing to data buffers. + * lang/python/gpgme.i: Add typemap for buffers. + * lang/python/pyme/core.py (Data.write): Fix function. + * lang/python/tests/Makefile.am: Add new test. + * lang/python/tests/t-data.py: New file. + + python: Add a test suite. + * configure.ac: Add new Makefile. + * lang/python/Makefile.am: Add subdirectory. + * lang/python/tests/Makefile.am: New file. + * lang/python/tests/t-wrapper.py: Likewise. + + python: Cache generated wrapper functions. + * lang/python/util.py (GpgmeWrap.__getattr__): Cache generated wrapper + functions. + + python: Fix function invocation. + * lang/python/pyme/core.py (Data.new_from_fd): Fix function + invocation. + + python: Fix name of exception, make slot methods explicit. + * lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception, + add docstring. + (GpgmeWrapper._getnameprepend): New function. + (GpgmeWrapper._errorcheck): Likewise. + + python: Handle interpreter shutdown. + * lang/python/pyme/core.py: Avoid races at interpreter shutdown. This + silences the most annoying occurrences, however this problem also + affects the SWIG generated code, which might indicate that the real + problem is somewhere else. If so, this change can be easily reverted. + + python: Make test case more robust. + * lang/python/examples/t-edit.py: Check if key is found. + + python: Fix type translation. + * lang/python/gpgme.i: Adjust to Python3's string type being + 'Unicode', not 'bytes'. Fix type checking. + * lang/python/core.py (Data.write): Add docstring mentioning the + expected type of parameter 'buffer'. + (Data.read): Adjust read loop. Also, use a saner chunk size, and join + all chunks at the end instead of adding them. + * lang/python/examples/simple.py: Adjust example. + +2016-05-11 Andre Heinecke + + Cpp: Ensure gpgme.h is taken from current build. + * lang/cpp/src/Makefile.am (AM_CPPFLAGS): Add gpgme.h location. + +2016-05-11 Justus Winter + + python: Fix simple example. + * lang/python/examples/simple.py: Flush stdout, encode name as + UTF-8 before passing it to GPGME. + + python: Integrate into the build system. + * configure.ac: Make Python bindings configurable, add new Makefile. + * lang/python/Makefile.am: New file. + * lang/python/setup.py: Integrate into the build system. + * m4/ax_pkg_swig.m4: New file from the autoconf archive. + * m4/m4_ax_swig_python.m4: Likewise. + +2016-05-10 Andre Heinecke + + Qt / Cpp: Fix make dist. + * lang/cpp/src/Makefile.am (EXTRA_DIST): Fix typo. + (private_gpgmepp_headers): New. Private headers. + (libgpgmepp_la_SOURCES): Add private headers. + * lang/qt/src/Makefile.am (t_keylist_SOURCES): Remove non existent + header. + +2016-05-10 Justus Winter + + python: PEP8 fixes. + Cherry picked from 0267c151. + +2016-05-10 Andre Heinecke + + Qt: Make Protocol class public API. + * lang/qt/src/Makefile.am (qgpgme_headers): Add protocol.h + (private_qgpgme_headers): Add protocol_p.h + * lang/qt/src/protocol.h: New. From QGpgMEBackend. + * lang/qt/src/protocol_p.h: New. From QGpgMEBackend. + * lang/qt/src/qgpgmebackend.h, + lang/qt/src/qgpgmebackend.cpp (Protocol): Removed. + + Qt: Make doxygen quieter. + * lang/qt/doc/Doxyfile.in: Quiet and no undocumented warnings. + + Qt: Only install public headers. + * lang/qt/src/Makefile.am: Do not install all headers. + + Qt: Add test for async keylisting. + * src/lang/qt/tests/t-keylist.cpp(KeyListTest::testKeyListAsync): New. + +2016-05-10 Werner Koch + + Allow cc to detect missing cases in a switch. + * src/delete.c (delete_status_handler): Remove default case from a + switch so that cc can check the use of all enum values. + +2016-05-06 Andre Heinecke + + Use common error message style for qt lang checks. + * configure.ac: Use common error highliting for qt lang options. + + Qt: Fix license mentioned in README. + * lang/qt/README: License is GPLv2+ and not LGPL. + + Add maybe mode for langs and default to it. + * configure.ac (languages): Warn and disable langs for which + requirements are not met. + + Cpp: Handle PINENTRY_LAUNCHED status line. + * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): + Add GPGME_STATUS_PINENTRY_LAUNCHED. + +2016-04-12 Andre Heinecke + + Cpp: Add support for pubkey_algo_name. + * lang/cpp/src/key.cpp (Subkey::algoName): New. + * lang/cpp/src/key.h: Declare. + + Cpp: Add support for gpgme_data_identify. + * lang/cpp/src/data.cpp (Data::type): New. + * lang/cpp/src/data.h (Data::Type): New enum mapping. + + Fix configuration without Qt language. + * configure.ac: Define HAVE_DOXYGEN also if qt should not be built. + +2016-04-11 Andre Heinecke + + Qt/Cpp: Bump so version to 6. + * configure.ac (LIBGPGMEPP_LT_CURRENT, LIBQGPGME_LT_CURRENT): Bump. + + Qt / Cpp: Mention coding style in READMES. + * src/lang/cpp/README, src/lang/qt/README: Add hacking note. + + Qt: Add doc generation with doxygen. + * configure.ac: Look for doxygen if qt is built. + Configure new files. + * lang/qt/doc/Doxyfile.in: New. + * lang/qt/doc/Makefile.am: New. + * lang/qt/README: Update. + + Qt: Fix unit test by adding initial.test dep. + * lang/qt/tests/t-keylist.cpp: Verify that GNUPGHOME is set. + * lang/qt/tests/initial.test: New dummy test. + * lang/qt/tests/Makefile.am: Add dependency to initial.test + + Qt: Remove remaining boost usage. + * lang/qt/src/dataprovider.h, + lang/qt/src/decryptjob.h, + lang/qt/src/decryptverifyjob.h, + lang/qt/src/encryptjob.h, + lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmedecryptjob.cpp, + lang/qt/src/qgpgmedecryptverifyjob.cpp, + lang/qt/src/qgpgmedeletejob.cpp, + lang/qt/src/qgpgmedownloadjob.cpp, + lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmeexportjob.cpp, + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, + lang/qt/src/qgpgmeimportjob.cpp, + lang/qt/src/qgpgmekeygenerationjob.cpp, + lang/qt/src/qgpgmekeylistjob.cpp, + lang/qt/src/qgpgmenewcryptoconfig.cpp, + lang/qt/src/qgpgmenewcryptoconfig.h, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmesignjob.cpp, + lang/qt/src/qgpgmesignkeyjob.cpp, + lang/qt/src/qgpgmeverifydetachedjob.cpp, + lang/qt/src/qgpgmeverifyopaquejob.cpp, + lang/qt/src/signencryptjob.h, + lang/qt/src/signjob.h, + lang/qt/src/threadedjobmixin.cpp, + lang/qt/src/threadedjobmixin.h, + lang/qt/src/verifydetachedjob.h, + lang/qt/src/verifyopaquejob.h: Remove boost usage. + + Qt: Remove predicates.h and stl_util.h. + * src/lang/qt/predicates.h, src/lang/qt/stl_util.h: Removed. + + Qt: Remove usage of stl_util.h and predicates.h. + * src/lang/qt/qgpgmelistallkeysjob.cpp: Use comperators from + gpgmepp instead of detail. Remove boost usage. + + Cpp: Add string comparators for keys. + * lang/cpp/src/global.h (GPGMEPP_MAKE_STRCMP): New. + (_gpgmepp_strcmp): NULL save wrapper around std::strcmp. + * lang/cpp/src/key.h: Add comparators for various attributes. + + Cpp: Remove last usages of boost. + * lang/cpp/src/configuration.cpp: Use std::remove_pointer. + (Configuration::operator<<): std::for_each. + * lang/cpp/src/context.cpp: Delete manually instead of scoped ptr. + * lang/cpp/src/scdgetinfoassuantransaction.cpp: Use static_assert. + (to_reader_list): Tokenize with getline. + +2016-04-04 Andre Heinecke + + Add pthread in gpgmepp config. + * lang/cpp/src/GpgmeppConfig.cmake.in.in: Add pthread. + +2016-04-03 Andre Heinecke + + Cpp / Qt: Reduce boost usage (memory and tuple) + * cpp/src/assuanresult.h, + cpp/src/configuration.cpp, + cpp/src/configuration.h, + cpp/src/data.h, + cpp/src/decryptionresult.h, + cpp/src/defaultassuantransaction.cpp, + cpp/src/encryptionresult.cpp, + cpp/src/encryptionresult.h, + cpp/src/engineinfo.h, + cpp/src/gpgagentgetinfoassuantransaction.cpp, + cpp/src/gpgsignkeyeditinteractor.cpp, + cpp/src/importresult.cpp, + cpp/src/importresult.h, + cpp/src/key.h, + cpp/src/keygenerationresult.h, + cpp/src/keylistresult.h, + cpp/src/notation.h, + cpp/src/signingresult.cpp, + cpp/src/signingresult.h, + cpp/src/verificationresult.cpp, + cpp/src/verificationresult.h, + cpp/src/vfsmountresult.h, + qt/src/dataprovider.cpp, + qt/src/dataprovider.h, + qt/src/decryptjob.h, + qt/src/decryptverifyjob.h, + qt/src/downloadjob.h, + qt/src/encryptjob.h, + qt/src/qgpgmeadduseridjob.cpp, + qt/src/qgpgmechangeexpiryjob.cpp, + qt/src/qgpgmechangeownertrustjob.cpp, + qt/src/qgpgmechangepasswdjob.cpp, + qt/src/qgpgmedecryptjob.cpp, + qt/src/qgpgmedecryptjob.h, + qt/src/qgpgmedecryptverifyjob.cpp, + qt/src/qgpgmedecryptverifyjob.h, + qt/src/qgpgmedeletejob.cpp, + qt/src/qgpgmedownloadjob.cpp, + qt/src/qgpgmedownloadjob.h, + qt/src/qgpgmeencryptjob.cpp, + qt/src/qgpgmeencryptjob.h, + qt/src/qgpgmeexportjob.cpp, + qt/src/qgpgmeexportjob.h, + qt/src/qgpgmeimportfromkeyserverjob.cpp, + qt/src/qgpgmeimportfromkeyserverjob.h, + qt/src/qgpgmeimportjob.cpp, + qt/src/qgpgmeimportjob.h, + qt/src/qgpgmekeygenerationjob.cpp, + qt/src/qgpgmekeygenerationjob.h, + qt/src/qgpgmekeylistjob.cpp, + qt/src/qgpgmekeylistjob.h, + qt/src/qgpgmelistallkeysjob.cpp, + qt/src/qgpgmelistallkeysjob.h, + qt/src/qgpgmenewcryptoconfig.cpp, + qt/src/qgpgmenewcryptoconfig.h, + qt/src/qgpgmesignencryptjob.cpp, + qt/src/qgpgmesignencryptjob.h, + qt/src/qgpgmesignjob.cpp, + qt/src/qgpgmesignjob.h, + qt/src/qgpgmesignkeyjob.cpp, + qt/src/qgpgmeverifydetachedjob.cpp, + qt/src/qgpgmeverifydetachedjob.h, + qt/src/qgpgmeverifyopaquejob.cpp, + qt/src/qgpgmeverifyopaquejob.h, + qt/src/signencryptjob.h, + qt/src/signjob.h, + qt/src/threadedjobmixin.h, + qt/src/verifydetachedjob.h, + qt/src/verifyopaquejob.h: Reduce boost usage. + + Cpp: Require c++ 11 if cpp binding requested. + * configure.ac: Call ax_cxx_compile_stdcxx + * m4/ax_cxx_compile_stdcxx.m4 + + Qt: Add static factor methods for protocol. + * lang/qt/src/qgpgmebackend.cpp (QGpgME::openpgp, QGpgME::smime): New. + * lang/qt/src/qgpgmebackend.h: Declare. + * lang/qt/tests/t-keylist.cpp (KeyListTest::testSingleKeyListSync): + Use new functions. + + Qt: Add a unit test for qgpgme. + * configure.ac: Configure test Makefile. + * m4/qt.m4: Look up Qt5Test flags. + * lang/qt/tests/t-keylist.cpp: New. Simple keylist check. + * lang/qt/tests/Makefile.am: New. General test framework. + + Qt: Add missing MOC includes. + * qgpgmeadduseridjob.cpp, + qgpgmechangeexpiryjob.cpp, + qgpgmechangeownertrustjob.cpp, + qgpgmechangepasswdjob.cpp, + qgpgmedecryptjob.cpp, + qgpgmedecryptverifyjob.cpp, + qgpgmedeletejob.cpp, + qgpgmedownloadjob.cpp, + qgpgmeencryptjob.cpp, + qgpgmeexportjob.cpp, + qgpgmeimportfromkeyserverjob.cpp, + qgpgmeimportjob.cpp, + qgpgmekeygenerationjob.cpp, + qgpgmekeylistjob.cpp, + qgpgmelistallkeysjob.cpp, + qgpgmerefreshkeysjob.cpp, + qgpgmesecretkeyexportjob.cpp, + qgpgmesignencryptjob.cpp, + qgpgmesignjob.cpp, + qgpgmesignkeyjob.cpp, + qgpgmeverifydetachedjob.cpp, + qgpgmeverifyopaquejob.cpp: Add missing MOC includes. + + Qt: Declare pure virtuals as such. + * lang/qt/src/qgpgmebackend.h (Protocol): Make all functions + pure virtual. + + Qt: Don't declare showErrorDialog anymore. + * cpp/qt/src/job.h: Remove showErrorDialog. + + Qt: Only use GpgME based config class. + * lang/qt/src/qgpgmecryptoconfig.cpp, + lang/qt/src/qgpgmecryptoconfig.h: Removed. + * lang/qt/src/qgpgmebackend.cpp: Return newcryptoconfig. + +2016-04-02 Andre Heinecke + + Add additional include path in config files. + * lang/cpp/src/GpgmeppConfig.cmake.in.in + lang/qt/src/QGpgmeConfig.cmake.in.in: Include directory above headers. + + Qt: Fix library name in nodist variable. + * lang/qt/Makefile.am (nodist_qgpgme_SOURCES): Change to real name. + + Add missing files to QGpgME. + * lang/qt/src/gpgme_backend_debug.cpp, + lang/qt/src/gpgme_backend_debug.h, + lang/qt/src/predicates.h, + lang/qt/src/stl_util.h: New. + + Add QGpgME code from libkleo. + * lang/qt/src/Makefile.am, + lang/qt/src/abstractimportjob.h, + lang/qt/src/adduseridjob.h, + lang/qt/src/changeexpiryjob.h, + lang/qt/src/changeownertrustjob.h, + lang/qt/src/changepasswdjob.h, + lang/qt/src/cryptoconfig.h, + lang/qt/src/decryptjob.h, + lang/qt/src/decryptverifyjob.h, + lang/qt/src/deletejob.h, + lang/qt/src/downloadjob.h, + lang/qt/src/encryptjob.h, + lang/qt/src/exportjob.h, + lang/qt/src/hierarchicalkeylistjob.h, + lang/qt/src/importfromkeyserverjob.h, + lang/qt/src/importjob.h, + lang/qt/src/job.cpp, + lang/qt/src/job.h, + lang/qt/src/keygenerationjob.h, + lang/qt/src/keylistjob.h, + lang/qt/src/listallkeysjob.h, + lang/qt/src/multideletejob.h, + lang/qt/src/qgpgmeadduseridjob.cpp, + lang/qt/src/qgpgmeadduseridjob.h, + lang/qt/src/qgpgmebackend.cpp, + lang/qt/src/qgpgmebackend.h, + lang/qt/src/qgpgmechangeexpiryjob.cpp, + lang/qt/src/qgpgmechangeexpiryjob.h, + lang/qt/src/qgpgmechangeownertrustjob.cpp, + lang/qt/src/qgpgmechangeownertrustjob.h, + lang/qt/src/qgpgmechangepasswdjob.cpp, + lang/qt/src/qgpgmechangepasswdjob.h, + lang/qt/src/qgpgmecryptoconfig.cpp, + lang/qt/src/qgpgmecryptoconfig.h, + lang/qt/src/qgpgmedecryptjob.cpp, + lang/qt/src/qgpgmedecryptjob.h, + lang/qt/src/qgpgmedecryptverifyjob.cpp, + lang/qt/src/qgpgmedecryptverifyjob.h, + lang/qt/src/qgpgmedeletejob.cpp, + lang/qt/src/qgpgmedeletejob.h, + lang/qt/src/qgpgmedownloadjob.cpp, + lang/qt/src/qgpgmedownloadjob.h, + lang/qt/src/qgpgmeencryptjob.cpp, + lang/qt/src/qgpgmeencryptjob.h, + lang/qt/src/qgpgmeexportjob.cpp, + lang/qt/src/qgpgmeexportjob.h, + lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, + lang/qt/src/qgpgmeimportfromkeyserverjob.h, + lang/qt/src/qgpgmeimportjob.cpp, + lang/qt/src/qgpgmeimportjob.h, + lang/qt/src/qgpgmekeygenerationjob.cpp, + lang/qt/src/qgpgmekeygenerationjob.h, + lang/qt/src/qgpgmekeylistjob.cpp, + lang/qt/src/qgpgmekeylistjob.h, + lang/qt/src/qgpgmelistallkeysjob.cpp, + lang/qt/src/qgpgmelistallkeysjob.h, + lang/qt/src/qgpgmenewcryptoconfig.cpp, + lang/qt/src/qgpgmenewcryptoconfig.h, + lang/qt/src/qgpgmerefreshkeysjob.cpp, + lang/qt/src/qgpgmerefreshkeysjob.h, + lang/qt/src/qgpgmesecretkeyexportjob.cpp, + lang/qt/src/qgpgmesecretkeyexportjob.h, + lang/qt/src/qgpgmesignencryptjob.cpp, + lang/qt/src/qgpgmesignencryptjob.h, + lang/qt/src/qgpgmesignjob.cpp, + lang/qt/src/qgpgmesignjob.h, + lang/qt/src/qgpgmesignkeyjob.cpp, + lang/qt/src/qgpgmesignkeyjob.h, + lang/qt/src/qgpgmeverifydetachedjob.cpp, + lang/qt/src/qgpgmeverifydetachedjob.h, + lang/qt/src/qgpgmeverifyopaquejob.cpp, + lang/qt/src/qgpgmeverifyopaquejob.h, + lang/qt/src/refreshkeysjob.h, + lang/qt/src/signencryptjob.h, + lang/qt/src/signjob.h, + lang/qt/src/signkeyjob.h, + lang/qt/src/specialjob.h, + lang/qt/src/threadedjobmixin.cpp, + lang/qt/src/threadedjobmixin.h, + lang/qt/src/verifydetachedjob.h, + lang/qt/src/verifyopaquejob.h: New. + * lang/qt/src/Makefile.am: + +2016-03-08 Andre Heinecke + + Add qgpgme as qt language binding. + * configure.ac: Add version defines. Check for qt if neccessary. + * lang/README: Mention qt + * lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove comment. Find qgpgme. + * lang/qt/src/Makefile.am: New. Build qgpgme. + * lang/qt/README, + lang/qt/src/Makefile.am, + lang/qt/src/QGpgmeConfig.cmake.in.in, + lang/qt/src/QGpgmeConfigVersion.cmake.in, + lang/qt/src/dataprovider.cpp, + lang/qt/src/dataprovider.h, + lang/qt/src/qgpgme_export.h, + m4/qt.m4: New. + * lang/cpp/src/GpgmeppConfig.cmake.in.in, + lang/cpp/src/Makefile.am: Fix generated config file. + + Remove obsolete w32-qt code. + * configure.ac (w32-qt): Remove option and Qt checks. + * src/Makefile.am: Remove BUILD_W32_QT handling. + * src/kdpipeiodevice.cpp, + src/kdpipeiodevice.h, + src/kdpipeiodevice.moc, + src/w32-qt-io.cpp: Removed. + +2016-03-02 Andre Heinecke + + Add version info for gpgmepp. + * lang/cpp/src/Makefile.am (libgpgmepp_la_LDFLAGS): Add version info. + + Add cmake configuration files. + * configure.ac: Add libgpgmepp version. Configure cmake files. + * lang/cpp/src/Makefile.am: Add targets for cmake files. + (EXTRA_DIST): Add cmake files. + + Fix export header and windows export macros. + * lang/cpp/src/gpgme_export.h: Fix variable name. Add Windows ifdefs. + + Add header installation. + * lang/cpp/src/Makefile.am: Add headers as deps and install them. + (AM_CPPFLAGS): Add BUILDING_GPGMEPP to be used in export macros. + + Add enable-languages build option. + * acinclude.m4 (LIST_MEMBER): New macro. + * configure.ac (enable-languages): New option. Add info output. + * lang/Makefile.am: Only add enabled language subdirs. + +2016-02-22 Andre Heinecke + + Add README for gpgmepp. + * lang/README: Note down cpp. + * cpp/README: Add README based on original repo version. + + Add buildsystem for Gpgmepp. + * configure.ac: Configure Makefiles. + * lang/Makefile.am: Add cpp subdir + * lang/cpp/Makefile.am: New. Add src subdir. + * lang/cpp/src/Makefile.am: New. Basic buildsystem. + + Remove feature check ifdefs. + * lang/cpp/src/assuanresult.cpp, + lang/cpp/src/callbacks.cpp, + lang/cpp/src/configuration.cpp, + lang/cpp/src/context.cpp, + lang/cpp/src/context_glib.cpp, + lang/cpp/src/context_qt.cpp, + lang/cpp/src/context_vanilla.cpp, + lang/cpp/src/data.cpp, + lang/cpp/src/decryptionresult.cpp, + lang/cpp/src/defaultassuantransaction.cpp, + lang/cpp/src/editinteractor.cpp, + lang/cpp/src/encryptionresult.cpp, + lang/cpp/src/engineinfo.cpp, + lang/cpp/src/eventloopinteractor.cpp, + lang/cpp/src/global.h, + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, + lang/cpp/src/importresult.cpp, + lang/cpp/src/interfaces/assuantransaction.h, + lang/cpp/src/key.cpp, + lang/cpp/src/keygenerationresult.cpp, + lang/cpp/src/keylistresult.cpp, + lang/cpp/src/scdgetinfoassuantransaction.cpp, + lang/cpp/src/signingresult.cpp, + lang/cpp/src/trustitem.cpp, + lang/cpp/src/util.h, + lang/cpp/src/verificationresult.cpp, + lang/cpp/src/vfsmountresult.cpp: Remove feature checks. + + Initial checkin of gpgmepp sources. + Based on git.kde.org/pim/gpgmepp rev. 0e3ebc02 + + * lang/cpp/src/assuanresult.cpp, + lang/cpp/src/assuanresult.h, + lang/cpp/src/callbacks.cpp, + lang/cpp/src/callbacks.h, + lang/cpp/src/configuration.cpp, + lang/cpp/src/configuration.h, + lang/cpp/src/context.cpp, + lang/cpp/src/context.h, + lang/cpp/src/context_glib.cpp, + lang/cpp/src/context_p.h, + lang/cpp/src/context_qt.cpp, + lang/cpp/src/context_vanilla.cpp, + lang/cpp/src/data.cpp, + lang/cpp/src/data.h, + lang/cpp/src/data_p.h, + lang/cpp/src/decryptionresult.cpp, + lang/cpp/src/decryptionresult.h, + lang/cpp/src/defaultassuantransaction.cpp, + lang/cpp/src/defaultassuantransaction.h, + lang/cpp/src/editinteractor.cpp, + lang/cpp/src/editinteractor.h, + lang/cpp/src/encryptionresult.cpp, + lang/cpp/src/encryptionresult.h, + lang/cpp/src/engineinfo.cpp, + lang/cpp/src/engineinfo.h, + lang/cpp/src/error.h, + lang/cpp/src/eventloopinteractor.cpp, + lang/cpp/src/eventloopinteractor.h, + lang/cpp/src/exception.cpp, + lang/cpp/src/exception.h, + lang/cpp/src/global.h, + lang/cpp/src/gpgadduserideditinteractor.cpp, + lang/cpp/src/gpgadduserideditinteractor.h, + lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, + lang/cpp/src/gpgagentgetinfoassuantransaction.h, + lang/cpp/src/gpgmefw.h, + lang/cpp/src/gpgmepp_export.h, + lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, + lang/cpp/src/gpgsetexpirytimeeditinteractor.h, + lang/cpp/src/gpgsetownertrusteditinteractor.cpp, + lang/cpp/src/gpgsetownertrusteditinteractor.h, + lang/cpp/src/gpgsignkeyeditinteractor.cpp, + lang/cpp/src/gpgsignkeyeditinteractor.h, + lang/cpp/src/importresult.cpp, + lang/cpp/src/importresult.h, + lang/cpp/src/key.cpp, + lang/cpp/src/key.h, + lang/cpp/src/keygenerationresult.cpp, + lang/cpp/src/keygenerationresult.h, + lang/cpp/src/keylistresult.cpp, + lang/cpp/src/keylistresult.h, + lang/cpp/src/notation.h, + lang/cpp/src/result.h, + lang/cpp/src/result_p.h, + lang/cpp/src/scdgetinfoassuantransaction.cpp, + lang/cpp/src/scdgetinfoassuantransaction.h, + lang/cpp/src/signingresult.cpp, + lang/cpp/src/signingresult.h, + lang/cpp/src/trustitem.cpp, + lang/cpp/src/trustitem.h, + lang/cpp/src/util.h, + lang/cpp/src/verificationresult.cpp, + lang/cpp/src/verificationresult.h, + lang/cpp/src/vfsmountresult.cpp, + lang/cpp/src/vfsmountresult.h, + lang/cpp/src/interfaces/assuantransaction.h, + lang/cpp/src/interfaces/dataprovider.h, + lang/cpp/src/interfaces/passphraseprovider.h, + lang/cpp/src/interfaces/progressprovider.h: New. + +2016-01-15 Werner Koch + + Fix possible _SC_OPEN_MAX max problem on AIX. + * src/posix-io.c [HAVE_STDINT_H]: Include stdint.h. + (get_max_fds): Limit returned value for too high values. + +2015-12-09 Werner Koch + + w32: Avoid conflict with Mingw-w64 version 4.0.4-1. + * src/w32-util.c (mkstemp): Rename to my_mkstemp. Change caller. + +2015-12-04 Daiki Ueno + + Return on user cancellation of delete operation. + * src/delete.c (delete_status_handler): Return on ERROR status, if the + error location is set to "delete_key.secret" and the code is either + CANCELED or FULLY_CANCELED, which indicates a situation that the user + selected "No" on the confirmation dialog. + + doc: Fix minor errors. + * doc/gpgme.texi: Fix errors and typos in the cancellation and + gpgme_import_result_t documentation. + +2015-10-29 Ben Kibbey + + Make use of user passphrase handler during passwd. + * src/passwd.c (passwd_start): set engine passphrase command handler. + +2015-10-28 Werner Koch + + w32: Add extra diagnostic about possible missing gpgme-w32spawn.exe. + * src/w32-io.c (_gpgme_io_spawn): Add a new diagnostic. + + w32: Improve locating gpgconf on 64 bit systems. + * src/w32-util.c (find_program_at_standard_place): Fallback to + CSIDL_PROGRAM_FILESX86. + + w32: Add new global flag "w32-inst-dir". + * src/gpgme.c (gpgme_set_global_flag): Add flag "w32-inst-dir"; + * src/posix-util.c (_gpgme_set_override_inst_dir): New stub. + * src/w32-util.c (override_inst_dir): New var. + (_gpgme_get_inst_dir): Return this var is set. + (_gpgme_set_override_inst_dir): New. + +2015-10-16 NIIBE Yutaka + + cleanup: Fix type mismatch around gpgme_error_t. + * src/data-compat.c (gpgme_error_to_errno): Use gpg_err_code + to get error code from gpgme_error_t. + * src/gpgme.c (gpgme_new): Don't use gpgme_error. + +2015-08-31 Werner Koch + + gpgme-tool: Switch to argparse.c for option parsing. + * src/argparse.c, src/argparse.h: New. Taken from current gnupg. + * src/Makefile.am (gpgme_tool_SOURCES): New. + * src/gpgme-tool.c: Remove all argp.h stuff. + (my_strusage): New. + (main): Change to use argparse. + +2015-08-30 Werner Koch + + Add gpgme_pubkey_algo_string. + * src/gpgme.h.in (GPGME_PK_EDDSA): New. + (gpgme_pubkey_algo_string): New. + * src/conversion.c (_gpgme_map_pk_algo): Add new algo. + * src/gpgme.c (gpgme_pubkey_algo_string): New. + (gpgme_pubkey_algo_name): Reformat. + 2015-08-26 Werner Koch Release 1.6.0. @@ -135,6 +3618,18 @@ * src/engine-gpg.c (gpg_decrypt, gpg_delete, gpg_passwd): Check return value of start(). +2015-08-02 Ben McGinnes + + More GTK2 removal. + * Missed a couple of files, these 2 go for the same reason as the + previous 3. + + Removed GUI examples. + * GUI examples written with pygtk, which has not been ported to Python + 3 and won't be as it is for GTK2 and GNOME is moving to GTK3. + * New GUI examples may be required in future using any of several GUI + frameworks (e.g. wxPython, PyQt, PySide, PyGObject, etc.). + 2015-07-31 Andre Heinecke Add offline mode support for CMS keylisting. @@ -210,6 +3705,85 @@ * src/engine-gpg.c (gpg_keylist_preprocess): Increment SRC for a backslash. +2015-05-16 Ben McGinnes + + Python 3 port of PyME. + * Port of PyME 0.9.0 for Python 2 to Python 3 along with most of the + example scripts. + * Intended to be developed in parallel with the original Python 2 + version until such time as a rewrite of GPGME leads to developing an + IO API in Python 3 from scratch. + * Python 3 PyME and API maintainer has entered, stage left with current + GPG key ID 0x321E4E2373590E5D, primary fingerprint is "DB47 24E6 FA42 + 86C9 2B4E 55C4 321E 4E23 7359 0E5D" and signing subkey fingerprint is + "B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C" for future + reference with git commit signatures. + + Explaining why not all scripts work. + * Some of them cannot be properly tested on OS X, especially with GTK in + the mix (it works on OS X, but is unlikely to be as easily accessible + as Cocoa or Qt). + * Most major functions are showcased and do work, albeit sometimes with + false positives of error messages, at least on OS X. + + Byte encoding. + * More string updates. + * verifydetails.py still fails, but as Bernhard is still contactable, it + might be worth him checking on it instead. + + No change, note added to explain why. + + Strings vs. Bytes. + * CLI input must be byte encoded. + + More byte changes and passphrase changes. + * exportimport works, but will still segfault for an as yet unknown + reason. + * genkey produces a traceback error, but does create the key as + intended. + * matched passphrase in signverify. + + More bytes good. + * Another string to byte change. + + Updated encrypt-to-all. + * Changed plaintext string to byte literal. + * Nested key selection in a try/except statement in case of + UnicodeEncodeError instances. + * Tested successfully on over 9,000 keys. + + Passphrase update. + * Changed example passphrase to something that meets the current minimum + requirements. + + example email. + * changed joe@foo.bar to joe@example.org as it is only a matter of time + before ICANN actually creates bar as a gTLD, if they haven't already. + + Updated string and key data. + * Text changed to byte literals. + * Changed key type to RSA/RSA. + * Changed expiry to the future (2020). + +2015-05-08 Ben McGinnes + + String type. + * the plain text string must be bytes and not unicode. + * Expect most of the example code to have similar issues at present. + +2015-05-05 Ben McGinnes + + Python 3 port of PyME. + * The entirety of the Python 3 port of PyME up to commit + 2145348ec54c6027f2ea20f695de0277e2871405 + * The old commit log has been saved as + lang/py3-pyme/docs/old-commits.log + * Can be viewed as a normal (separate) git repository at + https://github.com/adversary-org/pyme3 + * Utilising the submodule feature of git was deliberately skipped on + humanitarian grounds (in order to prevent pain and suffering on the + part of anyone having to manage this repository). + 2015-04-13 Werner Koch Release 1.5.4. diff -Nru gpgme1.0-1.6.0/config.h.in gpgme1.0-1.8.0/config.h.in --- gpgme1.0-1.6.0/config.h.in 2015-08-26 07:54:59.000000000 +0000 +++ gpgme1.0-1.8.0/config.h.in 2016-11-16 12:29:36.000000000 +0000 @@ -27,6 +27,9 @@ /* Define if ttyname_r is does not work with small buffers */ #undef HAVE_BROKEN_TTYNAME_R +/* define if the compiler supports basic C++11 syntax */ +#undef HAVE_CXX11 + /* Define to 1 if you have the declaration of `ttyname_r', and to 0 if you don't. */ #undef HAVE_DECL_TTYNAME_R @@ -71,8 +74,8 @@ /* Define if the ttyname_r function has a POSIX compliant declaration. */ #undef HAVE_POSIXDECL_TTYNAME_R -/* Define if we have pthread. */ -#undef HAVE_PTHREAD +/* If available, contains the Python version number currently in use. */ +#undef HAVE_PYTHON /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV @@ -281,5 +284,5 @@ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 #define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \ - "Copyright (C) 2001--2015 g10 Code GmbH\n" + "Copyright (C) 2001--2016 g10 Code GmbH\n" diff -Nru gpgme1.0-1.6.0/configure gpgme1.0-1.8.0/configure --- gpgme1.0-1.6.0/configure 2015-08-26 08:06:21.000000000 +0000 +++ gpgme1.0-1.8.0/configure 2016-11-16 12:46:37.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gpgme 1.6.0. +# Generated by GNU Autoconf 2.69 for gpgme 1.8.0. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='gpgme' PACKAGE_TARNAME='gpgme' -PACKAGE_VERSION='1.6.0' -PACKAGE_STRING='gpgme 1.6.0' +PACKAGE_VERSION='1.8.0' +PACKAGE_STRING='gpgme 1.8.0' PACKAGE_BUGREPORT='http://bugs.gnupg.org' PACKAGE_URL='' @@ -639,6 +639,7 @@ emacs_local_vars_read_only emacs_local_vars_begin LTLIBOBJS +GPGME_CONFIG_AVAIL_LANG GPGME_CONFIG_HOST GPGME_CONFIG_CFLAGS GPGME_CONFIG_LIBS @@ -672,10 +673,38 @@ BUILD_TIMESTAMP BUILD_FILEVERSION BUILD_REVISION -HAVE_PTHREAD_FALSE -HAVE_PTHREAD_TRUE -BUILD_W32_QT_FALSE -BUILD_W32_QT_TRUE +ENABLED_LANGUAGES +PYTHON_VERSIONS +PYTHONS +PYTHON_EXTRA_LDFLAGS +PYTHON_EXTRA_LIBS +PYTHON_SITE_PKG +PYTHON_LDFLAGS +PYTHON_CPPFLAGS +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +SWIG_LIB +SWIG +HAVE_DOT +HAVE_DOXYGEN_FALSE +HAVE_DOXYGEN_TRUE +GRAPHVIZ +DOXYGEN +QTCHOOSER +MOC2 +MOC +GPGME_QTTEST_LIBS +GPGME_QTTEST_CFLAGS +GPGME_QT_LIBS +GPGME_QT_CFLAGS +HAVE_CXX11 BUILD_W32_GLIB_FALSE BUILD_W32_GLIB_TRUE HAVE_ANDROID_SYSTEM_FALSE @@ -688,8 +717,6 @@ HAVE_W32_SYSTEM_TRUE HAVE_DOSISH_SYSTEM_FALSE HAVE_DOSISH_SYSTEM_TRUE -QT4_CORE_LIBS -QT4_CORE_CFLAGS GLIB_MKENUMS GOBJECT_QUERY GLIB_GENMARSHAL @@ -720,7 +747,17 @@ OBJDUMP DLLTOOL AS +CC_FOR_BUILD VERSION_NUMBER +VERSION_MICRO +VERSION_MINOR +VERSION_MAJOR +LIBQGPGME_LT_REVISION +LIBQGPGME_LT_AGE +LIBQGPGME_LT_CURRENT +LIBGPGMEPP_LT_REVISION +LIBGPGMEPP_LT_AGE +LIBGPGMEPP_LT_CURRENT LIBGPGME_LT_REVISION LIBGPGME_LT_AGE LIBGPGME_LT_CURRENT @@ -843,8 +880,8 @@ enable_libtool_lock enable_glibtest enable_w32_glib -enable_w32_qt enable_fixed_path +enable_languages enable_build_timestamp enable_gpgconf_test enable_gpg_test @@ -869,7 +906,15 @@ CXX CXXFLAGS CCC -CXXCPP' +CC_FOR_BUILD +CXXCPP +PKG_CONFIG +GPGME_QT_CFLAGS +GPGME_QT_LIBS +GPGME_QTTEST_CFLAGS +GPGME_QTTEST_LIBS +PYTHON +PYTHON_VERSION' # Initialize some variables set by options. @@ -1410,7 +1455,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gpgme 1.6.0 to adapt to many kinds of systems. +\`configure' configures gpgme 1.8.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1480,7 +1525,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gpgme 1.6.0:";; + short | recursive ) echo "Configuration of gpgme 1.8.0:";; esac cat <<\_ACEOF @@ -1504,9 +1549,10 @@ --disable-libtool-lock avoid locking (might break parallel builds) --disable-glibtest do not try to compile and run a test GLIB program --enable-w32-glib build GPGME Glib for W32 - --enable-w32-qt build GPGME Qt for W32 --enable-fixed-path=PATH locate binaries only via this PATH + --enable-languages=languages + enable only specific language bindings --enable-build-timestamp set an explicit build timestamp for reproducibility. (default is the current time in ISO-8601 format) @@ -1543,7 +1589,23 @@ CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags + CC_FOR_BUILD + build system C compiler CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + GPGME_QT_CFLAGS + C compiler flags for GPGME_QT, overriding pkg-config + GPGME_QT_LIBS + linker flags for GPGME_QT, overriding pkg-config + GPGME_QTTEST_CFLAGS + C compiler flags for GPGME_QTTEST, overriding pkg-config + GPGME_QTTEST_LIBS + linker flags for GPGME_QTTEST, overriding pkg-config + PYTHON the Python interpreter + PYTHON_VERSION + The installed Python version to use, for example '2.3'. This + string will be appended to the Python interpreter canonical + name. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1611,7 +1673,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gpgme configure 1.6.0 +gpgme configure 1.8.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2441,7 +2503,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gpgme $as_me 1.6.0, which was +It was created by gpgme $as_me 1.8.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2804,17 +2866,26 @@ # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=25 -# 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=14 +LIBGPGME_LT_CURRENT=28 +LIBGPGME_LT_AGE=17 LIBGPGME_LT_REVISION=0 +# If there is an ABI break in gpgmepp or qgpgme also bump the +# version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in + +LIBGPGMEPP_LT_CURRENT=9 +LIBGPGMEPP_LT_AGE=3 +LIBGPGMEPP_LT_REVISION=0 + +LIBQGPGME_LT_CURRENT=8 +LIBQGPGME_LT_AGE=1 +LIBQGPGME_LT_REVISION=0 + # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 ############################################## -NEED_GPG_ERROR_VERSION=1.11 +NEED_GPG_ERROR_VERSION=1.17 NEED_LIBASSUAN_API=2 NEED_LIBASSUAN_VERSION=2.0.2 @@ -2822,6 +2893,10 @@ PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION +VERSION_MAJOR=1 +VERSION_MINOR=8 +VERSION_MICRO=0 + ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then @@ -3341,7 +3416,7 @@ # Define the identity of the package. PACKAGE='gpgme' - VERSION='1.6.0' + VERSION='1.8.0' cat >>confdefs.h <<_ACEOF @@ -6236,6 +6311,15 @@ + + + + + + + + + cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF @@ -6245,7 +6329,25 @@ #define VERSION "$VERSION" _ACEOF -VERSION_NUMBER=0x010600 +VERSION_NUMBER=0x010800 + + +# We need to compile and run a program on the build machine. A +# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in +# the AC archive is broken for autoconf 2.57. Given that there is no +# newer version of that macro, we assume that it is also broken for +# autoconf 2.61 and thus we use a simple but usually sufficient +# approach. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cc for build" >&5 +$as_echo_n "checking for cc for build... " >&6; } +if test "$cross_compiling" = "yes"; then + CC_FOR_BUILD="${CC_FOR_BUILD-cc}" +else + CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } + # Don't default to build static libs. @@ -17099,6 +17201,8 @@ have_w64_system=no build_w32_glib=no build_w32_qt=no +available_languages="cl cpp python python2 python3 qt" +default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) have_w64_system=yes @@ -17340,7 +17444,7 @@ $as_echo "no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." - echo "*** See http://www.freedesktop.org/software/pkgconfig/" + echo "*** See https://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : @@ -17403,67 +17507,8 @@ enableval=$enable_w32_glib; build_w32_glib=$enableval fi - - # Check disabled, because the qt-dev packages in gpg4win do - # not provide any support for cross compilation. - # PKG_CHECK_MODULES(QT4_CORE, QtCore) - - # Use it like this: - # ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..." - - - # Check whether --enable-w32-qt was given. -if test "${enable_w32_qt+set}" = set; then : - enableval=$enable_w32_qt; build_w32_qt=$enableval -fi - - ;; + ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_create (); -int -main () -{ -return pthread_create (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_create=yes -else - ac_cv_lib_pthread_pthread_create=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : - have_pthread=yes -fi - - if test "$have_pthread" = yes; then - -$as_echo "#define HAVE_PTHREAD /**/" >>confdefs.h - - fi # XXX: Probably use exec-prefix here? # GPG_DEFAULT='/usr/bin/gpg' @@ -17551,23 +17596,6 @@ BUILD_W32_GLIB_FALSE= fi - if test "$build_w32_qt" = yes; then - BUILD_W32_QT_TRUE= - BUILD_W32_QT_FALSE='#' -else - BUILD_W32_QT_TRUE='#' - BUILD_W32_QT_FALSE= -fi - - - if test "$have_pthread" = "yes"; then - HAVE_PTHREAD_TRUE= - HAVE_PTHREAD_FALSE='#' -else - HAVE_PTHREAD_TRUE='#' - HAVE_PTHREAD_FALSE= -fi - # Check whether --enable-fixed-path was given. @@ -17586,200 +17614,3167 @@ fi -# -# Provide information about the build. -# -BUILD_REVISION="107bff7" - +# Note: You need to declare all possible langauges also in +# lang/Makefile.am's DIST_SUBDIRS. +# Check whether --enable-languages was given. +if test "${enable_languages+set}" = set; then : + enableval=$enable_languages; enabled_languages=`echo $enableval | \ + tr ',:' ' ' | tr 'A-Z' 'a-z' | \ + sed 's/c++/cpp/'` +else + enabled_languages="maybe" +fi -cat >>confdefs.h <<_ACEOF -#define BUILD_REVISION "$BUILD_REVISION" -_ACEOF +if test "x$enabled_languages" = "x" \ + -o "$enabled_languages" = "no"; then + enabled_languages= +fi +# If languages are explicitly set missing requirements +# for the languages are treated as errors otherwise +# there will be a warning. +explicit_languages=1 +if test "x$enabled_languages" = "xmaybe"; then + explicit_languages=0 + enabled_languages="$default_languages" +fi -BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -BUILD_FILEVERSION="${BUILD_FILEVERSION}4219" +for language in $enabled_languages; do +name=$language +list=$available_languages +found=0 -# Check whether --enable-build-timestamp was given. -if test "${enable_build_timestamp+set}" = set; then : - enableval=$enable_build_timestamp; if test "$enableval" = "yes"; then - BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` - else - BUILD_TIMESTAMP="$enableval" - fi -else - BUILD_TIMESTAMP="" -fi +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + if test "$found" = "0"; then + as_fn_error $? "unsupported language binding specified" "$LINENO" 5 + fi +done -cat >>confdefs.h <<_ACEOF -#define BUILD_TIMESTAMP "$BUILD_TIMESTAMP" -_ACEOF +# Enable C++ 11 if cpp language is requested +name="cpp" +list=$enabled_languages +found=0 -# -# Options to disable some regression tests -# -run_gpgconf_test="yes" -# Check whether --enable-gpgconf-test was given. -if test "${enable_gpgconf_test+set}" = set; then : - enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval -fi +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done - if test "$run_gpgconf_test" = "yes"; then - RUN_GPGCONF_TESTS_TRUE= - RUN_GPGCONF_TESTS_FALSE='#' +if test "$found" = "1"; then + ax_cxx_compile_cxx11_required=false + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_success=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 +$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } +if ${ax_cv_cxx_compile_cxx11+:} false; then : + $as_echo_n "(cached) " >&6 else - RUN_GPGCONF_TESTS_TRUE='#' - RUN_GPGCONF_TESTS_FALSE= -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -run_gpg_test="yes" -# Check whether --enable-gpg-test was given. -if test "${enable_gpg_test+set}" = set; then : - enableval=$enable_gpg_test; run_gpg_test=$enableval -fi +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. - if test "$run_gpg_test" = "yes"; then - RUN_GPG_TESTS_TRUE= - RUN_GPG_TESTS_FALSE='#' -else - RUN_GPG_TESTS_TRUE='#' - RUN_GPG_TESTS_FALSE= -fi +#ifndef __cplusplus +#error "This is not a C++ compiler" -run_gpgsm_test="yes" -# Check whether --enable-gpgsm-test was given. -if test "${enable_gpgsm_test+set}" = set; then : - enableval=$enable_gpgsm_test; run_gpgsm_test=$enableval -fi +#elif __cplusplus < 201103L - if test "$run_gpgsm_test" = "yes"; then - RUN_GPGSM_TESTS_TRUE= - RUN_GPGSM_TESTS_FALSE='#' -else - RUN_GPGSM_TESTS_TRUE='#' - RUN_GPGSM_TESTS_FALSE= -fi +#error "This is not a C++11 compiler" +#else -run_g13_test="yes" -# Check whether --enable-g13-test was given. -if test "${enable_g13_test+set}" = set; then : - enableval=$enable_g13_test; run_g13_test=$enableval -fi +namespace cxx11 +{ - if test "$run_g13_test" = "yes"; then - RUN_G13_TESTS_TRUE= - RUN_G13_TESTS_FALSE='#' -else - RUN_G13_TESTS_TRUE='#' - RUN_G13_TESTS_FALSE= -fi + namespace test_static_assert + { + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + } -# Checks for header files. + namespace test_final_override + { + struct Base + { + virtual void f() {} + }; + struct Derived : public Base + { + virtual void f() override {} + }; - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + } -fi + namespace test_double_right_angle_brackets + { -done + template < typename T > + struct check {}; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + } + namespace test_decltype + { + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + } + namespace test_type_deduction + { + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + template < typename T > + struct is_same + { + static const bool value = true; + }; + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + } + namespace test_noexcept + { + int f() { return 0; } + int g() noexcept { return 0; } + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + } + namespace test_constexpr + { + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); -# Type checks. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif + } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done + namespace test_rvalue_references + { -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } + template < int N > + struct answer + { + static constexpr int value = N; + }; -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 -$as_echo_n "checking size of unsigned int... " >&6; } -if ${ac_cv_sizeof_unsigned_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } -else - if test "$ac_cv_type_unsigned_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned int) + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_cxx_compile_cxx11=yes +else + ax_cv_cxx_compile_cxx11=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 +$as_echo "$ax_cv_cxx_compile_cxx11" >&6; } + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + + + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_CXX="$CXX" + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval $cachevar=yes +else + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXX="$ac_save_CXX" +fi +eval ac_res=\$$cachevar + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + CXXCPP="$CXXCPP $switch" + ac_success=yes + break + fi + done + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 + fi + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 +$as_echo "$as_me: No compiler with C++11 support was found" >&6;} + else + HAVE_CXX11=1 + +$as_echo "#define HAVE_CXX11 1" >>confdefs.h + + fi + + + if test "$HAVE_CXX11" != "1"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** A compiler with c++11 support is required for the c++ binding. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/cpp//') + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** +*** No c++11 support detected. C++ and Qt bindings will be disabled. +***" >&5 +$as_echo "$as_me: WARNING: +*** +*** No c++11 support detected. C++ and Qt bindings will be disabled. +***" >&2;} + fi + fi +fi + +# Check that if qt is enabled cpp also is enabled + +name="qt" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +if test "$found" = "1"; then + # We need to ensure that in the langauge order qt comes after cpp + # so we remove qt first and explicitly add it as last list member. + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + +name="cpp" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + + if test "$found" = "0"; then + as_fn_error $? " +*** +*** Qt language binding depends on cpp binding. +***" "$LINENO" 5 + fi + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_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_PKG_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 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-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_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_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_PKG_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_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + + have_qt5_libs="no"; + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGME_QT" >&5 +$as_echo_n "checking for GPGME_QT... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QT_CFLAGS"; then + pkg_cv_GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QT_LIBS"; then + pkg_cv_GPGME_QT_LIBS="$GPGME_QT_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QT_LIBS=`$PKG_CONFIG --libs "Qt5Core >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GPGME_QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5Core >= 5.0.0"` + else + GPGME_QT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Core >= 5.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GPGME_QT_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_qt5_libs="no" +elif test $pkg_failed = untried; then + have_qt5_libs="no" +else + GPGME_QT_CFLAGS=$pkg_cv_GPGME_QT_CFLAGS + GPGME_QT_LIBS=$pkg_cv_GPGME_QT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_qt5_libs="yes" +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGME_QTTEST" >&5 +$as_echo_n "checking for GPGME_QTTEST... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QTTEST_CFLAGS"; then + pkg_cv_GPGME_QTTEST_CFLAGS="$GPGME_QTTEST_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Test >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Test >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QTTEST_CFLAGS=`$PKG_CONFIG --cflags "Qt5Test >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GPGME_QTTEST_LIBS"; then + pkg_cv_GPGME_QTTEST_LIBS="$GPGME_QTTEST_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Test >= 5.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "Qt5Test >= 5.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GPGME_QTTEST_LIBS=`$PKG_CONFIG --libs "Qt5Test >= 5.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GPGME_QTTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "Qt5Test >= 5.0.0"` + else + GPGME_QTTEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Test >= 5.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GPGME_QTTEST_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_qt5test_libs="no" +elif test $pkg_failed = untried; then + have_qt5test_libs="no" +else + GPGME_QTTEST_CFLAGS=$pkg_cv_GPGME_QTTEST_CFLAGS + GPGME_QTTEST_LIBS=$pkg_cv_GPGME_QTTEST_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_qt5test_libs="yes" +fi + + if ! test "$have_w32_system" = yes; then + if "$PKG_CONFIG" --variable qt_config Qt5Core | grep -q "reduce_relocations"; then + GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fpic" + fi + fi + if test "$have_qt5_libs" = "yes"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc; 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_prog_MOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MOC"; then + ac_cv_prog_MOC="$MOC" # Let the user override the test. +else +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_prog_MOC="${ac_tool_prefix}moc" + $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 + +fi +fi +MOC=$ac_cv_prog_MOC +if test -n "$MOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 +$as_echo "$MOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MOC"; then + ac_ct_MOC=$MOC + # Extract the first word of "moc", so it can be a program name with args. +set dummy moc; 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_prog_ac_ct_MOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MOC"; then + ac_cv_prog_ac_ct_MOC="$ac_ct_MOC" # Let the user override the test. +else +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_prog_ac_ct_MOC="moc" + $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 + +fi +fi +ac_ct_MOC=$ac_cv_prog_ac_ct_MOC +if test -n "$ac_ct_MOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MOC" >&5 +$as_echo "$ac_ct_MOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MOC" = x; then + MOC="" + 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 + MOC=$ac_ct_MOC + fi +else + MOC="$ac_cv_prog_MOC" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking moc version" >&5 +$as_echo_n "checking moc version... " >&6; } + mocversion=`$MOC -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # moc was not the qt5 one, try with moc-qt5 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc-qt5", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc-qt5; 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_prog_MOC2+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MOC2"; then + ac_cv_prog_MOC2="$MOC2" # Let the user override the test. +else +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_prog_MOC2="${ac_tool_prefix}moc-qt5" + $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 + +fi +fi +MOC2=$ac_cv_prog_MOC2 +if test -n "$MOC2"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC2" >&5 +$as_echo "$MOC2" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MOC2"; then + ac_ct_MOC2=$MOC2 + # Extract the first word of "moc-qt5", so it can be a program name with args. +set dummy moc-qt5; 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_prog_ac_ct_MOC2+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MOC2"; then + ac_cv_prog_ac_ct_MOC2="$ac_ct_MOC2" # Let the user override the test. +else +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_prog_ac_ct_MOC2="moc-qt5" + $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 + +fi +fi +ac_ct_MOC2=$ac_cv_prog_ac_ct_MOC2 +if test -n "$ac_ct_MOC2"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MOC2" >&5 +$as_echo "$ac_ct_MOC2" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MOC2" = x; then + MOC2="" + 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 + MOC2=$ac_ct_MOC2 + fi +else + MOC2="$ac_cv_prog_MOC2" +fi + + mocversion=`$MOC2 -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc-qt5 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}qtchooser", so it can be a program name with args. +set dummy ${ac_tool_prefix}qtchooser; 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_prog_QTCHOOSER+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$QTCHOOSER"; then + ac_cv_prog_QTCHOOSER="$QTCHOOSER" # Let the user override the test. +else +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_prog_QTCHOOSER="${ac_tool_prefix}qtchooser" + $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 + +fi +fi +QTCHOOSER=$ac_cv_prog_QTCHOOSER +if test -n "$QTCHOOSER"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5 +$as_echo "$QTCHOOSER" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_QTCHOOSER"; then + ac_ct_QTCHOOSER=$QTCHOOSER + # Extract the first word of "qtchooser", so it can be a program name with args. +set dummy qtchooser; 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_prog_ac_ct_QTCHOOSER+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_QTCHOOSER"; then + ac_cv_prog_ac_ct_QTCHOOSER="$ac_ct_QTCHOOSER" # Let the user override the test. +else +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_prog_ac_ct_QTCHOOSER="qtchooser" + $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 + +fi +fi +ac_ct_QTCHOOSER=$ac_cv_prog_ac_ct_QTCHOOSER +if test -n "$ac_ct_QTCHOOSER"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_QTCHOOSER" >&5 +$as_echo "$ac_ct_QTCHOOSER" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_QTCHOOSER" = x; then + QTCHOOSER="" + 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 + QTCHOOSER=$ac_ct_QTCHOOSER + fi +else + QTCHOOSER="$ac_cv_prog_QTCHOOSER" +fi + + qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2` + mocversion=`$qt5tooldir/moc -v 2>&1` + mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` + if test x"$mocversiongrep" != x"$mocversion"; then + # no valid moc found + have_qt5_libs="no"; + else + MOC=$qt5tooldir/moc + fi + else + MOC=$MOC2 + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mocversion" >&5 +$as_echo "$mocversion" >&6; } + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS=$GPGME_QT_CFLAGS + OLDLIBS=$LIBS + LIBS=$GPGME_QT_LIBS + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a simple qt program can be built" >&5 +$as_echo_n "checking whether a simple qt program can be built... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + int main (int argc, char **argv) { + QCoreApplication app(argc, argv); + app.exec(); + } +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + have_qt5_libs='yes' +else + have_qt5_libs='no' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_qt5_libs" >&5 +$as_echo "$have_qt5_libs" >&6; } + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CPPFLAGS=$OLDCPPFLAGS + LIBS=$OLDLIBS + fi + + if test "$have_qt5_libs" != "yes"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** Qt5 (Qt5Core) is required for Qt binding. +***" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** +*** Qt5 (Qt5Core) not found Qt Binding will be disabled. +***" >&5 +$as_echo "$as_me: WARNING: +*** +*** Qt5 (Qt5Core) not found Qt Binding will be disabled. +***" >&2;} + fi + else + enabled_languages=`echo $enabled_languages qt` + + for ac_prog in doxygen +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DOXYGEN"; then + ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test. +else +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_prog_DOXYGEN="$ac_prog" + $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 + +fi +fi +DOXYGEN=$ac_cv_prog_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DOXYGEN" && break +done + + if test -z "$DOXYGEN"; + # This is not highlighted becase it's not really important. + then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Doxygen not found - Qt binding doc will not be built." >&5 +$as_echo "$as_me: WARNING: Doxygen not found - Qt binding doc will not be built." >&2;} + fi + for ac_prog in dot +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_GRAPHVIZ+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GRAPHVIZ"; then + ac_cv_prog_GRAPHVIZ="$GRAPHVIZ" # Let the user override the test. +else +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_prog_GRAPHVIZ="$ac_prog" + $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 + +fi +fi +GRAPHVIZ=$ac_cv_prog_GRAPHVIZ +if test -n "$GRAPHVIZ"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ" >&5 +$as_echo "$GRAPHVIZ" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GRAPHVIZ" && break +done + + if test -z "$GRAPHVIZ"; + then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Graphviz not found - Qt binding doc will not have diagrams." >&5 +$as_echo "$as_me: WARNING: Graphviz not found - Qt binding doc will not have diagrams." >&2;} + fi + fi +fi + if test -n "$DOXYGEN"; then + HAVE_DOXYGEN_TRUE= + HAVE_DOXYGEN_FALSE='#' +else + HAVE_DOXYGEN_TRUE='#' + HAVE_DOXYGEN_FALSE= +fi + +if test -n "$GRAPHVIZ"; then + HAVE_DOT="YES" +else + HAVE_DOT="NO" +fi + + +# Python bindings. + +name="python2" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +found_py2=$found + +name="python3" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +found_py3=$found + +name="python" +list=$enabled_languages +found=0 + +for n in $list; do + if test "x$name" = "x$n"; then + found=1 + fi +done + +found_py=$found +if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then + + # Ubuntu has swig 2.0 as /usr/bin/swig2.0 + for ac_prog in swig swig2.0 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_SWIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # 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_SWIG="$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 +SWIG=$ac_cv_path_SWIG +if test -n "$SWIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 +$as_echo "$SWIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$SWIG" && break +done + + if test -z "$SWIG" ; then + : + elif test -n "" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5 +$as_echo_n "checking SWIG version... " >&6; } + swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 +$as_echo "$swig_version" >&6; } + if test -n "$swig_version" ; then + # Calculate the required version number components + required= + required_major=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_major" ; then + required_major=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_minor=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_minor" ; then + required_minor=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_patch=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_patch" ; then + required_patch=0 + fi + # Calculate the available version number components + available=$swig_version + available_major=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_major" ; then + available_major=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_minor=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_minor" ; then + available_minor=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_patch=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_patch" ; then + available_patch=0 + fi + # Convert the version tuple into a single number for easier comparison. + # Using base 100 should be safe since SWIG internally uses BCD values + # to encode its version number. + required_swig_vernum=`expr $required_major \* 10000 \ + \+ $required_minor \* 100 \+ $required_patch` + available_swig_vernum=`expr $available_major \* 10000 \ + \+ $available_minor \* 100 \+ $available_patch` + + if test $available_swig_vernum -lt $required_swig_vernum; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version." >&5 +$as_echo "$as_me: WARNING: SWIG version >= is required. You have $swig_version." >&2;} + SWIG='' + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5 +$as_echo_n "checking for SWIG library... " >&6; } + SWIG_LIB=`$SWIG -swiglib` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5 +$as_echo "$SWIG_LIB" >&6; } + + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 +$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;} + SWIG='' + + fi + fi + + + if test -z "$SWIG"; then + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** You need SWIG to build the Python bindings. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + else + # Reset all the stuff, just to be sure. + PYTHONS= + PYTHON_VERSIONS= + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + if test "$found_py" = "1" -o "$found_py2" = "1"; then + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.7... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.7" >&5 +$as_echo_n "checking for a Python interpreter with version >= 2.7... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; 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_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; 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_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF + + + # First, the library directory: + ac_python_libdir=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + fi + + if test "$found_py" = "1" -o "$found_py3" = "1"; then + # Reset everything, so that we can look for another Python. + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + + + + + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.4" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3.4... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.4'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.4" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3.4... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.4'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; 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_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + + + if test "$PYTHON" = :; then + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + + # + # Allow the use of a (user set) custom python version + # + + + # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. +set dummy python$PYTHON_VERSION; 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_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$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 +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON"; then + as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for a version of Python >= 2.1.0 + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver >= '2.1.0')"` + if test "$ac_supports_python_ver" != "True"; then + if test -z "$PYTHON_NOVERSIONCHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? " +This version of the AC_PYTHON_DEVEL macro +doesn't work properly with versions of Python before +2.1.0. You may need to re-run configure, setting the +variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. +Moreover, to disable this check, set PYTHON_NOVERSIONCHECK +to something else than an empty string. + +See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + # + # if the macro parameter ``version'' is set, honour it + # + if test -n ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5 +$as_echo_n "checking for a version of Python ... " >&6; } + ac_supports_python_ver=`$PYTHON -c "import sys; \ + ver = sys.version.split ()[0]; \ + print (ver )"` + if test "$ac_supports_python_ver" = "True"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "this package requires Python . +If you have it installed, but it isn't the default Python +interpreter in your system path, please pass the PYTHON_VERSION +variable to configure. See \`\`configure --help'' for reference. +" "$LINENO" 5 + PYTHON_VERSION="" + fi + fi + + # + # Check if you have distutils, else fail + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + if test -z "$ac_distutils_result"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot import Python module \"distutils\". +Please check your Python installation. The error was: +$ac_distutils_result" "$LINENO" 5 + PYTHON_VERSION="" + fi + + # + # Check for Python include path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } + if test -z "$PYTHON_CPPFLAGS"; then + python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test -n "${python_path}"; then + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi + fi + PYTHON_CPPFLAGS=$python_path + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } + + + # + # Check for Python library path + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } + if test -z "$PYTHON_LDFLAGS"; then + # (makes two attempts to ensure we've got a version number + # from the interpreter) + ac_python_version=`cat<>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF + + + # First, the library directory: + ac_python_libdir=`cat<&5 +$as_echo "$PYTHON_LDFLAGS" >&6; } + + + # + # Check for site packages + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } + if test -z "$PYTHON_SITE_PKG"; then + PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_lib(0,0));"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } + + + # + # libraries which must be linked in when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } + if test -z "$PYTHON_EXTRA_LIBS"; then + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } + + + # + # linking flags needed when embedding + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } + if test -z "$PYTHON_EXTRA_LDFLAGS"; then + PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print (conf('LINKFORSHARED'))"` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } + + + # + # final check to see if everything compiles alright + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } + # save current global flags + ac_save_LIBS="$LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ +Py_Initialize(); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pythonexists=yes +else + pythonexists=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # turn back to default flags + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } + + if test ! "x$pythonexists" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&5 +$as_echo "$as_me: WARNING: + Could not link test program to Python. Maybe the main Python library has been + installed in some non-standard library path. If so, pass it to configure, + via the LDFLAGS environment variable. + Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" + ============================================================================ + You probably have to install the development version of the Python package + for your distribution. The exact name of this package varies among them. + ============================================================================ + " >&2;} + PYTHON_VERSION="" + fi + + # + # all done! + # + + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + fi + + if test "$PYTHON_VERSIONS"; then + enabled_languages_v=$(echo $enabled_languages | sed "s/python\([23]\)\?/python ($PYTHON_VERSIONS)/") + enabled_languages=$(echo $enabled_languages | sed "s/python\([23]\)\?/python/") + else + if test "$explicit_languages" = "1"; then + as_fn_error $? " +*** +*** Please install the python development packages. +***" "$LINENO" 5 + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + fi + + PYTHONS=$PYTHONS + + PYTHON_VERSIONS=$PYTHON_VERSIONS + + fi +fi + +ENABLED_LANGUAGES=$enabled_languages + + +# +# Provide information about the build. +# +BUILD_REVISION="f06220b" + + +cat >>confdefs.h <<_ACEOF +#define BUILD_REVISION "$BUILD_REVISION" +_ACEOF + + +BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` +BUILD_FILEVERSION="${BUILD_FILEVERSION}61538" + + +# Check whether --enable-build-timestamp was given. +if test "${enable_build_timestamp+set}" = set; then : + enableval=$enable_build_timestamp; if test "$enableval" = "yes"; then + BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` + else + BUILD_TIMESTAMP="$enableval" + fi +else + BUILD_TIMESTAMP="" +fi + + + +cat >>confdefs.h <<_ACEOF +#define BUILD_TIMESTAMP "$BUILD_TIMESTAMP" +_ACEOF + + + +# +# Options to disable some regression tests +# +run_gpgconf_test="yes" +# Check whether --enable-gpgconf-test was given. +if test "${enable_gpgconf_test+set}" = set; then : + enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval +fi + + if test "$run_gpgconf_test" = "yes"; then + RUN_GPGCONF_TESTS_TRUE= + RUN_GPGCONF_TESTS_FALSE='#' +else + RUN_GPGCONF_TESTS_TRUE='#' + RUN_GPGCONF_TESTS_FALSE= +fi + + +run_gpg_test="yes" +# Check whether --enable-gpg-test was given. +if test "${enable_gpg_test+set}" = set; then : + enableval=$enable_gpg_test; run_gpg_test=$enableval +fi + + if test "$run_gpg_test" = "yes"; then + RUN_GPG_TESTS_TRUE= + RUN_GPG_TESTS_FALSE='#' +else + RUN_GPG_TESTS_TRUE='#' + RUN_GPG_TESTS_FALSE= +fi + + +run_gpgsm_test="yes" +# Check whether --enable-gpgsm-test was given. +if test "${enable_gpgsm_test+set}" = set; then : + enableval=$enable_gpgsm_test; run_gpgsm_test=$enableval +fi + + if test "$run_gpgsm_test" = "yes"; then + RUN_GPGSM_TESTS_TRUE= + RUN_GPGSM_TESTS_FALSE='#' +else + RUN_GPGSM_TESTS_TRUE='#' + RUN_GPGSM_TESTS_FALSE= +fi + + +run_g13_test="yes" +# Check whether --enable-g13-test was given. +if test "${enable_g13_test+set}" = set; then : + enableval=$enable_g13_test; run_g13_test=$enableval +fi + + if test "$run_g13_test" = "yes"; then + RUN_G13_TESTS_TRUE= + RUN_G13_TESTS_FALSE='#' +else + RUN_G13_TESTS_TRUE='#' + RUN_G13_TESTS_FALSE= +fi + + + +# Checks for header files. + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + +# Type checks. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 +$as_echo_n "checking size of unsigned int... " >&6; } +if ${ac_cv_sizeof_unsigned_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_unsigned_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_int=0 @@ -18090,6 +21085,72 @@ # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" + if test "$USE_MAINTAINER_MODE" = "yes"; then + CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" + + # If -Wno-missing-field-initializers is supported we can enable a + # a bunch of really useful warnings. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wno-missing-field-initializers" >&5 +$as_echo_n "checking if gcc supports -Wno-missing-field-initializers... " >&6; } + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + _gcc_wopt=yes +else + _gcc_wopt=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_gcc_wopt" >&5 +$as_echo "$_gcc_wopt" >&6; } + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" + CFLAGS="$CFLAGS -Wwrite-strings" + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + CFLAGS="$CFLAGS -Wno-sign-compare" + fi + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc supports -Wpointer-arith" >&5 +$as_echo_n "checking if gcc supports -Wpointer-arith... " >&6; } + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wpointer-arith" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + _gcc_wopt=yes +else + _gcc_wopt=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_gcc_wopt" >&5 +$as_echo "$_gcc_wopt" >&6; } + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wpointer-arith" + fi + fi if test "$have_w32_system" = yes; then CFLAGS="$CFLAGS -mms-bitfields" fi @@ -19163,6 +22224,8 @@ GPGME_CONFIG_LIBS="-lgpgme" GPGME_CONFIG_CFLAGS="" GPGME_CONFIG_HOST="$host" +GPGME_CONFIG_AVAIL_LANG="$enabled_languages" + @@ -19200,7 +22263,6 @@ emacs_local_vars_end='End:' - # Last check. die=no if test "$have_gpg_error" = "no"; then @@ -19254,8 +22316,40 @@ ac_config_files="$ac_config_files src/gpgme-config" +ac_config_files="$ac_config_files lang/cpp/Makefile lang/cpp/src/Makefile" + +ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfig-w32.cmake.in" + +ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfig.cmake.in" + +ac_config_files="$ac_config_files lang/cpp/src/GpgmeppConfigVersion.cmake" + +ac_config_files="$ac_config_files lang/cpp/src/gpgmepp_version.h" + +ac_config_files="$ac_config_files lang/qt/Makefile lang/qt/src/Makefile" + +ac_config_files="$ac_config_files lang/qt/src/QGpgmeConfig-w32.cmake.in" + +ac_config_files="$ac_config_files lang/qt/src/QGpgmeConfig.cmake.in" + +ac_config_files="$ac_config_files lang/qt/src/QGpgmeConfigVersion.cmake" + +ac_config_files="$ac_config_files lang/qt/tests/Makefile" + +ac_config_files="$ac_config_files lang/qt/src/qgpgme_version.h" + ac_config_files="$ac_config_files lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd" +if test -z "$HAVE_DOXYGEN_TRUE"; then : + ac_config_files="$ac_config_files lang/qt/doc/Doxyfile" + +fi +ac_config_files="$ac_config_files lang/qt/doc/Makefile" + +ac_config_files="$ac_config_files lang/python/Makefile lang/python/gpg/version.py lang/python/tests/Makefile" + +ac_config_files="$ac_config_files lang/python/setup.py" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -19429,12 +22523,8 @@ as_fn_error $? "conditional \"BUILD_W32_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_W32_QT_TRUE}" && test -z "${BUILD_W32_QT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_W32_QT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PTHREAD_TRUE}" && test -z "${HAVE_PTHREAD_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PTHREAD\" was never defined. +if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RUN_GPGCONF_TESTS_TRUE}" && test -z "${RUN_GPGCONF_TESTS_FALSE}"; then @@ -19858,7 +22948,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gpgme $as_me 1.6.0, which was +This file was extended by gpgme $as_me 1.8.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19924,7 +23014,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gpgme config.status 1.6.0 +gpgme config.status 1.8.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20529,9 +23619,28 @@ "src/versioninfo.rc") CONFIG_FILES="$CONFIG_FILES src/versioninfo.rc" ;; "src/gpgme.h") CONFIG_FILES="$CONFIG_FILES src/gpgme.h" ;; "src/gpgme-config") CONFIG_FILES="$CONFIG_FILES src/gpgme-config" ;; + "lang/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cpp/Makefile" ;; + "lang/cpp/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/Makefile" ;; + "lang/cpp/src/GpgmeppConfig-w32.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfig-w32.cmake.in" ;; + "lang/cpp/src/GpgmeppConfig.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfig.cmake.in" ;; + "lang/cpp/src/GpgmeppConfigVersion.cmake") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/GpgmeppConfigVersion.cmake" ;; + "lang/cpp/src/gpgmepp_version.h") CONFIG_FILES="$CONFIG_FILES lang/cpp/src/gpgmepp_version.h" ;; + "lang/qt/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/Makefile" ;; + "lang/qt/src/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/src/Makefile" ;; + "lang/qt/src/QGpgmeConfig-w32.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/qt/src/QGpgmeConfig-w32.cmake.in" ;; + "lang/qt/src/QGpgmeConfig.cmake.in") CONFIG_FILES="$CONFIG_FILES lang/qt/src/QGpgmeConfig.cmake.in" ;; + "lang/qt/src/QGpgmeConfigVersion.cmake") CONFIG_FILES="$CONFIG_FILES lang/qt/src/QGpgmeConfigVersion.cmake" ;; + "lang/qt/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/tests/Makefile" ;; + "lang/qt/src/qgpgme_version.h") CONFIG_FILES="$CONFIG_FILES lang/qt/src/qgpgme_version.h" ;; "lang/Makefile") CONFIG_FILES="$CONFIG_FILES lang/Makefile" ;; "lang/cl/Makefile") CONFIG_FILES="$CONFIG_FILES lang/cl/Makefile" ;; "lang/cl/gpgme.asd") CONFIG_FILES="$CONFIG_FILES lang/cl/gpgme.asd" ;; + "lang/qt/doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES lang/qt/doc/Doxyfile" ;; + "lang/qt/doc/Makefile") CONFIG_FILES="$CONFIG_FILES lang/qt/doc/Makefile" ;; + "lang/python/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/Makefile" ;; + "lang/python/gpg/version.py") CONFIG_FILES="$CONFIG_FILES lang/python/gpg/version.py" ;; + "lang/python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lang/python/tests/Makefile" ;; + "lang/python/setup.py") CONFIG_FILES="$CONFIG_FILES lang/python/setup.py" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -21264,7 +24373,7 @@ # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# can be downloaded from https://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -22174,6 +25283,7 @@ ;; "src/gpgme-config":F) chmod +x src/gpgme-config ;; + "lang/python/setup.py":F) chmod a+x lang/python/setup.py ;; esac done # for ac_tag @@ -22216,12 +25326,13 @@ echo " GPGME v${VERSION} has been configured as follows: - Revision: 107bff7 (4219) - Platform: $host + Revision: f06220b (61538) + Platform: $host + + UI Server: $uiserver + FD Passing: $use_descriptor_passing - UI Server: $uiserver - FD Passing: $use_descriptor_passing - GPGME Pthread: $have_pthread + Language bindings: ${enabled_languages_v:-$enabled_languages} " if test "x${gpg_config_script_warn}" != x; then cat <. +# along with this program; if not, see . # (Process this file with autoconf to produce a configure script.) AC_PREREQ(2.59) @@ -28,7 +28,7 @@ # commit and push so that the git magic is able to work. See below # for the LT versions. m4_define(mym4_version_major, [1]) -m4_define(mym4_version_minor, [6]) +m4_define(mym4_version_minor, [8]) m4_define(mym4_version_micro, [0]) # Below is m4 magic to extract and compute the revision number, the @@ -55,17 +55,26 @@ # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=25 -# 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=14 +LIBGPGME_LT_CURRENT=28 +LIBGPGME_LT_AGE=17 LIBGPGME_LT_REVISION=0 +# If there is an ABI break in gpgmepp or qgpgme also bump the +# version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in + +LIBGPGMEPP_LT_CURRENT=9 +LIBGPGMEPP_LT_AGE=3 +LIBGPGMEPP_LT_REVISION=0 + +LIBQGPGME_LT_CURRENT=8 +LIBQGPGME_LT_AGE=1 +LIBQGPGME_LT_REVISION=0 + # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 ############################################## -NEED_GPG_ERROR_VERSION=1.11 +NEED_GPG_ERROR_VERSION=1.17 NEED_LIBASSUAN_API=2 NEED_LIBASSUAN_VERSION=2.0.2 @@ -73,6 +82,10 @@ PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION +VERSION_MAJOR=mym4_version_major +VERSION_MINOR=mym4_version_minor +VERSION_MICRO=mym4_version_micro + AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/gpgme.h.in) @@ -104,15 +117,40 @@ AC_SUBST(LIBGPGME_LT_CURRENT) AC_SUBST(LIBGPGME_LT_AGE) AC_SUBST(LIBGPGME_LT_REVISION) +AC_SUBST(LIBGPGMEPP_LT_CURRENT) +AC_SUBST(LIBGPGMEPP_LT_AGE) +AC_SUBST(LIBGPGMEPP_LT_REVISION) +AC_SUBST(LIBQGPGME_LT_CURRENT) +AC_SUBST(LIBQGPGME_LT_AGE) +AC_SUBST(LIBQGPGME_LT_REVISION) AC_SUBST(PACKAGE) AC_SUBST(VERSION) +AC_SUBST(VERSION_MAJOR) +AC_SUBST(VERSION_MINOR) +AC_SUBST(VERSION_MICRO) AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \ mym4_version_minor mym4_version_micro) AC_SUBST(VERSION_NUMBER) +# We need to compile and run a program on the build machine. A +# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in +# the AC archive is broken for autoconf 2.57. Given that there is no +# newer version of that macro, we assume that it is also broken for +# autoconf 2.61 and thus we use a simple but usually sufficient +# approach. +AC_MSG_CHECKING(for cc for build) +if test "$cross_compiling" = "yes"; then + CC_FOR_BUILD="${CC_FOR_BUILD-cc}" +else + CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" +fi +AC_MSG_RESULT($CC_FOR_BUILD) +AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) + + # Don't default to build static libs. LT_PREREQ([2.2.6]) LT_INIT([win32-dll disable-static]) @@ -146,6 +184,8 @@ have_w64_system=no build_w32_glib=no build_w32_qt=no +available_languages="cl cpp python python2 python3 qt" +default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) have_w64_system=yes @@ -171,24 +211,8 @@ AC_ARG_ENABLE(w32-glib, AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]), build_w32_glib=$enableval) - - # Check disabled, because the qt-dev packages in gpg4win do - # not provide any support for cross compilation. - # PKG_CHECK_MODULES(QT4_CORE, QtCore) - - # Use it like this: - # ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..." - AC_SUBST(QT4_CORE_CFLAGS) - AC_SUBST(QT4_CORE_LIBS) - AC_ARG_ENABLE(w32-qt, - AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]), - build_w32_qt=$enableval) - ;; + ;; *) - AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes) - if test "$have_pthread" = yes; then - AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) - fi # XXX: Probably use exec-prefix here? # GPG_DEFAULT='/usr/bin/gpg' @@ -230,9 +254,6 @@ AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes) AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes) -AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes) - -AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes") AC_ARG_ENABLE([fixed-path], @@ -246,6 +267,197 @@ fi +# Note: You need to declare all possible langauges also in +# lang/Makefile.am's DIST_SUBDIRS. +AC_ARG_ENABLE([languages], + AC_HELP_STRING([--enable-languages=languages], + [enable only specific language bindings]), + [enabled_languages=`echo $enableval | \ + tr ',:' ' ' | tr '[A-Z]' '[a-z]' | \ + sed 's/c++/cpp/'`], + [enabled_languages="maybe"]) +if test "x$enabled_languages" = "x" \ + -o "$enabled_languages" = "no"; then + enabled_languages= +fi + +# If languages are explicitly set missing requirements +# for the languages are treated as errors otherwise +# there will be a warning. +explicit_languages=1 +if test "x$enabled_languages" = "xmaybe"; then + explicit_languages=0 + enabled_languages="$default_languages" +fi + +for language in $enabled_languages; do + LIST_MEMBER($language, $available_languages) + if test "$found" = "0"; then + AC_MSG_ERROR([unsupported language binding specified]) + fi +done + + + +# Enable C++ 11 if cpp language is requested +LIST_MEMBER("cpp", $enabled_languages) +if test "$found" = "1"; then + AX_CXX_COMPILE_STDCXX(11, noext, optional) + if test "$HAVE_CXX11" != "1"; then + if test "$explicit_languages" = "1"; then + AC_MSG_ERROR([[ +*** +*** A compiler with c++11 support is required for the c++ binding. +***]]) + else + enabled_languages=$(echo $enabled_languages | sed 's/cpp//') + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + AC_MSG_WARN([[ +*** +*** No c++11 support detected. C++ and Qt bindings will be disabled. +***]]) + fi + fi +fi + +# Check that if qt is enabled cpp also is enabled +LIST_MEMBER("qt", $enabled_languages) +if test "$found" = "1"; then + # We need to ensure that in the langauge order qt comes after cpp + # so we remove qt first and explicitly add it as last list member. + enabled_languages=$(echo $enabled_languages | sed 's/qt//') + LIST_MEMBER("cpp", $enabled_languages) + if test "$found" = "0"; then + AC_MSG_ERROR([[ +*** +*** Qt language binding depends on cpp binding. +***]]) + fi + FIND_QT + if test "$have_qt5_libs" != "yes"; then + if test "$explicit_languages" = "1"; then + AC_MSG_ERROR([[ +*** +*** Qt5 (Qt5Core) is required for Qt binding. +***]]) + else + AC_MSG_WARN([[ +*** +*** Qt5 (Qt5Core) not found Qt Binding will be disabled. +***]]) + fi + else + enabled_languages=`echo $enabled_languages qt` + + AC_CHECK_PROGS([DOXYGEN], [doxygen]) + if test -z "$DOXYGEN"; + # This is not highlighted becase it's not really important. + then AC_MSG_WARN([Doxygen not found - Qt binding doc will not be built.]) + fi + AC_CHECK_PROGS([GRAPHVIZ], [dot]) + if test -z "$GRAPHVIZ"; + then AC_MSG_WARN([Graphviz not found - Qt binding doc will not have diagrams.]) + fi + fi +fi +AM_CONDITIONAL([HAVE_DOXYGEN], + [test -n "$DOXYGEN"]) +if test -n "$GRAPHVIZ"; then + HAVE_DOT="YES" +else + HAVE_DOT="NO" +fi +AC_SUBST(HAVE_DOT) + +# Python bindings. +LIST_MEMBER("python2", $enabled_languages) +found_py2=$found +LIST_MEMBER("python3", $enabled_languages) +found_py3=$found +LIST_MEMBER("python", $enabled_languages) +found_py=$found +if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then + AX_PKG_SWIG + if test -z "$SWIG"; then + if test "$explicit_languages" = "1"; then + AC_MSG_ERROR([[ +*** +*** You need SWIG to build the Python bindings. +***]]) + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + else + # Reset all the stuff, just to be sure. + PYTHONS= + PYTHON_VERSIONS= + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + + if test "$found_py" = "1" -o "$found_py2" = "1"; then + AM_PATH_PYTHON([2.7]) + AX_PYTHON_DEVEL + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + fi + + if test "$found_py" = "1" -o "$found_py3" = "1"; then + # Reset everything, so that we can look for another Python. + unset PYTHON + unset PYTHON_VERSION + unset PYTHON_CPPFLAGS + unset PYTHON_LDFLAGS + unset PYTHON_SITE_PKG + unset PYTHON_EXTRA_LIBS + unset PYTHON_EXTRA_LDFLAGS + unset ac_cv_path_PYTHON + unset am_cv_pathless_PYTHON + unset am_cv_python_version + unset am_cv_python_platform + unset am_cv_python_pythondir + unset am_cv_python_pyexecdir + AM_PATH_PYTHON([3.4]) + AX_PYTHON_DEVEL + if test "$PYTHON_VERSION"; then + PYTHONS="$(echo $PYTHONS $PYTHON)" + PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" + fi + fi + + if test "$PYTHON_VERSIONS"; then + enabled_languages_v=$(echo $enabled_languages | sed "s/python\([[23]]\)\?/python ($PYTHON_VERSIONS)/") + enabled_languages=$(echo $enabled_languages | sed "s/python\([[23]]\)\?/python/") + else + if test "$explicit_languages" = "1"; then + AC_MSG_ERROR([[ +*** +*** Please install the python development packages. +***]]) + else + enabled_languages=$(echo $enabled_languages | sed 's/python//') + fi + fi + + AC_SUBST(PYTHONS, $PYTHONS) + AC_SUBST(PYTHON_VERSIONS, $PYTHON_VERSIONS) + fi +fi + +AC_SUBST(ENABLED_LANGUAGES, $enabled_languages) + # # Provide information about the build. # @@ -359,6 +571,36 @@ # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" + if test "$USE_MAINTAINER_MODE" = "yes"; then + CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" + + # If -Wno-missing-field-initializers is supported we can enable a + # a bunch of really useful warnings. + AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-missing-field-initializers" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast" + CFLAGS="$CFLAGS -Wwrite-strings" + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + CFLAGS="$CFLAGS -Wno-sign-compare" + fi + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow" + + AC_MSG_CHECKING([if gcc supports -Wpointer-arith]) + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wpointer-arith" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wpointer-arith" + fi + fi if test "$have_w32_system" = yes; then CFLAGS="$CFLAGS -mms-bitfields" fi @@ -556,7 +798,7 @@ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 #define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \ - "Copyright (C) 2001--2015 g10 Code GmbH\n" + "Copyright (C) 2001--2016 g10 Code GmbH\n" ]) @@ -564,10 +806,12 @@ GPGME_CONFIG_LIBS="-lgpgme" GPGME_CONFIG_CFLAGS="" GPGME_CONFIG_HOST="$host" +GPGME_CONFIG_AVAIL_LANG="$enabled_languages" AC_SUBST(GPGME_CONFIG_API_VERSION) AC_SUBST(GPGME_CONFIG_LIBS) AC_SUBST(GPGME_CONFIG_CFLAGS) AC_SUBST(GPGME_CONFIG_HOST) +AC_SUBST(GPGME_CONFIG_AVAIL_LANG) # Frob'da Variables LTLIBOBJS=`echo "$LIB@&t@OBJS" | @@ -587,7 +831,6 @@ AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t']) AC_SUBST(emacs_local_vars_end, ['End:']) - # Last check. die=no if test "$have_gpg_error" = "no"; then @@ -632,18 +875,36 @@ src/versioninfo.rc src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) +AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) +AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) +AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) +AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake) +AC_CONFIG_FILES(lang/cpp/src/gpgmepp_version.h) +AC_CONFIG_FILES(lang/qt/Makefile lang/qt/src/Makefile) +AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig-w32.cmake.in) +AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig.cmake.in) +AC_CONFIG_FILES(lang/qt/src/QGpgmeConfigVersion.cmake) +AC_CONFIG_FILES(lang/qt/tests/Makefile) +AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) +AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])]) +AC_CONFIG_FILES(lang/qt/doc/Makefile) +AC_CONFIG_FILES([lang/python/Makefile + lang/python/gpg/version.py + lang/python/tests/Makefile]) +AC_CONFIG_FILES([lang/python/setup.py], [chmod a+x lang/python/setup.py]) AC_OUTPUT echo " GPGME v${VERSION} has been configured as follows: - Revision: mym4_revision (mym4_revision_dec) - Platform: $host + Revision: mym4_revision (mym4_revision_dec) + Platform: $host + + UI Server: $uiserver + FD Passing: $use_descriptor_passing - UI Server: $uiserver - FD Passing: $use_descriptor_passing - GPGME Pthread: $have_pthread + Language bindings: ${enabled_languages_v:-$enabled_languages} " if test "x${gpg_config_script_warn}" != x; then cat < Thu, 04 May 2017 23:12:14 +0200 + +gpgme1.0 (1.8.0-3ubuntu2) zesty; urgency=medium + + * Add in libgpgme-dev a libgpgme-pthread.so pointing to libgpgme.so, this + will fix the build failures of kf5-kdepim-apps-libs when built against this + gpgme package. + * Set LDFLAGS=-Wl,-z,relro in debian/rules, this avoids passing + "-Bsymbolic-functions" which seems to be the cause of FTBFS'es for some + architectures. + * Add 0005-tests-Reduce-iterations-threads.patch, this fixes another cause of + FTBFS'es on some architectures. + * Previous two changes fix (LP: #1647204) + * Thank you to Rik Mills for his help fixing the above problems. + + -- José Manuel Santamaría Lema Sat, 18 Feb 2017 22:22:02 +0100 + +gpgme1.0 (1.8.0-3ubuntu1) zesty; urgency=medium + + [ José Manuel Santamaría Lema ] + * Pass '-fPIC' to gcc, otherwise this package will fail to build on Ubuntu + with this error: + /usr/include/*/qt5/QtCore/qglobal.h:1087:4: error: + #error "You must build your code with position independent code if Qt was + built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is + not enough)." + + [ Rik Mills ] + * Apply upstream patch to fix build hang on launchpad-buildd and speed up + tests on low entropy systems. (LP: #1647204) + + [ Andre Hinecke ] + * Apply another upstream patch to fix build hang on launchpad-buildd if + gpg is gpg2. + + [ Barry Warsaw ] + * d/control: update-maintainer + + -- Rik Mills Mon, 30 Jan 2017 09:08:10 +0000 + +gpgme1.0 (1.8.0-3) unstable; urgency=medium + + * Reduce priority of most packages (closes: #845803) + * added versioned Provides for libgpgme11-dev to ease transition + + -- Daniel Kahn Gillmor Tue, 06 Dec 2016 10:28:24 -0500 + +gpgme1.0 (1.8.0-2) unstable; urgency=medium + + * pull a cleanup patch from upstream + * move to unstable + + -- Daniel Kahn Gillmor Wed, 23 Nov 2016 01:39:59 -0500 + +gpgme1.0 (1.8.0-1) experimental; urgency=medium + + * new upstream release + - drops gpgme-pthread variant (we replace .so with symlink) + - moves python binding name from "pyme" to "gpg" + * no need for pasv in debian/watch + * filter another auto-generated file at import-orig + * re-enable pie, it is needed to build Qt properly now + * avoid installing python bytecode and unnecessary package metadata + * update build-dep gpg-error version requirements to track configure.ac + * add new symbols + * drop C++ and QT .symbols files, do only strict versioning. + + -- Daniel Kahn Gillmor Fri, 18 Nov 2016 19:15:37 -0500 + +gpgme1.0 (1.7.1-3) experimental; urgency=medium + + [ Sandro Knauß ] + * Add pkgkde-symbolshelper to handle c++ bindings + * consolidate main dh rule + + [ Daniel Kahn Gillmor ] + * libgpgmepp-dev Breaks+Replaces: kdepimlibs5 (Closes: #842061) + * convert C++ symbols files to something readable + + -- Daniel Kahn Gillmor Tue, 01 Nov 2016 04:24:29 -0400 + +gpgme1.0 (1.7.1-2) experimental; urgency=medium + + * more general cleanup of upstream tarball in debian/gbp.conf + * ensure that source version makes it through to python-pyme-dbgsym + + -- Daniel Kahn Gillmor Tue, 25 Oct 2016 12:21:41 -0400 + +gpgme1.0 (1.7.1-1) experimental; urgency=medium + + * new upstream release. + - change from libqgpgme6 to libqgpgme7 + + -- Daniel Kahn Gillmor Thu, 20 Oct 2016 00:06:13 -0400 + +gpgme1.0 (1.7.0-5) experimental; urgency=medium + + * apply debian patches ahead of upstream patches. + * more fixes from upstream for 32-bit platforms + + -- Daniel Kahn Gillmor Fri, 14 Oct 2016 21:36:25 -0400 + +gpgme1.0 (1.7.0-4) experimental; urgency=medium + + * avoid failures on 32-bit platforms (along with more + upsteam python fixes) + * avoid shipping unready pdf documentation + * ensure that python-pyme-dbgsym has the right versioning + + -- Daniel Kahn Gillmor Fri, 14 Oct 2016 16:28:30 -0400 + +gpgme1.0 (1.7.0-3) experimental; urgency=medium + + * improve dependencies for libgpgmepp-dev package + * fix Vcs-Browser link + * fix debian/watch + * Add an epoch to python-pyme + * ship documentation as well in an arch:all package + * avoid irreproducible documentation + + -- Daniel Kahn Gillmor Wed, 12 Oct 2016 18:46:16 -0400 + +gpgme1.0 (1.7.0-2) experimental; urgency=medium + + [ Daniel Kahn Gillmor ] + * avoid -pie since it conflicts with -fpic when building + * add python3-pyme and python-pyme binary packages + * clean up autogenerated files + * bump to debhelper 10 + * rename binary package from libgpgme11-dev to libgpgme-dev + + [ Sandro Knauß ] + * Enable cpp and qt lang support + + [ Daniel Kahn Gillmor ] + * avoid lintian warnings about executable cmake files + * prepare new libgpgmepp-dev package + + -- Daniel Kahn Gillmor Wed, 12 Oct 2016 07:28:59 -0400 + +gpgme1.0 (1.7.0-1) unstable; urgency=medium + + * new upstream release + - avoid building language bindings until we have C available + - add new symbols + * use https for debian/watch + * hand-write gpg-tool(1) rather than relying on help2man + * improvements in gpgme-config(1) + * updated debian/copyright to DEP5 + * use hardening flags + + -- Daniel Kahn Gillmor Thu, 22 Sep 2016 17:18:21 -0400 + +gpgme1.0 (1.6.0-3) unstable; urgency=medium + + * change order of gnupg2 | gnupg (>= 2) build-dep so that sbuild is OK + (while gnupg (>= 2) is still only in experimental). + + -- Daniel Kahn Gillmor Wed, 20 Apr 2016 08:36:10 -0400 + +gpgme1.0 (1.6.0-2) unstable; urgency=medium + + * updated debian/watch to version 4 + * depend on gnupg from version 2 or later, instead of gnupg2 + * bumped Standards-Version to 3.9.8 (no changes needed) + * updated Vcs-* fields + + -- Daniel Kahn Gillmor Tue, 19 Apr 2016 17:34:59 -0400 + gpgme1.0 (1.6.0-1) unstable; urgency=medium * New upstream release. diff -Nru gpgme1.0-1.6.0/debian/clean gpgme1.0-1.8.0/debian/clean --- gpgme1.0-1.6.0/debian/clean 2015-07-08 17:17:59.000000000 +0000 +++ gpgme1.0-1.8.0/debian/clean 2017-02-18 21:22:02.000000000 +0000 @@ -1,4 +1,14 @@ +aclocal.m4 +config.h.in +configure +doc/gpgme.info* +lang/python/tests/__pycache__/ +lang/python/tests/S.* +lang/python/tests/support.pyc +*/*/*/Makefile.in +*/*/Makefile.in +*/Makefile.in +Makefile.in tests/gpg/*.gpg tests/gpg/S.gpg-agent tests/gpgsm/S.gpg-agent -debian/gpgme-tool.1 diff -Nru gpgme1.0-1.6.0/debian/compat gpgme1.0-1.8.0/debian/compat --- gpgme1.0-1.6.0/debian/compat 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/compat 2017-02-18 21:22:02.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru gpgme1.0-1.6.0/debian/control gpgme1.0-1.8.0/debian/control --- gpgme1.0-1.6.0/debian/control 2015-07-08 17:17:59.000000000 +0000 +++ gpgme1.0-1.8.0/debian/control 2017-02-18 21:22:02.000000000 +0000 @@ -1,34 +1,54 @@ Source: gpgme1.0 -Priority: standard +Priority: optional Section: libs -Maintainer: Debian GnuPG Maintainers -Uploaders: Jose Carlos Garcia Sogo , - Daniel Kahn Gillmor -Build-Depends: automake (>= 1.14), - debhelper (>> 9~), - dh-autoreconf, - gnupg-agent, - gnupg2, - gpgsm, - help2man, - libassuan-dev (>> 2.0.2), - libgpg-error-dev (>> 1.8), - scdaemon, - texinfo -Standards-Version: 3.9.6 +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian GnuPG Maintainers +Uploaders: + Jose Carlos Garcia Sogo , + Daniel Kahn Gillmor , +Build-Depends: + automake (>= 1.14), + debhelper (>= 10~), + dh-autoreconf, + dh-exec, + dh-python, + gnupg-agent, + gnupg2 | gnupg (>= 2), + gpgsm, + libassuan-dev (>> 2.0.2), + libgpg-error-dev (>> 1.17), + pkg-config, + python-all-dev, + python3-all-dev, + qtbase5-dev, + scdaemon, + swig, + texinfo, +Build-Depends-Indep: + doxygen, + graphviz, +Standards-Version: 3.9.8 Homepage: https://www.gnupg.org/related_software/gpgme/ -Vcs-Git: git://anonscm.debian.org/pkg-gnupg/gpgme.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnupg/gpgme.git +Vcs-Git: https://anonscm.debian.org/git/pkg-gnupg/gpgme.git +Vcs-Browser: https://anonscm.debian.org/git/pkg-gnupg/gpgme.git -Package: libgpgme11-dev +Package: libgpgme-dev Section: libdevel +Priority: extra Architecture: any -Depends: libassuan-dev, - libc6-dev, - libgpg-error-dev, - libgpgme11 (= ${binary:Version}), - ${misc:Depends} -Conflicts: libgpgme-dev, libgpgme10-dev +Depends: + libassuan-dev, + libc6-dev, + libgpg-error-dev, + libgpgme11 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Breaks: + libgpgme11-dev, +Replaces: + libgpgme11-dev, +Provides: + libgpgme11-dev (= ${binary:Version}), Description: GPGME - GnuPG Made Easy (development files) GPGME is a wrapper library which provides a C API to access some of the GnuPG functions, such as encrypt, decrypt, sign, verify, ... @@ -39,11 +59,136 @@ Package: libgpgme11 Architecture: any Multi-Arch: same -Pre-Depends: ${misc:Pre-Depends} -Depends: gnupg2 (>> 2.0.4), ${misc:Depends}, ${shlibs:Depends} -Suggests: gpgsm (>> 1.9.6) +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + gnupg (>> 2) | gnupg2 (>> 2.0.4), + ${misc:Depends}, + ${shlibs:Depends}, +Suggests: + gpgsm (>> 1.9.6), Description: GPGME - GnuPG Made Easy (library) GPGME is a wrapper library which provides a C API to access some of the GnuPG functions, such as encrypt, decrypt, sign, verify, ... . This package contains the library. + +Package: python3-gpg +Architecture: any +Section: python +Provides: + ${python3:Provides}, +Depends: + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, +Description: Python interface to the GPGME GnuPG encryption library (Python 3) + The "gpg" Python module is, for the most part, a direct interface to + the C GPGME library. However, it is re-packaged in a more Pythonic + way -- object-oriented with classes and modules. Take a look at the + classes defined here -- they correspond directly to certain object + types in GPGME for C. + . + Features: + * Feature-rich, full implementation of the GPGME library. Supports + all GPGME features except interactive editing (coming soon). + Callback functions may be written in pure Python. + * Ability to sign, encrypt, decrypt, and verify data. + * Ability to list keys, export and import keys, and manage the keyring. + * Fully object-oriented with convenient classes and modules. + . + This is the official upstream Python 3 binding for GPGME. + +Package: python-gpg +Architecture: any +Section: python +Provides: + ${python:Provides}, +Depends: + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: Python interface to the GPGME GnuPG encryption library (Python 2) + The "gpg" Python module is, for the most part, a direct interface to + the C GPGME library. However, it is re-packaged in a more Pythonic + way -- object-oriented with classes and modules. Take a look at the + classes defined here -- they correspond directly to certain object + types in GPGME for C. + . + Features: + * Feature-rich, full implementation of the GPGME library. Supports + all GPGME features except interactive editing (coming soon). + Callback functions may be written in pure Python. + * Ability to sign, encrypt, decrypt, and verify data. + * Ability to list keys, export and import keys, and manage the keyring. + * Fully object-oriented with convenient classes and modules. + . + This is the official upstream Python 2 binding for GPGME. + +Package: libqgpgme7 +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Description: library for GPGME integration with Qt + QGpgME is a library that provides GPGME integration with QEventLoop + and some Qt datatypes (e.g. QByteArray). + . + This is the official upstream Qt binding for GPGME. + +Package: libgpgmepp6 +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Description: C++ wrapper library for GPGME + GpgME++ (aka GpgMEpp) is a C++ wrapper (or C++ bindings) for the + GnuPG project's GPGME (GnuPG Made Easy) library. + . + This is the official upstream C++ binding for GPGME. + +Package: libgpgmepp-dev +Section: libdevel +Priority: extra +Architecture: any +Depends: + libgpgmepp6 (= ${binary:Version}), + libqgpgme7 (= ${binary:Version}), + qtbase5-dev, + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: + libgpgmepp-doc (= ${binary:Version}), +Breaks: + kdepimlibs5-dev +Replaces: + kdepimlibs5-dev +Description: C++ and Qt bindings for GPGME (development files) + GpgME++ (aka GpgMEpp) is a C++ wrapper (or C++ bindings) for the + GnuPG project's GPGME (GnuPG Made Easy) library. + . + QGpgME is a library that provides GPGME integration with QEventLoop + and some Qt datatypes (e.g. QByteArray). + . + This package contains the headers and other files needed to compile + against either of these libraries. + +Package: libgpgmepp-doc +Section: doc +Priority: extra +Architecture: all +Depends: + ${misc:Depends}, +Suggests: + libgpgmepp-dev, +Description: C++ and Qt bindings for GPGME (documentation for developers) + GpgME++ (aka GpgMEpp) is a C++ wrapper (or C++ bindings) for the + GnuPG project's GPGME (GnuPG Made Easy) library. + . + QGpgME is a library that provides GPGME integration with QEventLoop + and some Qt datatypes (e.g. QByteArray). + . + This package contains documentation for developers describing how to + use these packages. diff -Nru gpgme1.0-1.6.0/debian/copyright gpgme1.0-1.8.0/debian/copyright --- gpgme1.0-1.6.0/debian/copyright 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/copyright 2017-02-18 21:22:02.000000000 +0000 @@ -1,31 +1,97 @@ -This package was debianized by Jose Carlos Garcia Sogo on -Mon, 30 Apr 2001 12:03:08 +0200. - -It was downloaded from ftp://ftp.gnupg.org/GnuPG/gpgme - -Upstream Authors: - Werner Koch - g10 Code GmbH - FSF - -Copyright: 2003, 2004, 2005 g10 Code GmbH - -Copyright statement: - - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -On Debian systems, the complete text of the GNU Lesser General Public License -version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: GnuPG Made Easy (GPGME) +Upstream-Contact: GnuPG development mailing list +Source: https://www.gnupg.org/related_software/gpgme/ + +Files: * +Copyright: + g10 Code GmbH, + Free Software Foundation, Inc., + Werner Koch +License: LGPL-2.1+ + +Files: src/argparse.* +Copyright: + 1998-2001, 2006-2008, 2012 Free Software Foundation, Inc., + 1997-2001, 2006-2008, 2013-2015 Werner Koch +License: LGPL-3+ or GPL-2+ + +Files: src/gpgme-tool.c doc/* +Copyright: + 2002-2016 g10 Code GmbH +License: GPL-3+ + +Files: lang/cl/* +Copyright: 2003, 2006, 2008 g10 Code GmbH +License: GPL-2+ + +Files: lang/python/* lang/python/*/* lang/python/gpg/constants/* lang/python/gpg/constants/*/* +Copyright: + 2002 John Goerzen, + 2004-2008 Igor Belyi, + 2014-2015 Martin Albrecht, + 2015 Ben McGinnes, + 2016 g10 Code GmbH +License: LGPL-2.1+ + +Files: lang/cpp/* lang/cpp/src/* lang/cpp/src/interfaces/* +Copyright: + 2003-2005, 2007-2010, 2016 Klarälvdalens Datakonsult AB, + 2016 Intevation GmbH, +License: LGPL-2+ + +Files: lang/qt/* lang/qt/*/* +Copyright: + 2004, 2005, 2007-2010, 2016 Klarälvdalens Datakonsult AB, + 2016 Intevation GmbH +License: GPL-2+ + +License: LGPL-3+ + You can redistribute and/or modify this software under the terms of + the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + . + On Debian systems, the complete text of the GNU Lesser General Public + License version 3 can be found in + `/usr/share/common-licenses/LGPL-3'. + +License: LGPL-2.1+ + You can redistribute and/or modify this software 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. + . + On Debian systems, the complete text of the GNU Lesser General Public + License version 2.1 can be found in + `/usr/share/common-licenses/LGPL-2.1'. + +License: LGPL-2+ + You can redistribute and/or modify this software under the terms of + the GNU Library General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + On Debian systems, the complete text of the GNU Library General Public + License version 2 can be found in + `/usr/share/common-licenses/LGPL-2. + +License: GPL-2+ + You can redistribute and/or modify this software under the terms of + the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + On Debian systems, the complete text of the GNU General Public + License version 2 can be found in + `/usr/share/common-licenses/GPL-2. + +License: GPL-3+ + You can redistribute and/or modify this software under the terms of + the GNU General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at your + option) any later version. + . + On Debian systems, the complete text of the GNU General Public + License version 3 can be found in + `/usr/share/common-licenses/GPL-3. diff -Nru gpgme1.0-1.6.0/debian/gbp.conf gpgme1.0-1.8.0/debian/gbp.conf --- gpgme1.0-1.6.0/debian/gbp.conf 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/gbp.conf 2017-02-18 21:22:02.000000000 +0000 @@ -1,3 +1,39 @@ [DEFAULT] pristine-tar=True upstream-vcs-tag=gpgme-%(version)s + +[import-orig] +filter = [ + 'INSTALL', + 'Makefile.in', + '*/Makefile.in', + '*/*/Makefile.in', + 'aclocal.m4', + 'build-aux/compile', + 'build-aux/depcomp', + 'build-aux/install-sh', + 'build-aux/ltmain.sh', + 'build-aux/mdate-sh', + 'build-aux/missing', + 'build-aux/mkinstalldirs', + 'build-aux/texinfo.tex', + 'config.h.in', + 'configure', + 'doc/gpgme.info*', + 'lang/cl/gpgme.asd', + 'm4/libtool.m4', + 'm4/ltoptions.m4', + 'm4/ltsugar.m4', + 'm4/ltversion.m4', + 'm4/lt~obsolete.m4', + 'lang/python/gpg/gpgme.py', + 'lang/python/gpg/version.py', + 'lang/python/gpg/__pycache__/*', + 'lang/qt/src/*Job', + 'lang/qt/src/CryptoConfig', + 'lang/qt/src/DataProvider', + 'lang/qt/src/DN', + 'lang/qt/src/Protocol', + 'lang/qt/src/QGpgMENewCryptoConfig', + ] +filter-pristine-tar = False diff -Nru gpgme1.0-1.6.0/debian/gpgme-config.1 gpgme1.0-1.8.0/debian/gpgme-config.1 --- gpgme1.0-1.6.0/debian/gpgme-config.1 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/gpgme-config.1 2017-02-18 21:22:02.000000000 +0000 @@ -1,10 +1,10 @@ .TH "GPGME" "1" "08 July 2012" "gpgme" "User commands" .SH NAME -gpgme-config \- script to get information about the installed version of GPGME +gpgme\-config \- script to get information about the installed version of GPGME .SH SYNOPSIS -.B gpgme-config +.B gpgme\-config .RB [ \-\-api\-version ] .RB [ \-\-cflags ] .RB [ \-\-exec\-prefix ] @@ -18,14 +18,14 @@ .SH DESCRIPTION .PP -\fBgpgme-config\fP is a tool that is used to configure to determine +\fBgpgme\-config\fP is a tool that is used to configure to determine the compiler and linker flags that should be used to compile and link programs that use \fIGPGME\fP. It is also used internally to the .m4 macros for GNU autoconf that are included with \fIGPGME\fP. .SH OPTIONS .PP -\fBgpgme-config\fP accepts the following options: +\fBgpgme\-config\fP accepts the following options: .TP .B \-\-api\-version Print the currently installed API version of \fIGPGME\fP to standard output. @@ -67,6 +67,28 @@ .SH AUTHORS .PP +.PP +The +.I GPGME +library is written by many contributors, including Werner Koch, Marcus +Brinkmann, Andre Heinecke, Justus Winter, and Karl-Heinz Zimmer. +.PP This manual page page was written by \fBJose Carlos Garcia Sogo\fR \&<\&jsogo@debian.org\&> and \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&> for the Debian distribution (but may be used by others). + +.SH BUGS +.PP +Please report bugs to . + +.SH COPYRIGHT +\fBgpgme\-tool\fP is Copyright \(co 2015-2016 g10 Code GmbH License +GPLv2+: GNU GPL version 2 or later +.PP +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +.SH "SEE ALSO" +.BR gpgme\-tool (1), +.BR /usr/include/gpgme.h , +.B info gpgme diff -Nru gpgme1.0-1.6.0/debian/gpgme-tool.1 gpgme1.0-1.8.0/debian/gpgme-tool.1 --- gpgme1.0-1.6.0/debian/gpgme-tool.1 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/gpgme-tool.1 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,111 @@ +.TH GPGME\-TOOL "1" "September 2016" "gpgme-tool 1.7.0" "User Commands" +.SH NAME +gpgme\-tool \- Assuan server exposing GnuPG Made Easy operations + +.SH SYNOPSIS +.B gpgme\-tool +.RB [ \-\-server | \-s ] +.RB [ \-\-gpgme\-binary =\fIFILE\fR] +.RB [ \-\-lib\-version ] +.RB [ \-\-usage ] +.RB [ \-\-version | \-V ] +.RB [ \-\-help | \-? ] + +.SH DESCRIPTION +.PP +\fBgpgme\-tool\fP is a test interface that can exercise the library +functionality of \fIGPGME\fP. It is not currently intended for +production use, but it can be a useful way to dynamically understand +and experiment with the functionality available from the library. + +Running this tool in Server mode (the default mode) results in a +text-based, command-driven session. When the tool produces (on its +standard output) a line beginning with +.BR OK " or " ERR , +you can provide it with a command on its standard input. Try the +command +.B HELP +to see a list of available commands. Commands are case-insensitive. + +Status lines begin with an +.BR S , +and data lines begin with a +.BR D . + +.SH OPTIONS +.PP +\fBgpgme\-tool\fP accepts the following options on the command line: +.TP +.SH OPTIONS +.TP +.BR \-s , \-\-server +Server mode (default) +.TP +.BR \-\-gpg\-binary =FILE +Use FILE for the GPG backend +.TP +.B \-\-lib\-version +Show library version and terminate +.TP +.BR \-V , \-\-version +Print the currently installed version of \fIGPGME\fP to standard output. +.TP +.BR \-? , \-\-help +Print a list of command\-line options. +.TP +.B \-\-usage +Print a synopsis of \fBgpgme\-tool\fR's command line. + +.SH EXAMPLE +.PP +Below is an example interaction from a POSIX shell, with user-typed +lines in \fIitalics\fR, and data returned by \fBgpgme\-tool\fR in +\fBbold\fR: + +.nf +user@host:~$ \fIgpgme\-tool +.B OK GPGME\-Tool 1.7.0 ready +.I strerror 20 +.B D Unknown compression algorithm +.B OK +.I version +.B D 1.7.0 +.B OK +.I armor +.B S ARMOR false +.B OK +.I armor true +.B OK +.I armor +.B S ARMOR true +.B OK +.I bye +.B OK closing connection +user@host:~$ +.ad + +.SH AUTHORS +.PP +The +.I GPGME +library is written by many contributors, including Werner Koch, Marcus +Brinkmann, Andre Heinecke, Justus Winter, and Karl-Heinz Zimmer. +.PP +This manual page page was written by Daniel Kahn Gillmor for the +Debian distribution (but may be used by others). + +.SH BUGS +.PP +Please report bugs to . + +.SH COPYRIGHT +\fBgpgme\-tool\fP is Copyright \(co 2015-2016 g10 Code GmbH License +GPLv2+: GNU GPL version 2 or later +.PP +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +.SH "SEE ALSO" +.BR gpgme\-config (1), +.BR /usr/include/gpgme.h , +.B info gpgme diff -Nru gpgme1.0-1.6.0/debian/libgpgme11-dev.doc-base gpgme1.0-1.8.0/debian/libgpgme11-dev.doc-base --- gpgme1.0-1.6.0/debian/libgpgme11-dev.doc-base 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11-dev.doc-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -Document: gpgme -Title: gpgme -Abstract: GPGME is a wrapper library which provides a C API to access some of the - GnuPG functions, such as encrypt, decrypt, sign, verify, ... - . - This package contains the headers and other files needed to compile - against this library. -Section: Programming/C - -Format: info -Index: /usr/share/info/gpgme.info.gz -Files: /usr/share/info/gpgme.info* diff -Nru gpgme1.0-1.6.0/debian/libgpgme11-dev.install gpgme1.0-1.8.0/debian/libgpgme11-dev.install --- gpgme1.0-1.6.0/debian/libgpgme11-dev.install 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11-dev.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -usr/bin/gpgme-config -usr/include/ -usr/lib/*/lib*.a -usr/lib/*/lib*.so -usr/share/aclocal/ -usr/share/info/*info* -usr/bin/gpgme-tool diff -Nru gpgme1.0-1.6.0/debian/libgpgme11-dev.manpages gpgme1.0-1.8.0/debian/libgpgme11-dev.manpages --- gpgme1.0-1.6.0/debian/libgpgme11-dev.manpages 2015-07-08 17:17:59.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11-dev.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian/gpgme-config.1 -debian/gpgme-tool.1 diff -Nru gpgme1.0-1.6.0/debian/libgpgme11.install gpgme1.0-1.8.0/debian/libgpgme11.install --- gpgme1.0-1.6.0/debian/libgpgme11.install 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11.install 2017-02-18 21:22:02.000000000 +0000 @@ -1 +1 @@ -usr/lib/*/lib*.so.* +usr/lib/*/libgpgme.so.* diff -Nru gpgme1.0-1.6.0/debian/libgpgme11.links gpgme1.0-1.8.0/debian/libgpgme11.links --- gpgme1.0-1.6.0/debian/libgpgme11.links 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11.links 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +usr/lib/${DEB_HOST_MULTIARCH}/libgpgme.so.11 usr/lib/${DEB_HOST_MULTIARCH}/libgpgme-pthread.so.11 diff -Nru gpgme1.0-1.6.0/debian/libgpgme11.symbols gpgme1.0-1.8.0/debian/libgpgme11.symbols --- gpgme1.0-1.6.0/debian/libgpgme11.symbols 2015-09-17 07:57:18.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme11.symbols 2017-02-18 21:22:02.000000000 +0000 @@ -1,175 +1,7 @@ -libgpgme-pthread.so.11 libgpgme11 #MINVER# - GPGME_1.0@GPGME_1.0 1.1.2 - GPGME_1.1@GPGME_1.1 1.1.2 - gpgme_cancel@GPGME_1.0 1.1.2 - gpgme_cancel_async@GPGME_1.1 1.1.8 - gpgme_check_version@GPGME_1.0 1.1.2 - gpgme_check_version_internal@GPGME_1.1 1.2.0 - gpgme_conf_arg_new@GPGME_1.1 1.1.8 - gpgme_conf_arg_release@GPGME_1.1 1.1.8 - gpgme_conf_opt_change@GPGME_1.1 1.1.8 - gpgme_conf_release@GPGME_1.1 1.1.6 - gpgme_ctx_get_engine_info@GPGME_1.1 1.1.2 - gpgme_ctx_set_engine_info@GPGME_1.1 1.1.6 - gpgme_data_get_encoding@GPGME_1.0 1.1.2 - gpgme_data_get_file_name@GPGME_1.1 1.1.2 - gpgme_data_identify@GPGME_1.1 1.4.3 - gpgme_data_new@GPGME_1.0 1.1.2 - gpgme_data_new_from_cbs@GPGME_1.0 1.1.2 - gpgme_data_new_from_fd@GPGME_1.0 1.1.2 - gpgme_data_new_from_file@GPGME_1.0 1.1.2 - gpgme_data_new_from_filepart@GPGME_1.0 1.1.2 - gpgme_data_new_from_mem@GPGME_1.0 1.1.2 - gpgme_data_new_from_stream@GPGME_1.0 1.1.2 - gpgme_data_new_with_read_cb@GPGME_1.0 1.1.2 - gpgme_data_read@GPGME_1.0 1.1.2 - gpgme_data_release@GPGME_1.0 1.1.2 - gpgme_data_release_and_get_mem@GPGME_1.0 1.1.2 - gpgme_data_rewind@GPGME_1.0 1.1.2 - gpgme_data_seek@GPGME_1.0 1.1.2 - gpgme_data_set_encoding@GPGME_1.0 1.1.2 - gpgme_data_set_file_name@GPGME_1.1 1.1.2 - gpgme_data_write@GPGME_1.0 1.1.2 - gpgme_engine_check_version@GPGME_1.0 1.1.2 - gpgme_err_code_from_errno@GPGME_1.0 1.1.2 - gpgme_err_code_from_syserror@GPGME_1.0 1.3.2 - gpgme_err_code_to_errno@GPGME_1.0 1.1.2 - gpgme_err_make_from_errno@GPGME_1.0 1.1.2 - gpgme_err_set_errno@GPGME_1.0 1.3.2 - gpgme_error_from_errno@GPGME_1.0 1.1.2 - gpgme_free@GPGME_1.1 1.1.2 - gpgme_get_armor@GPGME_1.0 1.1.2 - gpgme_get_dirinfo@GPGME_1.1 1.5.0 - gpgme_get_engine_info@GPGME_1.0 1.1.2 - gpgme_get_include_certs@GPGME_1.0 1.1.2 - gpgme_get_io_cbs@GPGME_1.0 1.1.2 - gpgme_get_key@GPGME_1.0 1.1.2 - gpgme_get_keylist_mode@GPGME_1.0 1.1.2 - gpgme_get_offline@GPGME_1.1 1.6.0 - gpgme_get_passphrase_cb@GPGME_1.0 1.1.2 - gpgme_get_pinentry_mode@GPGME_1.1 1.4.1 - gpgme_get_progress_cb@GPGME_1.0 1.1.2 - gpgme_get_protocol@GPGME_1.0 1.1.2 - gpgme_get_protocol_name@GPGME_1.0 1.1.6 - gpgme_get_sig_key@GPGME_1.0 1.1.2 - gpgme_get_sig_status@GPGME_1.0 1.1.2 - gpgme_get_sig_string_attr@GPGME_1.0 1.1.2 - gpgme_get_sig_ulong_attr@GPGME_1.0 1.1.2 - gpgme_get_status_cb@GPGME_1.1 1.6.0 - gpgme_get_sub_protocol@GPGME_1.1 1.3.2 - gpgme_get_textmode@GPGME_1.0 1.1.2 - gpgme_hash_algo_name@GPGME_1.0 1.1.2 - gpgme_io_read@GPGME_1.1 1.2.0 - gpgme_io_write@GPGME_1.1 1.2.0 - gpgme_io_writen@GPGME_1.1 1.4.1 - gpgme_key_from_uid@GPGME_1.1 1.3.2 - gpgme_key_get_string_attr@GPGME_1.0 1.1.2 - gpgme_key_get_ulong_attr@GPGME_1.0 1.1.2 - gpgme_key_ref@GPGME_1.0 1.1.2 - gpgme_key_release@GPGME_1.0 1.1.2 - gpgme_key_sig_get_string_attr@GPGME_1.0 1.1.2 - gpgme_key_sig_get_ulong_attr@GPGME_1.0 1.1.2 - gpgme_key_unref@GPGME_1.0 1.1.2 - gpgme_new@GPGME_1.0 1.1.2 - gpgme_op_assuan_result@GPGME_1.1 1.2.0 - gpgme_op_assuan_transact@GPGME_1.1 1.2.0 - gpgme_op_assuan_transact_ext@GPGME_1.1 1.3.2 - gpgme_op_assuan_transact_start@GPGME_1.1 1.2.0 - gpgme_op_card_edit@GPGME_1.0 1.1.2 - gpgme_op_card_edit_start@GPGME_1.0 1.1.2 - gpgme_op_conf_load@GPGME_1.1 1.1.6 - gpgme_op_conf_save@GPGME_1.1 1.1.6 - gpgme_op_decrypt@GPGME_1.0 1.1.2 - gpgme_op_decrypt_result@GPGME_1.0 1.1.2 - gpgme_op_decrypt_start@GPGME_1.0 1.1.2 - gpgme_op_decrypt_verify@GPGME_1.0 1.1.2 - gpgme_op_decrypt_verify_start@GPGME_1.0 1.1.2 - gpgme_op_delete@GPGME_1.0 1.1.2 - gpgme_op_delete_start@GPGME_1.0 1.1.2 - gpgme_op_edit@GPGME_1.0 1.1.2 - gpgme_op_edit_start@GPGME_1.0 1.1.2 - gpgme_op_encrypt@GPGME_1.0 1.1.2 - gpgme_op_encrypt_result@GPGME_1.0 1.1.2 - gpgme_op_encrypt_sign@GPGME_1.0 1.1.2 - gpgme_op_encrypt_sign_start@GPGME_1.0 1.1.2 - gpgme_op_encrypt_start@GPGME_1.0 1.1.2 - gpgme_op_export@GPGME_1.0 1.1.2 - gpgme_op_export_ext@GPGME_1.0 1.1.2 - gpgme_op_export_ext_start@GPGME_1.0 1.1.2 - gpgme_op_export_keys@GPGME_1.1 1.2.0 - gpgme_op_export_keys_start@GPGME_1.1 1.2.0 - gpgme_op_export_start@GPGME_1.0 1.1.2 - gpgme_op_genkey@GPGME_1.0 1.1.2 - gpgme_op_genkey_result@GPGME_1.0 1.1.2 - gpgme_op_genkey_start@GPGME_1.0 1.1.2 - gpgme_op_getauditlog@GPGME_1.1 1.1.6 - gpgme_op_getauditlog_start@GPGME_1.1 1.1.6 - gpgme_op_import@GPGME_1.0 1.1.2 - gpgme_op_import_ext@GPGME_1.0 1.1.2 - gpgme_op_import_keys@GPGME_1.1 1.2.0 - gpgme_op_import_keys_start@GPGME_1.1 1.2.0 - gpgme_op_import_result@GPGME_1.0 1.1.2 - gpgme_op_import_start@GPGME_1.0 1.1.2 - gpgme_op_keylist_end@GPGME_1.0 1.1.2 - gpgme_op_keylist_ext_start@GPGME_1.0 1.1.2 - gpgme_op_keylist_next@GPGME_1.0 1.1.2 - gpgme_op_keylist_result@GPGME_1.0 1.1.2 - gpgme_op_keylist_start@GPGME_1.0 1.1.2 - gpgme_op_passwd@GPGME_1.1 1.3.2 - gpgme_op_passwd_start@GPGME_1.1 1.3.2 - gpgme_op_sign@GPGME_1.0 1.1.2 - gpgme_op_sign_result@GPGME_1.0 1.1.2 - gpgme_op_sign_start@GPGME_1.0 1.1.2 - gpgme_op_spawn@GPGME_1.1 1.5.0 - gpgme_op_spawn_start@GPGME_1.1 1.5.0 - gpgme_op_trustlist_end@GPGME_1.0 1.1.2 - gpgme_op_trustlist_next@GPGME_1.0 1.1.2 - gpgme_op_trustlist_start@GPGME_1.0 1.1.2 - gpgme_op_verify@GPGME_1.0 1.1.2 - gpgme_op_verify_result@GPGME_1.0 1.1.2 - gpgme_op_verify_start@GPGME_1.0 1.1.2 - gpgme_op_vfs_create@GPGME_1.1 1.3.2 - gpgme_op_vfs_mount@GPGME_1.1 1.3.2 - gpgme_op_vfs_mount_result@GPGME_1.1 1.3.2 - gpgme_pubkey_algo_name@GPGME_1.0 1.1.2 - gpgme_release@GPGME_1.0 1.1.2 - gpgme_result_ref@GPGME_1.1 1.2.0 - gpgme_result_unref@GPGME_1.1 1.2.0 - gpgme_set_armor@GPGME_1.0 1.1.2 - gpgme_set_engine_info@GPGME_1.1 1.1.6 - gpgme_set_global_flag@GPGME_1.1 1.4.1 - gpgme_set_include_certs@GPGME_1.0 1.1.2 - gpgme_set_io_cbs@GPGME_1.0 1.1.2 - gpgme_set_keylist_mode@GPGME_1.0 1.1.2 - gpgme_set_locale@GPGME_1.0 1.1.2 - gpgme_set_offline@GPGME_1.1 1.6.0 - gpgme_set_passphrase_cb@GPGME_1.0 1.1.2 - gpgme_set_pinentry_mode@GPGME_1.1 1.4.1 - gpgme_set_progress_cb@GPGME_1.0 1.1.2 - gpgme_set_protocol@GPGME_1.0 1.1.6 - gpgme_set_status_cb@GPGME_1.1 1.6.0 - gpgme_set_sub_protocol@GPGME_1.1 1.3.2 - gpgme_set_textmode@GPGME_1.0 1.1.2 - gpgme_sig_notation_add@GPGME_1.1 1.1.2 - gpgme_sig_notation_clear@GPGME_1.1 1.1.2 - gpgme_sig_notation_get@GPGME_1.1 1.1.2 - gpgme_signers_add@GPGME_1.0 1.1.2 - gpgme_signers_clear@GPGME_1.0 1.1.2 - gpgme_signers_count@GPGME_1.0 1.4.3 - gpgme_signers_enum@GPGME_1.0 1.1.2 - gpgme_strerror@GPGME_1.0 1.1.2 - gpgme_strerror_r@GPGME_1.0 1.1.2 - gpgme_strsource@GPGME_1.0 1.1.2 - gpgme_trust_item_get_int_attr@GPGME_1.0 1.1.2 - gpgme_trust_item_get_string_attr@GPGME_1.0 1.1.2 - gpgme_trust_item_ref@GPGME_1.0 1.1.2 - gpgme_trust_item_release@GPGME_1.0 1.1.2 - gpgme_trust_item_unref@GPGME_1.0 1.1.2 - gpgme_wait@GPGME_1.0 1.1.2 - gpgme_wait_ext@GPGME_1.1 1.3.2 libgpgme.so.11 libgpgme11 #MINVER# GPGME_1.0@GPGME_1.0 1.1.2 GPGME_1.1@GPGME_1.1 1.1.2 + gpgme_addrspec_from_uid@GPGME_1.1 1.7.1 gpgme_cancel@GPGME_1.0 1.1.2 gpgme_cancel_async@GPGME_1.1 1.1.8 gpgme_check_version@GPGME_1.0 1.1.2 @@ -198,6 +30,7 @@ gpgme_data_seek@GPGME_1.0 1.1.2 gpgme_data_set_encoding@GPGME_1.0 1.1.2 gpgme_data_set_file_name@GPGME_1.1 1.1.2 + gpgme_data_set_flag@GPGME_1.1 1.7.0 gpgme_data_write@GPGME_1.0 1.1.2 gpgme_engine_check_version@GPGME_1.0 1.1.2 gpgme_err_code_from_errno@GPGME_1.0 1.1.2 @@ -208,6 +41,7 @@ gpgme_error_from_errno@GPGME_1.0 1.1.2 gpgme_free@GPGME_1.1 1.1.2 gpgme_get_armor@GPGME_1.0 1.1.2 + gpgme_get_ctx_flag@GPGME_1.1 1.8.0 gpgme_get_dirinfo@GPGME_1.1 1.5.0 gpgme_get_engine_info@GPGME_1.0 1.1.2 gpgme_get_include_certs@GPGME_1.0 1.1.2 @@ -220,6 +54,7 @@ gpgme_get_progress_cb@GPGME_1.0 1.1.2 gpgme_get_protocol@GPGME_1.0 1.1.2 gpgme_get_protocol_name@GPGME_1.0 1.1.6 + gpgme_get_sender@GPGME_1.1 1.8.0 gpgme_get_sig_key@GPGME_1.0 1.1.2 gpgme_get_sig_status@GPGME_1.0 1.1.2 gpgme_get_sig_string_attr@GPGME_1.0 1.1.2 @@ -240,6 +75,8 @@ gpgme_key_sig_get_ulong_attr@GPGME_1.0 1.1.2 gpgme_key_unref@GPGME_1.0 1.1.2 gpgme_new@GPGME_1.0 1.1.2 + gpgme_op_adduid@GPGME_1.1 1.7.0 + gpgme_op_adduid_start@GPGME_1.1 1.7.0 gpgme_op_assuan_result@GPGME_1.1 1.2.0 gpgme_op_assuan_transact@GPGME_1.1 1.2.0 gpgme_op_assuan_transact_ext@GPGME_1.1 1.3.2 @@ -248,6 +85,10 @@ gpgme_op_card_edit_start@GPGME_1.0 1.1.2 gpgme_op_conf_load@GPGME_1.1 1.1.6 gpgme_op_conf_save@GPGME_1.1 1.1.6 + gpgme_op_createkey@GPGME_1.1 1.7.0 + gpgme_op_createkey_start@GPGME_1.1 1.7.0 + gpgme_op_createsubkey@GPGME_1.1 1.7.0 + gpgme_op_createsubkey_start@GPGME_1.1 1.7.0 gpgme_op_decrypt@GPGME_1.0 1.1.2 gpgme_op_decrypt_result@GPGME_1.0 1.1.2 gpgme_op_decrypt_start@GPGME_1.0 1.1.2 @@ -279,18 +120,28 @@ gpgme_op_import_keys_start@GPGME_1.1 1.2.0 gpgme_op_import_result@GPGME_1.0 1.1.2 gpgme_op_import_start@GPGME_1.0 1.1.2 + gpgme_op_interact@GPGME_1.1 1.7.0 + gpgme_op_interact_start@GPGME_1.1 1.7.0 gpgme_op_keylist_end@GPGME_1.0 1.1.2 gpgme_op_keylist_ext_start@GPGME_1.0 1.1.2 gpgme_op_keylist_next@GPGME_1.0 1.1.2 gpgme_op_keylist_result@GPGME_1.0 1.1.2 gpgme_op_keylist_start@GPGME_1.0 1.1.2 + gpgme_op_keysign@GPGME_1.1 1.7.0 + gpgme_op_keysign_start@GPGME_1.1 1.7.0 gpgme_op_passwd@GPGME_1.1 1.3.2 gpgme_op_passwd_start@GPGME_1.1 1.3.2 + gpgme_op_query_swdb@GPGME_1.1 1.8.0 + gpgme_op_query_swdb_result@GPGME_1.1 1.8.0 + gpgme_op_revuid@GPGME_1.1 1.7.0 + gpgme_op_revuid_start@GPGME_1.1 1.7.0 gpgme_op_sign@GPGME_1.0 1.1.2 gpgme_op_sign_result@GPGME_1.0 1.1.2 gpgme_op_sign_start@GPGME_1.0 1.1.2 gpgme_op_spawn@GPGME_1.1 1.5.0 gpgme_op_spawn_start@GPGME_1.1 1.5.0 + gpgme_op_tofu_policy@GPGME_1.1 1.7.0 + gpgme_op_tofu_policy_start@GPGME_1.1 1.7.0 gpgme_op_trustlist_end@GPGME_1.0 1.1.2 gpgme_op_trustlist_next@GPGME_1.0 1.1.2 gpgme_op_trustlist_start@GPGME_1.0 1.1.2 @@ -301,10 +152,12 @@ gpgme_op_vfs_mount@GPGME_1.1 1.3.2 gpgme_op_vfs_mount_result@GPGME_1.1 1.3.2 gpgme_pubkey_algo_name@GPGME_1.0 1.1.2 + gpgme_pubkey_algo_string@GPGME_1.1 1.7.0 gpgme_release@GPGME_1.0 1.1.2 gpgme_result_ref@GPGME_1.1 1.2.0 gpgme_result_unref@GPGME_1.1 1.2.0 gpgme_set_armor@GPGME_1.0 1.1.2 + gpgme_set_ctx_flag@GPGME_1.1 1.7.0 gpgme_set_engine_info@GPGME_1.1 1.1.6 gpgme_set_global_flag@GPGME_1.1 1.4.1 gpgme_set_include_certs@GPGME_1.0 1.1.2 @@ -316,6 +169,7 @@ gpgme_set_pinentry_mode@GPGME_1.1 1.4.1 gpgme_set_progress_cb@GPGME_1.0 1.1.2 gpgme_set_protocol@GPGME_1.0 1.1.6 + gpgme_set_sender@GPGME_1.1 1.8.0 gpgme_set_status_cb@GPGME_1.1 1.6.0 gpgme_set_sub_protocol@GPGME_1.1 1.3.2 gpgme_set_textmode@GPGME_1.0 1.1.2 diff -Nru gpgme1.0-1.6.0/debian/libgpgme-dev.doc-base gpgme1.0-1.8.0/debian/libgpgme-dev.doc-base --- gpgme1.0-1.6.0/debian/libgpgme-dev.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme-dev.doc-base 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,12 @@ +Document: gpgme +Title: gpgme +Abstract: GPGME is a wrapper library which provides a C API to access some of the + GnuPG functions, such as encrypt, decrypt, sign, verify, ... + . + This package contains the headers and other files needed to compile + against this library. +Section: Programming/C + +Format: info +Index: /usr/share/info/gpgme.info.gz +Files: /usr/share/info/gpgme.info* diff -Nru gpgme1.0-1.6.0/debian/libgpgme-dev.install gpgme1.0-1.8.0/debian/libgpgme-dev.install --- gpgme1.0-1.6.0/debian/libgpgme-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme-dev.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,7 @@ +usr/bin/gpgme-config +usr/bin/gpgme-tool +usr/include/gpgme.h +usr/lib/*/libgpgme.a +usr/lib/*/libgpgme.so +usr/share/aclocal/ +usr/share/info/*info* diff -Nru gpgme1.0-1.6.0/debian/libgpgme-dev.links gpgme1.0-1.8.0/debian/libgpgme-dev.links --- gpgme1.0-1.6.0/debian/libgpgme-dev.links 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme-dev.links 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +usr/lib/${DEB_HOST_MULTIARCH}/libgpgme.so usr/lib/${DEB_HOST_MULTIARCH}/libgpgme-pthread.so diff -Nru gpgme1.0-1.6.0/debian/libgpgme-dev.manpages gpgme1.0-1.8.0/debian/libgpgme-dev.manpages --- gpgme1.0-1.6.0/debian/libgpgme-dev.manpages 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgme-dev.manpages 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,2 @@ +debian/gpgme-config.1 +debian/gpgme-tool.1 diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp6.docs gpgme1.0-1.8.0/debian/libgpgmepp6.docs --- gpgme1.0-1.6.0/debian/libgpgmepp6.docs 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp6.docs 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +lang/cpp/README diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp6.install gpgme1.0-1.8.0/debian/libgpgmepp6.install --- gpgme1.0-1.6.0/debian/libgpgmepp6.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp6.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libgpgmepp.so.* diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp-dev.install gpgme1.0-1.8.0/debian/libgpgmepp-dev.install --- gpgme1.0-1.6.0/debian/libgpgmepp-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp-dev.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,8 @@ +usr/include/QGpgME +usr/include/gpgme++ +usr/include/qgpgme +usr/lib/*/cmake +usr/lib/*/libgpgmepp.a +usr/lib/*/libgpgmepp.so +usr/lib/*/libqgpgme.a +usr/lib/*/libqgpgme.so diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp-dev.links gpgme1.0-1.8.0/debian/libgpgmepp-dev.links --- gpgme1.0-1.6.0/debian/libgpgmepp-dev.links 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp-dev.links 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,2 @@ +usr/share/doc/libgpgmepp6/README usr/share/doc/libgpgmepp-dev/README.gpgmepp +usr/share/doc/libqgpgme/README usr/share/doc/libgpgmepp-dev/README.qgpgme diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp-doc.doc-base gpgme1.0-1.8.0/debian/libgpgmepp-doc.doc-base --- gpgme1.0-1.6.0/debian/libgpgmepp-doc.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp-doc.doc-base 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,15 @@ +Document: libgpgmepp-qgpgme +Title: Programmer documentation for GpgMEpp and QGpgME +Abstract: + GpgMEpp is the canonical C++ binding for GPGME, "GnuPG Made Easy". + QGpgME is a binding to Qt on top of GpgMEpp, and is integrated into + the Qt event model. + . + This is documentation designed to help programmers and system + designers make use of these higher-level bindings to use GnuPG in an + automated fashion. +Section: Programming/C++ + +Format: html +Index: /usr/share/doc/libgpgmepp-doc/html/index.html +Files: /usr/share/doc/libgpgmepp-doc/html/* /usr/share/doc/libgpgmepp-doc/html/*/* diff -Nru gpgme1.0-1.6.0/debian/libgpgmepp-doc.docs gpgme1.0-1.8.0/debian/libgpgmepp-doc.docs --- gpgme1.0-1.6.0/debian/libgpgmepp-doc.docs 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libgpgmepp-doc.docs 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +lang/qt/doc/generated/html/ diff -Nru gpgme1.0-1.6.0/debian/libqgpgme7.docs gpgme1.0-1.8.0/debian/libqgpgme7.docs --- gpgme1.0-1.6.0/debian/libqgpgme7.docs 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libqgpgme7.docs 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +lang/qt/README diff -Nru gpgme1.0-1.6.0/debian/libqgpgme7.install gpgme1.0-1.8.0/debian/libqgpgme7.install --- gpgme1.0-1.6.0/debian/libqgpgme7.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/libqgpgme7.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libqgpgme.so.* diff -Nru gpgme1.0-1.6.0/debian/patches/0001-avoid-identifying-as-beta.patch gpgme1.0-1.8.0/debian/patches/0001-avoid-identifying-as-beta.patch --- gpgme1.0-1.6.0/debian/patches/0001-avoid-identifying-as-beta.patch 2015-07-08 17:18:19.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0001-avoid-identifying-as-beta.patch 2017-02-18 21:22:02.000000000 +0000 @@ -7,19 +7,26 @@ This patch avoids that situation. --- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + configure.ac | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac -index 7f03170..1bb1a9e 100644 +index 0a67b48..9a5372e 100644 --- a/configure.ac +++ b/configure.ac -@@ -43,7 +43,7 @@ m4_define([mym4_revision_dec], +@@ -37,13 +37,10 @@ m4_define(mym4_version_micro, [0]) + # processing is done by autoconf and not during the configure run. + m4_define(mym4_version, + [mym4_version_major.mym4_version_minor.mym4_version_micro]) +-m4_define([mym4_revision], +- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) ++m4_define([mym4_revision], [0]) + m4_define([mym4_revision_dec], m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) - m4_define([mym4_betastring], - m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\ +-m4_define([mym4_betastring], +- m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\ - awk -F- '$3!=0{print"-beta"$3}'])) -+ awk -F- '$3!=0{print""}'])) ++m4_define([mym4_betastring], []) m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) diff -Nru gpgme1.0-1.6.0/debian/patches/0002-Remove-a-forgotten-instance-of-libsuffix.patch gpgme1.0-1.8.0/debian/patches/0002-Remove-a-forgotten-instance-of-libsuffix.patch --- gpgme1.0-1.6.0/debian/patches/0002-Remove-a-forgotten-instance-of-libsuffix.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0002-Remove-a-forgotten-instance-of-libsuffix.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,29 @@ +From: Heiko Becker +Date: Wed, 16 Nov 2016 23:09:45 +0100 +Subject: Remove a forgotten instance of @libsuffix@ + +* lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove a forgotten +instance of @libsuffix@. +-- + +b2c07bd47bd608afa5cc819b60a7b5bb8c9dd96a removed @libsuffix@ from +cmake config files, but missed one instance. + +Signed-off-by: Heiko Becker +--- + lang/cpp/src/GpgmeppConfig.cmake.in.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in +index 928d19f..cbe9713 100644 +--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in ++++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in +@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED) + + set_target_properties(Gpgmepp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" +- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" ++ INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@" + IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so" + ) + diff -Nru gpgme1.0-1.6.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch --- gpgme1.0-1.6.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0003-fix-build-hang-on-launchpad-buildd.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,57 @@ +From a98951a30a6ae603ffac4ec8c5168aa6d1019933 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Wed, 25 Jan 2017 14:10:18 +0100 +Subject: [PATCH] tests: Use --debug-quick-random for tests + +* tests/start-stop-agent: Don't autostart agent on --stop and +running check. Use --debug-quick-random when starting. + +-- +This should speed up the tests especially on low entropy systems. +Possibly fixing a hang on pythons op_genkey test in the Launchpad +build enviorment (see launchpad issue 1655298) +--- + tests/start-stop-agent | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/tests/start-stop-agent b/tests/start-stop-agent +index ab47d8d..e843ce5 100755 +--- a/tests/start-stop-agent ++++ b/tests/start-stop-agent +@@ -15,11 +15,12 @@ fi + + GPG_AGENT_INFO= + export GPG_AGENT_INFO ++GPG_AGENT=$(which gpg-agent) + + token=$(echo "gpgme-$(pwd)" | tr ' ' '_') + + if [ "$1" = "--stop" ]; then +- if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++ if [ "$(gpg-connect-agent --no-autostart getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "gpg-agent not running" >&2 + exit 0 +@@ -29,15 +30,16 @@ if [ "$1" = "--stop" ]; then + exit 0 + fi + +-if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++if [ "$(gpg-connect-agent --no-autostart getval\ $token /bye 2>/dev/null | head -1)" \ + = "D set" ]; then + echo "gpg-agent already running" >&2 + exit 0 + fi + +-echo "starting gpg-agent " >&2 +-gpg-connect-agent putval\ $token\ set /bye >/dev/null 2>&1 +-if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ ++echo "starting gpg-agent.." >&2 ++ ++gpg-connect-agent --agent-program="${GPG_AGENT}|--debug-quick-random" putval\ $token\ set /bye ++if [ $? -ne 0 -o "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ + != "D set" ]; then + echo "error starting gpg-agent" >&2 + exit 1 +-- +2.8.0.rc3 diff -Nru gpgme1.0-1.6.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch --- gpgme1.0-1.6.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,27 @@ +From f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Thu, 26 Jan 2017 10:44:02 +0100 +Subject: [PATCH] python: Ensure quick-random is used if gpg is gpg2 + +* lang/python/tests/Makefile.am (gpg.conf): Configure +agent-program accordingly. +--- + lang/python/tests/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am +index f9366dd..d7f2e58 100644 +--- a/lang/python/tests/Makefile.am ++++ b/lang/python/tests/Makefile.am +@@ -107,6 +107,8 @@ clean-local: + ./gpg.conf: + # This is required for t-sig-notations. + echo no-force-v3-sigs > ./gpg.conf ++ echo ignore-invalid-option agent-program >> ./gpg.conf ++ echo "agent-program `which $(GPG_AGENT)`|--debug-quick-random" >> ./gpg.conf + + ./gpg-agent.conf: + # This is required for gpg2, which does not support command fd. +-- +2.1.4 + diff -Nru gpgme1.0-1.6.0/debian/patches/0005-tests-Reduce-iterations-threads.patch gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch --- gpgme1.0-1.6.0/debian/patches/0005-tests-Reduce-iterations-threads.patch 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/0005-tests-Reduce-iterations-threads.patch 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,42 @@ +From 7bd6ab4a91d43d7cbf5d347c0c12e0e4f9f7e3bf Mon Sep 17 00:00:00 2001 +From: Andre Heinecke +Date: Mon, 30 Jan 2017 14:19:52 +0100 +Subject: [PATCH] tests: Reduce iterations / threads + +* tests/gpg/t-gpgconf.c (main): Reduce iterations to 10. +* tests/gpg/t-thread-keylist-verify.c, +tests/gpg/t-thread-keylist.c (THREAD_COUNT): Reduce to 10. + +-- +While these tests tested for race conditions a smaller number +of iteration should still show problems if they are run on +multiple systems and regulary. While the 100 Thread count in +the t-thread tests could lead to resource problems. +--- + tests/gpg/t-gpgconf.c | 2 +- + tests/gpg/t-thread-keylist-verify.c | 2 +- + tests/gpg/t-thread-keylist.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/tests/gpg/t-thread-keylist-verify.c ++++ b/tests/gpg/t-thread-keylist-verify.c +@@ -32,7 +32,7 @@ + + #include "t-support.h" + +-#define THREAD_COUNT 100 ++#define THREAD_COUNT 10 + + static const char test_text1[] = "Just GNU it!\n"; + static const char test_sig1[] = +--- a/tests/gpg/t-thread-keylist.c ++++ b/tests/gpg/t-thread-keylist.c +@@ -32,7 +32,7 @@ + + #include "t-support.h" + +-#define THREAD_COUNT 100 ++#define THREAD_COUNT 10 + + void * + start_keylist (void *arg) diff -Nru gpgme1.0-1.6.0/debian/patches/series gpgme1.0-1.8.0/debian/patches/series --- gpgme1.0-1.6.0/debian/patches/series 2015-09-17 07:50:19.000000000 +0000 +++ gpgme1.0-1.8.0/debian/patches/series 2017-02-18 21:22:02.000000000 +0000 @@ -1 +1,5 @@ 0001-avoid-identifying-as-beta.patch +0002-Remove-a-forgotten-instance-of-libsuffix.patch +0003-fix-build-hang-on-launchpad-buildd.patch +0004-Ensure-quick-random-is-used-if-gpg-is-gpg2.patch +0005-tests-Reduce-iterations-threads.patch diff -Nru gpgme1.0-1.6.0/debian/python3-gpg.install gpgme1.0-1.8.0/debian/python3-gpg.install --- gpgme1.0-1.6.0/debian/python3-gpg.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/python3-gpg.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,7 @@ +debian/tmp/usr/lib/python3*/site-packages/gpg*.egg-info usr/lib/python3/dist-packages +debian/tmp/usr/lib/python3*/site-packages/gpg/*.py usr/lib/python3/dist-packages/gpg +debian/tmp/usr/lib/python3*/site-packages/gpg/_gpgme*.so usr/lib/python3/dist-packages/gpg +debian/tmp/usr/lib/python3*/site-packages/gpg/constants/*.py usr/lib/python3/dist-packages/gpg/constants +debian/tmp/usr/lib/python3*/site-packages/gpg/constants/data/*.py usr/lib/python3/dist-packages/gpg/constants/data +debian/tmp/usr/lib/python3*/site-packages/gpg/constants/keylist/*.py usr/lib/python3/dist-packages/gpg/constants/keylist +debian/tmp/usr/lib/python3*/site-packages/gpg/constants/sig/*.py usr/lib/python3/dist-packages/gpg/constants/sig diff -Nru gpgme1.0-1.6.0/debian/python3-pyme.examples gpgme1.0-1.8.0/debian/python3-pyme.examples --- gpgme1.0-1.6.0/debian/python3-pyme.examples 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/python3-pyme.examples 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +lang/python/examples/*.py diff -Nru gpgme1.0-1.6.0/debian/python-gpg.install gpgme1.0-1.8.0/debian/python-gpg.install --- gpgme1.0-1.6.0/debian/python-gpg.install 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/python-gpg.install 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1,7 @@ +debian/tmp/usr/lib/python2.7/site-packages/gpg*.egg-info usr/lib/python2.7/dist-packages +debian/tmp/usr/lib/python2.7/site-packages/gpg/*.py usr/lib/python2.7/dist-packages/gpg +debian/tmp/usr/lib/python2.7/site-packages/gpg/_gpgme*.so usr/lib/python2.7/dist-packages/gpg +debian/tmp/usr/lib/python2.7/site-packages/gpg/constants/*.py usr/lib/python2.7/dist-packages/gpg/constants +debian/tmp/usr/lib/python2.7/site-packages/gpg/constants/data/*.py usr/lib/python2.7/dist-packages/gpg/constants/data +debian/tmp/usr/lib/python2.7/site-packages/gpg/constants/keylist/*.py usr/lib/python2.7/dist-packages/gpg/constants/keylist +debian/tmp/usr/lib/python2.7/site-packages/gpg/constants/sig/*.py usr/lib/python2.7/dist-packages/gpg/constants/sig diff -Nru gpgme1.0-1.6.0/debian/python-pyme.examples gpgme1.0-1.8.0/debian/python-pyme.examples --- gpgme1.0-1.6.0/debian/python-pyme.examples 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/debian/python-pyme.examples 2017-02-18 21:22:02.000000000 +0000 @@ -0,0 +1 @@ +lang/python/examples/*.py diff -Nru gpgme1.0-1.6.0/debian/rules gpgme1.0-1.8.0/debian/rules --- gpgme1.0-1.6.0/debian/rules 2015-07-08 17:17:59.000000000 +0000 +++ gpgme1.0-1.8.0/debian/rules 2017-02-18 21:22:02.000000000 +0000 @@ -1,25 +1,24 @@ #!/usr/bin/make -f -#export DH_VERBOSE=1 - -export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) -export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie,+pic +LDFLAGS=-Wl,-z,relro +export QT_SELECT := qt5 +export DEBIAN_VERSION = $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/.*: //p') %: - dh $@ --with autoreconf --parallel + dh $@ --with autoreconf,python2,python3 override_dh_auto_configure: dh_auto_configure -- \ --enable-static \ + --enable-languages="python cpp qt" \ --infodir=/usr/share/info override_dh_install: - dh_install --list-missing -X.la -Xinfo/dir - -override_dh_installdocs: - help2man -o debian/gpgme-tool.1 -n 'Assuan server exposing GnuPG Made Easy operations' src/gpgme-tool - dh_installdocs -A + dh_install --list-missing -X.la -Xinfo/dir -X.pyc -Xinstall_files.txt -X__pycache__ override_dh_makeshlibs: dh_makeshlibs -V + +override_dh_installdocs: + dh_installdocs -X.md5 diff -Nru gpgme1.0-1.6.0/debian/watch gpgme1.0-1.8.0/debian/watch --- gpgme1.0-1.6.0/debian/watch 2015-07-08 17:17:50.000000000 +0000 +++ gpgme1.0-1.8.0/debian/watch 2017-02-18 21:22:02.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -opts=pasv,pgpsigurlmangle=s/$/.sig/ ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-([\d.]+)\.tar\.bz2 +version=4 +opts=pgpsigurlmangle=s/$/.sig/ https://gnupg.org/ftp/gcrypt/gpgme/gpgme@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru gpgme1.0-1.6.0/doc/ChangeLog-2011 gpgme1.0-1.8.0/doc/ChangeLog-2011 --- gpgme1.0-1.6.0/doc/ChangeLog-2011 2013-03-15 19:27:33.000000000 +0000 +++ gpgme1.0-1.8.0/doc/ChangeLog-2011 2016-10-18 17:22:02.000000000 +0000 @@ -397,7 +397,7 @@ (Listing Keys): Update examples. (Decrypt): Result might also be available when operation failed. (Verify): Result might also be available when operation failed. - All spotted by Stéphane Corthésy. + All spotted by Stéphane Corthésy. 2003-07-22 Marcus Brinkmann diff -Nru gpgme1.0-1.6.0/doc/defsincdate gpgme1.0-1.8.0/doc/defsincdate --- gpgme1.0-1.6.0/doc/defsincdate 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/doc/defsincdate 2016-11-16 12:29:37.000000000 +0000 @@ -0,0 +1 @@ +1479299220 diff -Nru gpgme1.0-1.6.0/doc/gpgme.info gpgme1.0-1.8.0/doc/gpgme.info --- gpgme1.0-1.6.0/doc/gpgme.info 2015-08-26 08:05:19.000000000 +0000 +++ gpgme1.0-1.8.0/doc/gpgme.info 2016-11-16 12:29:43.000000000 +0000 @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.8.0-beta50, last updated 16 November 2016, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.8.0-beta50. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -39,123 +37,130 @@  Indirect: -gpgme.info-1: 1738 -gpgme.info-2: 302237 +gpgme.info-1: 1686 +gpgme.info-2: 314031  Tag Table: (Indirect) -Node: Top1738 -Node: Introduction8990 -Node: Getting Started9780 -Node: Features10905 -Node: Overview12061 -Node: Preparation13170 -Node: Header14167 -Node: Building the Source14914 -Node: Largefile Support (LFS)17087 -Node: Using Automake22501 -Node: Using Libtool24947 -Node: Library Version Check25309 -Node: Signal Handling30403 -Node: Multi Threading31673 -Ref: Multi Threading-Footnote-133907 -Node: Protocols and Engines34330 -Node: Engine Version Check36819 -Node: Engine Information38445 -Node: Engine Configuration42305 -Node: OpenPGP43589 -Node: Cryptographic Message Syntax43929 -Node: Algorithms44227 -Ref: Algorithms-Footnote-144706 -Node: Public Key Algorithms44834 -Node: Hash Algorithms46811 -Node: Error Handling48001 -Node: Error Values49875 -Node: Error Sources55078 -Node: Error Codes57518 -Node: Error Strings62309 -Node: Exchanging Data64116 -Node: Creating Data Buffers65982 -Node: Memory Based Data Buffers66498 -Node: File Based Data Buffers69931 -Node: Callback Based Data Buffers72133 -Node: Destroying Data Buffers77820 -Node: Manipulating Data Buffers79211 -Node: Data Buffer I/O Operations79703 -Node: Data Buffer Meta-Data82430 -Node: Data Buffer Convenience85898 -Node: Contexts87875 -Node: Creating Contexts89061 -Node: Destroying Contexts89908 -Node: Result Management90247 -Node: Context Attributes91676 -Node: Protocol Selection92582 -Node: Crypto Engine93614 -Node: ASCII Armor95457 -Node: Text Mode96081 -Node: Offline Mode97015 -Node: Included Certificates98095 -Node: Key Listing Mode99516 -Node: Passphrase Callback103390 -Node: Progress Meter Callback106602 -Node: Status Message Callback108585 -Node: Locale110305 -Node: Key Management111864 -Node: Listing Keys122757 -Node: Information About Keys130183 -Node: Key Signatures138514 -Node: Manipulating Keys142650 -Node: Generating Keys143510 -Node: Exporting Keys148234 -Node: Importing Keys154934 -Ref: Importing Keys-Footnote-1162371 -Node: Deleting Keys162499 -Node: Changing Passphrases163944 -Node: Advanced Key Editing165233 -Node: Trust Item Management168415 -Node: Listing Trust Items169527 -Node: Information About Trust Items171893 -Node: Manipulating Trust Items173822 -Node: Crypto Operations174801 -Node: Decrypt176065 -Node: Verify179935 -Node: Decrypt and Verify198312 -Node: Sign200380 -Node: Selecting Signers200944 -Node: Creating a Signature202116 -Node: Signature Notation Data206886 -Node: Encrypt209114 -Node: Encrypting a Plaintext209470 -Node: Miscellaneous216144 -Node: Running other Programs216432 -Node: Run Control218456 -Node: Waiting For Completion219200 -Node: Using External Event Loops221318 -Node: I/O Callback Interface223290 -Node: Registering I/O Callbacks228528 -Node: I/O Callback Example230566 -Node: I/O Callback Example GTK+236783 -Node: I/O Callback Example GDK238572 -Node: I/O Callback Example Qt240214 -Node: Cancellation242502 -Node: UI Server Protocol244795 -Ref: UI Server Protocol-Footnote-1246230 -Node: UI Server Encrypt246349 -Node: UI Server Sign251494 -Node: UI Server Decrypt253847 -Node: UI Server Verify255313 -Node: UI Server Set Input Files258885 -Node: UI Server Sign/Encrypt Files259955 -Node: UI Server Verify/Decrypt Files261763 -Node: UI Server Import/Export Keys263639 -Node: UI Server Checksum Files264701 -Node: Miscellaneous UI Server Commands266917 -Ref: command SENDER268848 -Node: Debugging270550 -Node: Library Copying272294 -Node: Copying302237 -Node: Concept Index339983 -Node: Function and Data Index354540 +Node: Top1686 +Node: Introduction9293 +Node: Getting Started10083 +Node: Features11544 +Node: Overview12856 +Node: Preparation13965 +Node: Header14962 +Node: Building the Source15709 +Node: Largefile Support (LFS)17853 +Node: Using Automake23267 +Node: Using Libtool25820 +Node: Library Version Check26182 +Node: Signal Handling32194 +Node: Multi-Threading33464 +Ref: Multi-Threading-Footnote-134880 +Node: Protocols and Engines35303 +Node: Engine Version Check37948 +Node: Engine Information40365 +Node: Engine Configuration44225 +Node: OpenPGP45509 +Node: Cryptographic Message Syntax45849 +Node: Assuan46162 +Node: Algorithms46536 +Ref: Algorithms-Footnote-147015 +Node: Public Key Algorithms47143 +Node: Hash Algorithms49630 +Node: Error Handling50820 +Node: Error Values52694 +Node: Error Sources57897 +Node: Error Codes60337 +Node: Error Strings65128 +Node: Exchanging Data66935 +Node: Creating Data Buffers68801 +Node: Memory Based Data Buffers69317 +Node: File Based Data Buffers72750 +Node: Callback Based Data Buffers74952 +Node: Destroying Data Buffers79143 +Node: Manipulating Data Buffers80631 +Node: Data Buffer I/O Operations81123 +Node: Data Buffer Meta-Data83496 +Node: Data Buffer Convenience87862 +Node: Contexts89839 +Node: Creating Contexts91025 +Node: Destroying Contexts91872 +Node: Result Management92211 +Node: Context Attributes93754 +Node: Protocol Selection94791 +Node: Crypto Engine95823 +Node: Setting the Sender97673 +Node: ASCII Armor99148 +Node: Text Mode99777 +Node: Offline Mode100711 +Node: Pinentry Mode101783 +Node: Included Certificates103468 +Node: Key Listing Mode104890 +Node: Passphrase Callback108982 +Node: Progress Meter Callback112369 +Node: Status Message Callback114354 +Node: Locale118175 +Node: Key Management119734 +Node: Key objects120962 +Node: Listing Keys131962 +Node: Information About Keys139408 +Node: Manipulating Keys140716 +Node: Generating Keys141286 +Node: Signing Keys156760 +Node: Exporting Keys160358 +Node: Importing Keys167051 +Ref: Importing Keys-Footnote-1173956 +Node: Deleting Keys174084 +Node: Changing Passphrases175529 +Node: Changing TOFU Data176818 +Node: Advanced Key Editing178869 +Node: Trust Item Management181518 +Node: Listing Trust Items182554 +Node: Manipulating Trust Items184915 +Node: Crypto Operations185558 +Node: Decrypt186822 +Node: Verify191524 +Node: Decrypt and Verify203484 +Node: Sign206320 +Node: Selecting Signers206884 +Node: Creating a Signature208271 +Node: Signature Notation Data213041 +Node: Encrypt215269 +Node: Encrypting a Plaintext215625 +Node: Miscellaneous222588 +Node: Running other Programs223000 +Node: Using the Assuan protocol225076 +Node: Checking for updates227798 +Node: Run Control232556 +Node: Waiting For Completion233300 +Node: Using External Event Loops235418 +Node: I/O Callback Interface237390 +Node: Registering I/O Callbacks242628 +Node: I/O Callback Example244666 +Node: I/O Callback Example GTK+251291 +Node: I/O Callback Example GDK253080 +Node: I/O Callback Example Qt254722 +Node: Cancellation257010 +Node: UI Server Protocol259280 +Ref: UI Server Protocol-Footnote-1260715 +Node: UI Server Encrypt260834 +Node: UI Server Sign266192 +Node: UI Server Decrypt268545 +Node: UI Server Verify270200 +Node: UI Server Set Input Files273772 +Node: UI Server Sign/Encrypt Files274842 +Node: UI Server Verify/Decrypt Files276650 +Node: UI Server Import/Export Keys278526 +Node: UI Server Checksum Files279588 +Node: Miscellaneous UI Server Commands281804 +Ref: command SENDER283735 +Node: Debugging285437 +Node: Deprecated Functions287186 +Node: Library Copying314031 +Node: Copying342247 +Node: Concept Index379997 +Node: Function and Data Index394776  End Tag Table diff -Nru gpgme1.0-1.6.0/doc/gpgme.info-1 gpgme1.0-1.8.0/doc/gpgme.info-1 --- gpgme1.0-1.6.0/doc/gpgme.info-1 2015-08-26 08:05:19.000000000 +0000 +++ gpgme1.0-1.8.0/doc/gpgme.info-1 2016-11-16 12:29:43.000000000 +0000 @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.8.0-beta50, last updated 16 November 2016, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.8.0-beta50. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -43,8 +41,9 @@ Main Menu ********* -This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG Made -Easy’ Reference Manual’, for Version 1.6.0 of the GPGME library. +This is Edition 1.8.0-beta50, last updated 16 November 2016, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.8.0-beta50 of the +GPGME library. * Menu: @@ -60,6 +59,7 @@ * UI Server Protocol:: The GnuPG UI Server Protocol. * Debugging:: How to solve problems. +* Deprecated Functions:: Documentation of deprecated functions. * Library Copying:: The GNU Lesser General Public License says how you can copy and share ‘GnuPG Made Easy’. @@ -88,7 +88,7 @@ * Using Libtool:: Avoiding compiler options entirely. * Library Version Check:: Getting and verifying the library version. * Signal Handling:: How GPGME affects signal handling. -* Multi Threading:: How GPGME can be used in an MT environment. +* Multi-Threading:: How GPGME can be used in an MT environment. Protocols and Engines @@ -144,6 +144,7 @@ * Protocol Selection:: Selecting the protocol used by a context. * Crypto Engine:: Configuring the crypto engine. +* Setting the Sender:: How to tell the engine the sender. * ASCII Armor:: Requesting ASCII armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. @@ -156,21 +157,22 @@ Key Management +* Key objects:: Description of the key structures. * Listing Keys:: Browsing the list of available keys. * Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. * Manipulating Keys:: Operations on keys. * Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. * Exporting Keys:: Retrieving key data from the key ring. * Importing Keys:: Adding keys to the key ring. * Deleting Keys:: Removing keys from the key ring. * Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. * Advanced Key Editing:: Advanced key edit operation. Trust Item Management * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. Crypto Operations @@ -193,7 +195,9 @@ Miscellaneous -* Running other Programs:: Running other Programs +* Running other Programs:: Running other Programs. +* Using the Assuan protocol:: Using the Assuan protocol. +* Checking for updates:: How to check for software updates. Run Control @@ -256,6 +260,12 @@ examples at the end of the manual, and then only read up those parts of the interface which are unclear. + The documentation for the language bindings is currently not included +in this manual. Those languages bindings follow the general programming +model of GPGME but may provide some extra high level abstraction on top +of the GPGME style API. For now please see the README files in the +‘lang/’ directory of the source distribution. +  File: gpgme.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction @@ -284,6 +294,10 @@ GPGME has been added to a program, it is easy to add support for other crypto protocols once GPGME backends provide them. +it’s language friendly + GPGME comes with languages bindings for several common programming + languages: Common Lisp, C++, Python 2, and Python 3. +  File: gpgme.info, Node: Overview, Prev: Features, Up: Introduction @@ -332,7 +346,7 @@ * Using Libtool:: Avoiding compiler options entirely. * Library Version Check:: Getting and verifying the library version. * Signal Handling:: How GPGME affects signal handling. -* Multi Threading:: How GPGME can be used in an MT environment. +* Multi-Threading:: How GPGME can be used in an MT environment.  File: gpgme.info, Node: Header, Next: Building the Source, Up: Preparation @@ -396,10 +410,14 @@ gcc -o foo foo.c `gpgme-config --cflags --libs` - If you want to link to one of the thread-safe versions of GPGME, you -must specify the ‘--thread’ option before any other option to select the -thread package you want to link with. Supported thread packages are -‘--thread=pth’ and ‘--thread=pthread’. + If you need to detect the installed language bindings you can use +list them using: + + gpgme-config --print-lang + + or test for the availability using + + gpgme-config --have-lang=python && echo 'Bindings for Pythons available'  File: gpgme.info, Node: Largefile Support (LFS), Next: Using Automake, Prev: Building the Source, Up: Preparation @@ -532,7 +550,9 @@ ‘AM_PATH_GPGME_PTHREAD’ checks for the version of GPGME that can be used with the native pthread implementation, and defines - ‘GPGME_PTHREAD_CFLAGS’ and ‘GPGME_PTHREAD_LIBS’. + ‘GPGME_PTHREAD_CFLAGS’ and ‘GPGME_PTHREAD_LIBS’. Since version + 1.8.0 this is no longer required to GPGME_PTHREAD as GPGME itself + is thread safe. This macro searches for ‘gpgme-config’ along the PATH. If you are cross-compiling, it is useful to set the environment variable @@ -616,12 +636,12 @@ called as early as possible — even before ‘gpgme_check_version’. The features are identified by the following values for NAME: - ‘"debug"’ + ‘debug’ To enable debugging use the string “debug†for NAME and VALUE identical to the value used with the environment variable ‘GPGME_DEBUG’. - ‘"disable-gpgconf"’ + ‘disable-gpgconf’ Using this feature with any VALUE disables the detection of the gpgconf program and thus forces GPGME to fallback into the simple OpenPGP only mode. It may be used to force the use of @@ -629,8 +649,8 @@ Note that in general the use of ‘gpgme_set_engine_info’ is a better way to select a specific engine version. - ‘"gpgconf-name"’ - ‘"gpg-name"’ + ‘gpgconf-name’ + ‘gpg-name’ Set the name of the gpgconf respective gpg binary. The defaults are ‘GNU/GnuPG/gpgconf’ and ‘GNU/GnuPG/gpg’. Under Unix the leading directory part is ignored. Under Windows the @@ -638,6 +658,23 @@ directory; the ‘.exe’ suffix is added by GPGME. Use forward slashed even under Windows. + ‘require-gnupg’ + Set the mimimum version of the required GnuPG engine. If that + version is not met, GPGME fails early instead of trying to use + the existant version. The given version must be a string with + major, minor, and micro number. Example: "2.1.0". + + ‘w32-inst-dir’ + On Windows GPGME needs to know its installation directory to + find its spawn helper. This is in general no problem because + a DLL has this information. Some applications however link + statically to GPGME and thus GPGME can only figure out the + installation directory of this application which may be wrong + in certain cases. By supplying an installation directory as + value to this flag, GPGME will assume that that directory is + the installation directory. This flag has no effect on + non-Windows platforms. + This function returns ‘0’ on success. In contrast to other functions the non-zero return value on failure does not convey any error code. For setting “debug†the only possible error cause is @@ -670,7 +707,7 @@ portability to W32 systems.  -File: gpgme.info, Node: Signal Handling, Next: Multi Threading, Prev: Library Version Check, Up: Preparation +File: gpgme.info, Node: Signal Handling, Next: Multi-Threading, Prev: Library Version Check, Up: Preparation 2.7 Signal Handling =================== @@ -695,28 +732,14 @@ either before ‘gpgme_check_version’ is called or afterwards.  -File: gpgme.info, Node: Multi Threading, Prev: Signal Handling, Up: Preparation +File: gpgme.info, Node: Multi-Threading, Prev: Signal Handling, Up: Preparation -2.8 Multi Threading +2.8 Multi-Threading =================== -The GPGME library is not entirely thread-safe, but it can still be used -in a multi-threaded environment if some care is taken. If the following -requirements are met, there should be no race conditions to worry about: - - • GPGME supports the thread libraries pthread and GNU Pth. The - support for this has to be enabled at compile time. GPGME will - automatically detect the location in which the thread libraries are - installed and activate the support for them at build time. - - Support for other thread libraries is very easy to add. Please - contact us if you have the need. - - • If you want to use GPGME with threads, you must link to the right - version of the library. The name of the right library is - ‘libgpgme-’ followed by the name of the thread package you use. - For example, if you use GNU Pth, the right name is ‘libgpgme-pth’. - Use the Automake macros or ‘gpgme-config’ program for simplicity. +The GPGME library is mostly thread-safe, and can be used in a +multi-threaded environment but there are some requirements for +multi-threaded use: • The function ‘gpgme_check_version’ must be called before any other function in the library, because it initializes the thread support @@ -775,10 +798,13 @@ ‘GPGME_PROTOCOL_CMS’ This specifies the Cryptographic Message Syntax. - ‘GPGME_PROTOCOL_ASSUAN’ + ‘GPGME_PROTOCOL_GPGCONF’ Under development. Please ask on for help. + ‘GPGME_PROTOCOL_ASSUAN’ + This specifies the raw Assuan protocol. + ‘GPGME_PROTOCOL_G13’ Under development. Please ask on for help. @@ -809,6 +835,7 @@ * Engine Configuration:: Changing the engine configuration. * OpenPGP:: Support for the OpenPGP protocol. * Cryptographic Message Syntax:: Support for the CMS. +* Assuan:: Support for the raw Assuan protocol.  File: gpgme.info, Node: Engine Version Check, Next: Engine Information, Up: Protocols and Engines @@ -826,9 +853,36 @@ ‘homedir’ Return the default home directory. + ‘sysconfdir’ + Return the name of the system configuration directory + + ‘bindir’ + Return the name of the directory with GnuPG program files. + + ‘libdir’ + Return the name of the directory with GnuPG related library + files. + + ‘libexecdir’ + Return the name of the directory with GnuPG helper program + files. + + ‘datadir’ + Return the name of the directory with GnuPG shared data. + + ‘localedir’ + Return the name of the directory with GnuPG locale data. + ‘agent-socket’ Return the name of the socket to connect to the gpg-agent. + ‘agent-ssh-socket’ + Return the name of the socket to connect to the ssh-agent + component of gpg-agent. + + ‘dirmngr-socket’ + Return the name of the socket to connect to the dirmngr. + ‘uiserver-socket’ Return the name of the socket to connect to the user interface server. @@ -989,7 +1043,7 @@ The OpenPGP protocol is specified by ‘GPGME_PROTOCOL_OpenPGP’.  -File: gpgme.info, Node: Cryptographic Message Syntax, Prev: OpenPGP, Up: Protocols and Engines +File: gpgme.info, Node: Cryptographic Message Syntax, Next: Assuan, Prev: OpenPGP, Up: Protocols and Engines 3.5 Cryptographic Message Syntax ================================ @@ -999,6 +1053,18 @@ The CMS protocol is specified by ‘GPGME_PROTOCOL_CMS’.  +File: gpgme.info, Node: Assuan, Prev: Cryptographic Message Syntax, Up: Protocols and Engines + +3.6 Assuan +========== + +Assuan is the RPC library used by the various GnuPG components. The +Assuan protocol allows one to talk to arbitrary Assuan servers using +GPGME. *Note Using the Assuan protocol::. + + The ASSUAN protocol is specified by ‘GPGME_PROTOCOL_ASSUAN’. + + File: gpgme.info, Node: Algorithms, Next: Error Handling, Prev: Protocols and Engines, Up: Top 4 Algorithms @@ -1065,6 +1131,9 @@ This value indicates ECDH, the Eliptic Curve Diffie-Hellmann encryption algorithm as defined by RFC-6637. + ‘GPGME_PK_EDDSA’ + This value indicates the EdDSA algorithm. + -- Function: const char * gpgme_pubkey_algo_name (gpgme_pubkey_algo_t ALGO) The function ‘gpgme_pubkey_algo_name’ returns a pointer to a @@ -1074,6 +1143,13 @@ If ALGO is not a valid public key algorithm, ‘NULL’ is returned. + -- Function: char * gpgme_pubkey_algo_string (gpgme_subkey_t KEY) + The function ‘gpgme_pubkey_algo_string’ is a convenience function + to build and return an algorithm string in the same way GnuPG does + (e.g. “rsa2048†or “ed25519â€). The caller must free the result + using ‘gpgme_free’. On error (e.g. invalid argument or memory + exhausted), the function returns NULL and sets ‘ERRNO’. +  File: gpgme.info, Node: Hash Algorithms, Prev: Public Key Algorithms, Up: Algorithms @@ -1764,33 +1840,6 @@ object was successfully created, and ‘GPG_ERR_ENOMEM’ if not enough memory is available. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: gpgme_error_t gpgme_data_new_with_read_cb - (gpgme_data_t *DH, int (*READFUNC) (void *HOOK, char *BUFFER, - size_t COUNT, size_t *NREAD), void *HOOK_VALUE) - The function ‘gpgme_data_new_with_read_cb’ creates a new - ‘gpgme_data_t’ object and uses the callback function READFUNC to - retrieve the data on demand. As the callback function can supply - the data in any way it wants, this is the most flexible data type - GPGME provides. However, it can not be used to write data. - - The callback function receives HOOK_VALUE as its first argument - whenever it is invoked. It should return up to COUNT bytes in - BUFFER, and return the number of bytes actually read in NREAD. It - may return ‘0’ in NREAD if no data is currently available. To - indicate ‘EOF’ the function should return with an error code of - ‘-1’ and set NREAD to ‘0’. The callback function may support to - reset its internal read pointer if it is invoked with BUFFER and - NREAD being ‘NULL’ and COUNT being ‘0’. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the data - object was successfully created, ‘GPG_ERR_INV_VALUE’ if DH or - READFUNC is not a valid pointer, and ‘GPG_ERR_ENOMEM’ if not enough - memory is available. -  File: gpgme.info, Node: Destroying Data Buffers, Next: Manipulating Data Buffers, Prev: Creating Data Buffers, Up: Exchanging Data @@ -1818,9 +1867,10 @@ -- Function: void gpgme_free (void *BUFFER) The function ‘gpgme_free’ releases the memory returned by - ‘gpgme_data_release_and_get_mem’. It should be used instead of the - system libraries ‘free’ function in case different allocators are - used in a single program. + ‘gpgme_data_release_and_get_mem’ and ‘gpgme_pubkey_algo_string’. + It should be used instead of the system libraries ‘free’ function + in case different allocators are used by a program. This is often + the case if gpgme is used under Windows as a DLL.  File: gpgme.info, Node: Manipulating Data Buffers, Prev: Destroying Data Buffers, Up: Exchanging Data @@ -1894,15 +1944,6 @@ If the function fails, -1 is returned and ERRNO is set. - The following function is deprecated and should not be used. It will -be removed in a future version of GPGME. - - -- Function: gpgme_error_t gpgme_data_rewind (gpgme_data_t DH) - The function ‘gpgme_data_rewind’ is equivalent to: - - return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) - ? gpgme_error_from_errno (errno) : 0; -  File: gpgme.info, Node: Data Buffer Meta-Data, Next: Data Buffer Convenience, Prev: Data Buffer I/O Operations, Up: Manipulating Data Buffers @@ -1956,6 +1997,9 @@ This specifies that the data is encoded in an armored form as used by OpenPGP and PEM. + ‘GPGME_DATA_ENCODING_MIME’ + This specifies that the data is encoded as a MIME part. + ‘GPGME_DATA_ENCODING_URL’ The data is a list of linefeed delimited URLs. This is only useful with ‘gpgme_op_import’. @@ -1980,6 +2024,24 @@ The function ‘gpgme_data_set_encoding’ changes the encoding of the data object with the handle DH to ENC. + -- Function: gpgme_error_t gpgme_data_set_flag (gpgme_data_t DH, + const char *NAME, const char *VALUE) + + Some minor properties of the data object can be controlled with + flags set by this function. The properties are identified by the + following values for NAME: + + ‘size-hint’ + The value is a decimal number with the length gpgme shall + assume for this data object. This is useful if the data is + provided by callbacks or via file descriptors but the + applications knows the total size of the data. If this is set + the OpenPGP engine may use this to decide on buffer allocation + strategies and to provide a total value for its progress + information. + + This function returns ‘0’ on success. +  File: gpgme.info, Node: Data Buffer Convenience, Prev: Data Buffer Meta-Data, Up: Manipulating Data Buffers @@ -2091,10 +2153,11 @@ The detailed result of an operation is returned in operation-specific structures such as ‘gpgme_decrypt_result_t’. The corresponding retrieval functions such as ‘gpgme_op_decrypt_result’ provide static -access to the results after an operation completes. The following -interfaces make it possible to detach a result structure from its -associated context and give it a lifetime beyond that of the current -operation or context. +access to the results after an operation completes. Those structures +shall be considered read-only and an application must not allocate such +a structure on its own. The following interfaces make it possible to +detach a result structure from its associated context and give it a +lifetime beyond that of the current operation or context. -- Function: void gpgme_result_ref (void *RESULT) The function ‘gpgme_result_ref’ acquires an additional reference @@ -2123,9 +2186,11 @@ * Protocol Selection:: Selecting the protocol used by a context. * Crypto Engine:: Configuring the crypto engine. +* Setting the Sender:: How to tell the engine the sender. * ASCII Armor:: Requesting ASCII armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. +* Pinentry Mode:: Choosing the pinentry mode. * Included Certificates:: Including a number of certificates. * Key Listing Mode:: Selecting key listing mode. * Passphrase Callback:: Getting the passphrase from the user. @@ -2159,7 +2224,7 @@ use with the context CTX.  -File: gpgme.info, Node: Crypto Engine, Next: ASCII Armor, Prev: Protocol Selection, Up: Context Attributes +File: gpgme.info, Node: Crypto Engine, Next: Setting the Sender, Prev: Protocol Selection, Up: Context Attributes 7.4.2 Crypto Engine ------------------- @@ -2203,9 +2268,42 @@ successful, or an eror code on failure.  -File: gpgme.info, Node: ASCII Armor, Next: Text Mode, Prev: Crypto Engine, Up: Context Attributes +File: gpgme.info, Node: Setting the Sender, Next: ASCII Armor, Prev: Crypto Engine, Up: Context Attributes + +7.4.3 How to tell the engine the sender. +---------------------------------------- + +Some engines can make use of the sender’s address, for example to figure +out the best user id in certain trust models. For verification and +signing of mails, it is thus suggested to let the engine know the sender +("From:") address. GPGME provides two functions to accomplish that. +Note that the esoteric use of multiple "From:" addresses is not +supported. + + -- Function: gpgme_error_t gpgme_set_sender (gpgme_ctx_t CTX, + int ADDRESS) + + The function ‘gpgme_set_sender’ specifies the sender address for + use in sign and verify operations. ADDRESS is expected to be the + “addr-spec†part of an address but my also be a complete mailbox + address, in which case this function extracts the “addr-spec†from + it. Using ‘NULL’ for ADDRESS clears the sender address. + + The function returns 0 on success or an error code on failure. The + most likely failure is that no valid “addr-spec†was found in + ADDRESS. + + -- Function: const char * gpgme_get_sender (gpgme_ctx_t CTX) + + The function ‘gpgme_get_sender’ returns the current sender address + from the context, or NULL if none was set. The returned value is + valid as long as the CTX is valid and ‘gpgme_set_sender’ has not + been called again. + + +File: gpgme.info, Node: ASCII Armor, Next: Text Mode, Prev: Setting the Sender, Up: Context Attributes -7.4.3 ASCII Armor +7.4.4 ASCII Armor ----------------- -- Function: void gpgme_set_armor (gpgme_ctx_t CTX, int YES) @@ -2222,7 +2320,7 @@  File: gpgme.info, Node: Text Mode, Next: Offline Mode, Prev: ASCII Armor, Up: Context Attributes -7.4.4 Text Mode +7.4.5 Text Mode --------------- -- Function: void gpgme_set_textmode (gpgme_ctx_t CTX, int YES) @@ -2244,9 +2342,9 @@ is enabled, and ‘0’ if it is not, or if CTX is not a valid pointer.  -File: gpgme.info, Node: Offline Mode, Next: Included Certificates, Prev: Text Mode, Up: Context Attributes +File: gpgme.info, Node: Offline Mode, Next: Pinentry Mode, Prev: Text Mode, Up: Context Attributes -7.4.5 Offline Mode +7.4.6 Offline Mode ------------------ -- Function: void gpgme_set_offline (gpgme_ctx_t CTX, int YES) @@ -2271,9 +2369,54 @@ enabled, and ‘0’ if it is not, or if CTX is not a valid pointer.  -File: gpgme.info, Node: Included Certificates, Next: Key Listing Mode, Prev: Offline Mode, Up: Context Attributes +File: gpgme.info, Node: Pinentry Mode, Next: Included Certificates, Prev: Offline Mode, Up: Context Attributes + +7.4.7 Pinentry Mode +------------------- + + -- Function: gpgme_error_t gpgme_set_pinentry_mode (gpgme_ctx_t CTX, + gpgme_pinentry_mode_t MODE) The function ‘gpgme_set_pinentry_mode’ + specifies the pinentry mode to be used. + + For GnuPG >= 2.1 this option is required to be set to + ‘GPGME_PINENTRY_MODE_LOOPBACK’ to enable the passphrase callback + mechanism in GPGME through ‘gpgme_set_passphrase_cb’. + + -- Function: gpgme_pinentry_mode_t gpgme_get_pinentry_mode + (gpgme_ctx_t CTX) + The function ‘gpgme_get_pinenty_mode’ returns the mode set for the + context. + + -- Data type: enum gpgme_pinentry_mode_t + The ‘gpgme_minentry_mode_t’ type specifies the set of possible + pinentry modes that are supported by GPGME if GnuPG >= 2.1 is used. + The following modes are supported: + + ‘GPGME_PINENTRY_MODE_DEFAULT’ + Use the default of the agent, which is ask. + + ‘GPGME_PINENTRY_MODE_ASK’ + Force the use of the Pinentry. + + ‘GPGME_PINENTRY_MODE_CANCEL’ + Emulate use of Pinentry’s cancel button. + + ‘GPGME_PINENTRY_MODE_ERROR’ + Return a Pinentry error ‘No Pinentry’. + + ‘GPGME_PINENTRY_MODE_LOOPBACK’ + Redirect Pinentry queries to the caller. This enables the use + of ‘gpgme_set_passphrase_cb’ whis pinentry queries redirected + to gpgme. + + Note: This mode requires ‘allow-loopback-pinentry’ to be + enabled in the ‘gpg-agent.conf’ or an agent started with that + option. + + +File: gpgme.info, Node: Included Certificates, Next: Key Listing Mode, Prev: Pinentry Mode, Up: Context Attributes -7.4.6 Included Certificates +7.4.8 Included Certificates --------------------------- -- Function: void gpgme_set_include_certs (gpgme_ctx_t CTX, @@ -2311,7 +2454,7 @@  File: gpgme.info, Node: Key Listing Mode, Next: Passphrase Callback, Prev: Included Certificates, Up: Context Attributes -7.4.7 Key Listing Mode +7.4.9 Key Listing Mode ---------------------- -- Function: gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t CTX, @@ -2343,6 +2486,11 @@ in the listed keys. This only works if ‘GPGME_KEYLIST_MODE_SIGS’ is also enabled. + ‘GPGME_KEYLIST_MODE_WITH_TOFU’ + The ‘GPGME_KEYLIST_MODE_WITH_TOFU’ symbol specifies that + information pertaining to the TOFU trust model should be + included in the listed keys. + ‘GPGME_KEYLIST_MODE_WITH_SECRET’ The ‘GPGME_KEYLIST_MODE_WITH_SECRET’ returns information about the presence of a corresponding secret key in a public key @@ -2389,8 +2537,8 @@  File: gpgme.info, Node: Passphrase Callback, Next: Progress Meter Callback, Prev: Key Listing Mode, Up: Context Attributes -7.4.8 Passphrase Callback -------------------------- +7.4.10 Passphrase Callback +-------------------------- -- Data type: gpgme_error_t (*gpgme_passphrase_cb_t)(void *HOOK, const char *UID_HINT, const char *PASSPHRASE_INFO, int PREV_WAS_BAD, @@ -2437,6 +2585,10 @@ even support an external passphrase callback at all, in this case the error code ‘GPG_ERR_NOT_SUPPORTED’ is returned. + For GnuPG >= 2.1 the pinentry mode has to be set to + ‘GPGME_PINENTRY_MODE_LOOPBACK’ to enable the passphrase callback. + See ‘gpgme_set_pinentry_mode’. + The user can disable the use of a passphrase callback function by calling ‘gpgme_set_passphrase_cb’ with PASSFUNC being ‘NULL’. @@ -2454,8 +2606,8 @@  File: gpgme.info, Node: Progress Meter Callback, Next: Status Message Callback, Prev: Passphrase Callback, Up: Context Attributes -7.4.9 Progress Meter Callback ------------------------------ +7.4.11 Progress Meter Callback +------------------------------ -- Data type: void (*gpgme_progress_cb_t)(void *HOOK, const char *WHAT, int TYPE, int CURRENT, int TOTAL) @@ -2496,7 +2648,7 @@  File: gpgme.info, Node: Status Message Callback, Next: Locale, Prev: Progress Meter Callback, Up: Context Attributes -7.4.10 Status Message Callback +7.4.12 Status Message Callback ------------------------------ -- Data type: gpgme_error_t (*gpgme_status_cb_t)(void *HOOK, const char @@ -2530,10 +2682,55 @@ message callback is set, or CTX is not a valid pointer, ‘NULL’ is returned in both variables. + -- Function: gpgme_error_t gpgme_set_ctx_flag (gpgme_ctx_t CTX, + const char *NAME, const char *VALUE) + + Some minor properties of the context can be controlled with flags + set by this function. The properties are identified by the + following values for NAME: + + ‘"full-status"’ + Using a VALUE of "1" the status callback set by + gpgme_set_status_cb returns all status lines with the + exception of PROGRESS lines. With the default of "0" the + status callback is only called in certain situations. + + ‘"raw-description"’ + Setting the VALUE to "1" returns human readable strings in a + raw format. For example the non breaking space characters + ("~") will not be removed from the ‘description’ field of the + ‘gpgme_tofu_info_t’ object. + + ‘"export-session-key"’ + Using a VALUE of "1" specifies that the context should try to + export the symmetric session key when decrypting data. By + default, or when using an empty string or "0" for VALUE, + session keys are not exported. + + ‘"override-session-key"’ + The string given in VALUE is passed to the GnuPG engine to + override the session key for decryption. The format of that + session key is specific to GnuPG and can be retrieved during a + decrypt operation when the context flag "export-session-key" + is enabled. Please be aware that using this feature with + GnuPG < 2.1.16 will leak the session key on many platforms via + ps(1). + + This function returns ‘0’ on success. + + -- Function: const char * gpgme_get_ctx_flag (gpgme_ctx_t CTX, + const char *NAME) + + The value of flags settable by ‘gpgme_set_ctx_flag’ can be + retrieved by this function. If NAME is unknown the function + returns ‘NULL’. For boolean flags an empty string is returned for + False and the string "1" is returned for True; either atoi(3) or a + test for an empty string can be used to get the boolean value. +  File: gpgme.info, Node: Locale, Prev: Status Message Callback, Up: Context Attributes -7.4.11 Locale +7.4.13 Locale ------------- A locale setting can be associated with a context. This locale is @@ -2578,13 +2775,123 @@ that should be used for the operation. The following section describes how such keys can be selected and manipulated. +* Menu: + +* Key objects:: Description of the key structures. +* Listing Keys:: Browsing the list of available keys. +* Information About Keys:: Requesting detailed information about keys. +* Manipulating Keys:: Operations on keys. +* Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. +* Exporting Keys:: Retrieving key data from the key ring. +* Importing Keys:: Adding keys to the key ring. +* Deleting Keys:: Removing keys from the key ring. +* Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. +* Advanced Key Editing:: Advanced key edit operation. + + +File: gpgme.info, Node: Key objects, Next: Listing Keys, Up: Key Management + +7.5.1 Key objects +----------------- + +The keys are represented in GPGME by structures which may only be read +by the application but never be allocated or changed. They are valid as +long as the key object itself is valid. + + -- Data type: gpgme_key_t + + The ‘gpgme_key_t’ type is a pointer to a key object. It has the + following members: + + ‘gpgme_keylist_mode_t keylist_mode’ + The keylist mode that was active when the key was retrieved. + + ‘unsigned int revoked : 1’ + This is true if the key is revoked. + + ‘unsigned int expired : 1’ + This is true if the key is expired. + + ‘unsigned int disabled : 1’ + This is true if the key is disabled. + + ‘unsigned int invalid : 1’ + This is true if the key is invalid. This might have several + reasons, for a example for the S/MIME backend, it will be set + during key listings if the key could not be validated due to + missing certificates or unmatched policies. + + ‘unsigned int can_encrypt : 1’ + This is true if the key (ie one of its subkeys) can be used + for encryption. + + ‘unsigned int can_sign : 1’ + This is true if the key (ie one of its subkeys) can be used to + create data signatures. + + ‘unsigned int can_certify : 1’ + This is true if the key (ie one of its subkeys) can be used to + create key certificates. + + ‘unsigned int can_authenticate : 1’ + This is true if the key (ie one of its subkeys) can be used + for authentication. + + ‘unsigned int is_qualified : 1’ + This is true if the key can be used for qualified signatures + according to local government regulations. + + ‘unsigned int secret : 1’ + This is true if the key is a secret key. Note, that this will + always be true even if the corresponding subkey flag may be + false (offline/stub keys). This is only set if a listing of + secret keys has been requested or if + ‘GPGME_KEYLIST_MODE_WITH_SECRET’ is active. + + ‘gpgme_protocol_t protocol’ + This is the protocol supported by this key. + + ‘char *issuer_serial’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer + serial. + + ‘char *issuer_name’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer + name. + + ‘char *chain_id’ + If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the chain + ID, which can be used to built the certificate chain. + + ‘gpgme_validity_t owner_trust’ + If ‘protocol’ is ‘GPGME_PROTOCOL_OpenPGP’, then this is the + owner trust. + + ‘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. + + ‘gpgme_user_id_t uids’ + This is a linked list with the user IDs of the key. The first + user ID in the list is the main (or primary) user ID. + + ‘char *fpr’ + This field gives the fingerprint of the primary key. Note + that this is a copy of the fingerprint of the first subkey. + For an incomplete key (for example from a verification result) + a subkey may be missing but this field may be set + nevertheless. + -- 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 subkey in - the linked list is also called the primary key. + + The ‘gpgme_subkey_t’ type is a pointer to a subkey structure. + Subkeys 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 + subkey in the linked list is also called the primary key. The subkey structure has the following members: @@ -2642,6 +2949,10 @@ This is the fingerprint of the subkey in hexadecimal digits, if available. + ‘char *keygrip’ + The keygrip of the subkey in hex digit form or ‘NULL’ if not + availabale. + ‘long int timestamp’ This is the creation timestamp of the subkey. This is -1 if the timestamp is invalid, and 0 if it is not available. @@ -2657,12 +2968,59 @@ The serial number of a smart card holding this key or ‘NULL’. ‘char *curve’ - For ECC algoritms the name of the curve. + For ECC algorithms the name of the curve. + + -- Data type: gpgme_user_id_t + + A user ID is a component of a ‘gpgme_key_t’ object. One key can + have many user IDs. The first one in the list is the main (or + primary) user ID. + + The user ID structure has the following members. + + ‘gpgme_user_id_t next’ + This is a pointer to the next user ID structure in the linked + list, or ‘NULL’ if this is the last element. + + ‘unsigned int revoked : 1’ + This is true if the user ID is revoked. + + ‘unsigned int invalid : 1’ + This is true if the user ID is invalid. + + ‘gpgme_validity_t validity’ + This specifies the validity of the user ID. + + ‘char *uid’ + This is the user ID string. + + ‘char *name’ + This is the name component of ‘uid’, if available. + + ‘char *comment’ + This is the comment component of ‘uid’, if available. + + ‘char *email’ + This is the email component of ‘uid’, if available. + + ‘char *address;’ + The mail address (addr-spec from RFC-5322) of the user ID + string. This is general the same as the ‘email’ part of this + structure but might be slightly different. If no mail address + is available ‘NULL’ is stored. + + ‘gpgme_tofu_info_t tofu’ + If not ‘NULL’ information from the TOFU database pertaining to + this user id. + + ‘gpgme_key_sig_t signatures’ + This is a linked list with the signatures on this user ID. -- Data type: gpgme_key_sig_t + The ‘gpgme_key_sig_t’ type is a pointer to a key signature structure. Key signatures are one component of a ‘gpgme_key_t’ - object, and validate user IDs on the key. + object, and validate user IDs on the key in the OpenPGP protocol. The signatures on a key are only available if the key was retrieved via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode @@ -2732,151 +3090,27 @@ ‘gpgme_sig_notation_t notations’ This is a linked list with the notation data and policy URLs. - -- Data type: gpgme_user_id_t - A user ID is a component of a ‘gpgme_key_t’ object. One key can - have many user IDs. The first one in the list is the main (or - primary) user ID. + +File: gpgme.info, Node: Listing Keys, Next: Information About Keys, Prev: Key objects, Up: Key Management - The user ID structure has the following members. +7.5.2 Listing Keys +------------------ - ‘gpgme_user_id_t next’ - This is a pointer to the next user ID structure in the linked - list, or ‘NULL’ if this is the last element. + -- Function: gpgme_error_t gpgme_op_keylist_start (gpgme_ctx_t CTX, + const char *PATTERN, int SECRET_ONLY) + The function ‘gpgme_op_keylist_start’ initiates a key listing + operation inside the context CTX. It sets everything up so that + subsequent invocations of ‘gpgme_op_keylist_next’ return the keys + in the list. - ‘unsigned int revoked : 1’ - This is true if the user ID is revoked. - - ‘unsigned int invalid : 1’ - This is true if the user ID is invalid. - - ‘gpgme_validity_t validity’ - This specifies the validity of the user ID. - - ‘char *uid’ - This is the user ID string. - - ‘char *name’ - This is the name component of ‘uid’, if available. - - ‘char *comment’ - This is the comment component of ‘uid’, if available. - - ‘char *email’ - This is the email component of ‘uid’, if available. - - ‘gpgme_key_sig_t signatures’ - This is a linked list with the signatures on this user ID. - - -- Data type: gpgme_key_t - The ‘gpgme_key_t’ type is a pointer to a key object. It has the - following members: - - ‘gpgme_keylist_mode_t keylist_mode’ - The keylist mode that was active when the key was retrieved. - - ‘unsigned int revoked : 1’ - This is true if the key is revoked. - - ‘unsigned int expired : 1’ - This is true if the key is expired. - - ‘unsigned int disabled : 1’ - This is true if the key is disabled. - - ‘unsigned int invalid : 1’ - This is true if the key is invalid. This might have several - reasons, for a example for the S/MIME backend, it will be set - in during key listsing if the key could not be validated due - to a missing certificates or unmatched policies. - - ‘unsigned int can_encrypt : 1’ - This is true if the key (ie one of its subkeys) can be used - for encryption. - - ‘unsigned int can_sign : 1’ - This is true if the key (ie one of its subkeys) can be used to - create data signatures. - - ‘unsigned int can_certify : 1’ - This is true if the key (ie one of its subkeys) can be used to - create key certificates. - - ‘unsigned int can_authenticate : 1’ - This is true if the key (ie one of its subkeys) can be used - for authentication. - - ‘unsigned int is_qualified : 1’ - This is true if the key can be used for qualified signatures - according to local government regulations. - - ‘unsigned int secret : 1’ - This is true if the key is a secret key. Note, that this will - always be true even if the corresponding subkey flag may be - false (offline/stub keys). This is only set if a listing of - secret keys has been requested or if - ‘GPGME_KEYLIST_MODE_WITH_SECRET’ is active. - - ‘gpgme_protocol_t protocol’ - This is the protocol supported by this key. - - ‘char *issuer_serial’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer - serial. - - ‘char *issuer_name’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the issuer - name. - - ‘char *chain_id’ - If ‘protocol’ is ‘GPGME_PROTOCOL_CMS’, then this is the chain - ID, which can be used to built the certificate chain. - - ‘gpgme_validity_t owner_trust’ - If ‘protocol’ is ‘GPGME_PROTOCOL_OpenPGP’, then this is the - owner trust. - - ‘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. - - ‘gpgme_user_id_t uids’ - This is a linked list with the user IDs of the key. The first - user ID in the list is the main (or primary) user ID. - -* Menu: - -* Listing Keys:: Browsing the list of available keys. -* Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. -* Manipulating Keys:: Operations on keys. -* Generating Keys:: Creating new key pairs. -* Exporting Keys:: Retrieving key data from the key ring. -* Importing Keys:: Adding keys to the key ring. -* Deleting Keys:: Removing keys from the key ring. -* Changing Passphrases:: Change the passphrase of a key. -* Advanced Key Editing:: Advanced key edit operation. - - -File: gpgme.info, Node: Listing Keys, Next: Information About Keys, Up: Key Management - -7.5.1 Listing Keys ------------------- - - -- Function: gpgme_error_t gpgme_op_keylist_start (gpgme_ctx_t CTX, - const char *PATTERN, int SECRET_ONLY) - The function ‘gpgme_op_keylist_start’ initiates a key listing - operation inside the context CTX. It sets everything up so that - subsequent invocations of ‘gpgme_op_keylist_next’ return the keys - in the list. - - If PATTERN is ‘NULL’, all available keys are returned. Otherwise, - PATTERN contains an engine specific expression that is used to - limit the list to all keys matching the pattern. Note that the - total length of the pattern is restricted to an engine-specific - maximum (a couple of hundred characters are usually accepted). The - pattern should be used to restrict the search to a certain common - name or user, not to list many specific keys at once by listing - their fingerprints or key IDs. + If PATTERN is ‘NULL’, all available keys are returned. Otherwise, + PATTERN contains an engine specific expression that is used to + limit the list to all keys matching the pattern. Note that the + total length of the pattern is restricted to an engine-specific + maximum (a couple of hundred characters are usually accepted). The + pattern should be used to restrict the search to a certain common + name or user, not to list many specific keys at once by listing + their fingerprints or key IDs. If SECRET_ONLY is not ‘0’, the list is restricted to secret keys only. @@ -3020,9 +3254,9 @@ operation there was not enough memory available.  -File: gpgme.info, Node: Information About Keys, Next: Key Signatures, Prev: Listing Keys, Up: Key Management +File: gpgme.info, Node: Information About Keys, Next: Manipulating Keys, Prev: Listing Keys, Up: Key Management -7.5.2 Information About Keys +7.5.3 Information About Keys ---------------------------- Please see the beginning of this section for more information about @@ -3056,343 +3290,282 @@ The user ID is ultimately valid. The string representation of this validity is “uâ€. - The following interfaces are deprecated and only provided for -backward compatibility. Don’t use them. They will be removed in a -future version of GPGME. - - -- Data type: gpgme_attr_t - The ‘gpgme_attr_t’ type is used to specify a key or trust item - attribute. The following attributes are defined: + +File: gpgme.info, Node: Manipulating Keys, Next: Generating Keys, Prev: Information About Keys, Up: Key Management - ‘GPGME_ATTR_KEYID’ - This is the key ID of a sub key. It is representable as a - string. +7.5.4 Manipulating Keys +----------------------- - For trust items, the trust item refers to the key with this - ID. + -- Function: void gpgme_key_ref (gpgme_key_t KEY) + The function ‘gpgme_key_ref’ acquires an additional reference for + the key KEY. - ‘GPGME_ATTR_FPR’ - This is the fingerprint of a sub key. It is representable as - a string. + -- Function: void gpgme_key_unref (gpgme_key_t KEY) + The function ‘gpgme_key_unref’ releases a reference for the key + KEY. If this was the last reference, the key will be destroyed and + all resources associated to it will be released. - ‘GPGME_ATTR_ALGO’ - This is the crypto algorithm for which the sub key can be - used. It is representable as a string and as a number. The - numbers correspond to the ‘enum gcry_pk_algos’ values in the - gcrypt library. + +File: gpgme.info, Node: Generating Keys, Next: Signing Keys, Prev: Manipulating Keys, Up: Key Management - ‘GPGME_ATTR_LEN’ - This is the key length of a sub key. It is representable as a - number. +7.5.5 Generating Keys +--------------------- - ‘GPGME_ATTR_CREATED’ - This is the timestamp at creation time of a sub key. It is - representable as a number. +GPGME provides a set of functions to create public key pairs. Most of +these functions require the use of GnuPG 2.1 and later; for older GnuPG +versions the ‘gpgme_op_genkey’ function can be used. Existing code +which wants to update to the new functions or new code which shall +supports older GnuPG versions may try the new functions first and +provide a fallback to the old function if the error code +‘GPG_ERR_NOT_SUPPORTED’ is received. + + -- Function: gpgme_error_t gpgme_op_createkey (gpgme_ctx_t CTX, + const char *USERID, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, gpgme_key_t EXTRAKEY, + unsigned int FLAGS); + + The function ‘gpgme_op_createkey’ generates a new key for the + procotol active in the context CTX. As of now this function does + only work for OpenPGP and requires at least version 2.1.13 of + GnuPG. + + USERID is commonly the mail address associated with the key. GPGME + does not require a specificy syntax but if more than a mail address + is given, RFC-822 style format is suggested. The value is expected + to be in UTF-8 encoding (i.e. no IDN encoding for mail addresses). + This is a required parameter. + + ALGO specifies the algorithm for the new key (actually a keypair of + public and private key). For a list of supported algorithms, see + the GnuPG manual. If ALGO is ‘NULL’ or the string "default", the + key is generated using the default algorithm of the engine. If the + string "future-default" is used the engine may use an algorithm + which is planned to be the default in a future release of the + engine; however existing implementation of the protocol may not be + able to already handle such future algorithms. For the OpenPGP + protocol, the specification of a default algorithm, without + requesting a non-default usage via FLAGS, triggers the creation of + a primary key plus a secondary key (subkey). + + RESERVED must be set to zero. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new key. Using 0 does not + set an expiration date. Note that this parameter takes an unsigned + long value and not a ‘time_t’ to avoid problems on systems which + use a signed 32 bit ‘time_t’. Note further that the OpenPGP + protocol uses 32 bit values for timestamps and thus can only encode + dates up to the year 2106. + + EXTRAKEY is currently not used and must be set to ‘NULL’. A future + version of GPGME may use this parameter to create X.509 keys. + + FLAGS can be set to the bit-wise OR of the following flags: + + ‘GPGME_CREATE_SIGN’ + ‘GPGME_CREATE_ENCR’ + ‘GPGME_CREATE_CERT’ + ‘GPGME_CREATE_AUTH’ + Do not create the key with the default capabilities (key + usage) of the requested algorithm but use those explicitly + given by these flags: “signingâ€, “encryptionâ€, + “certificationâ€, or “authenticationâ€. The allowed + combinations depend on the algorithm. + + If any of these flags are set and a default algorithm has been + selected only one key is created in the case of the OpenPGP + protocol. + + ‘GPGME_CREATE_NOPASSWD’ + Request generation of the key without password protection. + + ‘GPGME_CREATE_SELFSIGNED’ + For an X.509 key do not create a CSR but a self-signed + certificate. This has not yet been implemented. + + ‘GPGME_CREATE_NOSTORE’ + Do not store the created key in the local key database. This + has not yet been implemented. + + ‘GPGME_CREATE_WANTPUB’ + ‘GPGME_CREATE_WANTSEC’ + Return the public or secret key as part of the result + structure. This has not yet been implemented. + + ‘GPGME_CREATE_FORCE’ + The engine does not allow the creation of a key with a user ID + already existing in the local key database. This flag can be + used to override this check. + + After the operation completed successfully, information about the + created key can be retrieved with ‘gpgme_op_genkey_result’. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_createkey_start (gpgme_ctx_t CTX, + const char *USERID, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, gpgme_key_t EXTRAKEY, + unsigned int FLAGS); + + The function ‘gpgme_op_createkey_start’ initiates a + ‘gpgme_op_createkey’ operation; see there for details. It must be + completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + -- Function: gpgme_error_t gpgme_op_createsubkey (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *ALGO, unsigned long RESERVED, + unsigned long EXPIRES, unsigned int FLAGS); + + The function ‘gpgme_op_createsubkey’ creates and adds a new subkey + to the primary OpenPGP key given by KEY. The only allowed protocol + in CTX is ‘GPGME_PROTOCOL_OPENPGP’. Subkeys (aka secondary keys) + are a concept in the OpenPGP protocol to bind several keys to a + primary key. As of now this function requires at least version + 2.1.13 of GnuPG. + + KEY specifies the key to operate on. + + ALGO specifies the algorithm for the new subkey. For a list of + supported algorithms, see the GnuPG manual. If ALGO is ‘NULL’ or + the string "default", the subkey is generated using the default + algorithm for an encryption subkey of the engine. If the string + "future-default" is used the engine may use an encryption algorithm + which is planned to be the default in a future release of the + engine; however existing implementation of the protocol may not be + able to already handle such future algorithms. + + RESERVED must be set to zero. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new subkey. Using 0 does + not set an expiration date. Note that this parameter takes an + unsigned long value and not a ‘time_t’ to avoid problems on systems + which use a signed 32 bit ‘time_t’. Note further that the OpenPGP + protocol uses 32 bit values for timestamps and thus can only encode + dates up to the year 2106. + + FLAGS takes the same values as described above for + ‘gpgme_op_createkey’. + + After the operation completed successfully, information about the + created key can be retrieved with ‘gpgme_op_genkey_result’. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_createsubkey_start + (gpgme_ctx_t CTX, gpgme_key_t KEY, const char *ALGO, + unsigned long RESERVED, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_createsubkey_start’ initiates a + ‘gpgme_op_createsubkey’ operation; see there for details. It must + be completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + -- Function: gpgme_error_t gpgme_op_adduid (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); + + The function ‘gpgme_op_adduid’ adds a new user ID to the OpenPGP + key given by KEY. Adding additional user IDs after key creation is + a feature of the OpenPGP protocol and thus the protocol for the + context CTX must be set to OpenPGP. As of now this function + requires at least version 2.1.13 of GnuPG. + + KEY specifies the key to operate on. + + USERID is the user ID to add to the key. A user ID is commonly the + mail address to be associated with the key. GPGME does not require + a specificy syntax but if more than a mail address is given, + RFC-822 style format is suggested. The value is expected to be in + UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is + a required parameter. + + FLAGS are currently not used and must be set to zero. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. - ‘GPGME_ATTR_EXPIRE’ - This is the expiration time of a sub key. It is representable - as a number. + -- Function: gpgme_error_t gpgme_op_adduid_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); - ‘GPGME_ATTR_OTRUST’ - XXX FIXME (also for trust items) + The function ‘gpgme_op_adduid_start’ initiates a ‘gpgme_op_adduid’ + operation; see there for details. It must be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - ‘GPGME_ATTR_USERID’ - This is a user ID. There can be more than one user IDs in a - GPGME_KEY_T object. The first one (with index 0) is the - primary user ID. The user ID is representable as a number. + -- Function: gpgme_error_t gpgme_op_revuid (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); - For trust items, this is the user ID associated with this - trust item. + The function ‘gpgme_op_revuid’ revokes a user ID from the OpenPGP + key given by KEY. Revoking user IDs after key creation is a + feature of the OpenPGP protocol and thus the protocol for the + context CTX must be set to OpenPGP. As of now this function + requires at least version 2.1.13 of GnuPG. - ‘GPGME_ATTR_NAME’ - This is the name belonging to a user ID. It is representable - as a string. + KEY specifies the key to operate on. - ‘GPGME_ATTR_EMAIL’ - This is the email address belonging to a user ID. It is - representable as a string. + USERID is the user ID to be revoked from the key. The user ID must + be given verbatim because the engine does an exact and case + sensitive match. Thus the ‘uid’ field from the user ID object + (‘gpgme_user_id_t’) is to be used. This is a required parameter. - ‘GPGME_ATTR_COMMENT’ - This is the comment belonging to a user ID. It is - representable as a string. + FLAGS are currently not used and must be set to zero. - ‘GPGME_ATTR_VALIDITY’ - This is the validity belonging to a user ID. It is - representable as a string and as a number. See below for a - list of available validities. + Note that the engine won’t allow to revoke the last valid user ID. + To change a user ID is better to first add the new user ID, then + revoke the old one, and finally publish the key. - For trust items, this is the validity that is associated with - this trust item. + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. - ‘GPGME_ATTR_UID_REVOKED’ - This specifies if a user ID is revoked. It is representable - as a number, and is ‘1’ if the user ID is revoked, and ‘0’ - otherwise. + -- Function: gpgme_error_t gpgme_op_revuid_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned int FLAGS); - ‘GPGME_ATTR_UID_INVALID’ - This specifies if a user ID is invalid. It is representable - as a number, and is ‘1’ if the user ID is invalid, and ‘0’ - otherwise. + The function ‘gpgme_op_revuid_start’ initiates a ‘gpgme_op_revuid’ + operation; see there for details. It must be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - ‘GPGME_ATTR_LEVEL’ - This is the trust level of a trust item. + -- Function: gpgme_error_t gpgme_op_genkey (gpgme_ctx_t CTX, + const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) - ‘GPGME_ATTR_TYPE’ - This returns information about the type of key. For the - string function this will eother be "PGP" or "X.509". The - integer function returns 0 for PGP and 1 for X.509. It is - also used for the type of a trust item. + The function ‘gpgme_op_genkey’ generates a new key pair in the + context CTX. The meaning of PUBLIC and SECRET depends on the + crypto backend. - ‘GPGME_ATTR_IS_SECRET’ - This specifies if the key is a secret key. It is - representable as a number, and is ‘1’ if the key is revoked, - and ‘0’ otherwise. + GPG does not support PUBLIC and SECRET, they should be ‘NULL’. + GnuPG will generate a key pair and add it to the standard key ring. + The fingerprint of the generated key is available with + ‘gpgme_op_genkey_result’. - ‘GPGME_ATTR_KEY_REVOKED’ - This specifies if a sub key is revoked. It is representable - as a number, and is ‘1’ if the key is revoked, and ‘0’ - otherwise. + GpgSM requires PUBLIC to be a writable data object. GpgSM will + generate a secret key (which will be stored by ‘gpg-agent’, and + return a certificate request in PUBLIC, which then needs to be + signed by the certification authority and imported before it can be + used. GpgSM does not make the fingerprint available. - ‘GPGME_ATTR_KEY_INVALID’ - This specifies if a sub key is invalid. It is representable - as a number, and is ‘1’ if the key is invalid, and ‘0’ - otherwise. + The argument PARMS specifies parameters for the key in an XML + string. The details about the format of PARMS are specific to the + crypto engine used by CTX. Here is an example for GnuPG as the + crypto engine (all parameters of OpenPGP key generation are + documented in the GPG manual): - ‘GPGME_ATTR_KEY_EXPIRED’ - This specifies if a sub key is expired. It is representable - as a number, and is ‘1’ if the key is expired, and ‘0’ - otherwise. + + Key-Type: default + Subkey-Type: default + Name-Real: Joe Tester + Name-Comment: with stupid passphrase + Name-Email: joe@foo.bar + Expire-Date: 0 + Passphrase: abc + - ‘GPGME_ATTR_KEY_DISABLED’ - This specifies if a sub key is disabled. It is representable - as a number, and is ‘1’ if the key is disabled, and ‘0’ - otherwise. - - ‘GPGME_ATTR_KEY_CAPS’ - This is a description of the capabilities of a sub key. It is - representable as a string. The string contains the letter “e†- if the key can be used for encryption, “s†if the key can be - used for signatures, and “c†if the key can be used for - certifications. - - ‘GPGME_ATTR_CAN_ENCRYPT’ - This specifies if a sub key can be used for encryption. It is - representable as a number, and is ‘1’ if the sub key can be - used for encryption, and ‘0’ otherwise. - - ‘GPGME_ATTR_CAN_SIGN’ - This specifies if a sub key can be used to create data - signatures. It is representable as a number, and is ‘1’ if - the sub key can be used for signatures, and ‘0’ otherwise. - - ‘GPGME_ATTR_CAN_CERTIFY’ - This specifies if a sub key can be used to create key - certificates. It is representable as a number, and is ‘1’ if - the sub key can be used for certifications, and ‘0’ otherwise. - - ‘GPGME_ATTR_SERIAL’ - The X.509 issuer serial attribute of the key. It is - representable as a string. - - ‘GPGME_ATTR_ISSUE’ - The X.509 issuer name attribute of the key. It is - representable as a string. - - ‘GPGME_ATTR_CHAINID’ - The X.509 chain ID can be used to build the certification - chain. It is representable as a string. - - -- Function: const char * gpgme_key_get_string_attr (gpgme_key_t KEY, - gpgme_attr_t WHAT, const void *RESERVED, int IDX) - The function ‘gpgme_key_get_string_attr’ returns the value of the - string-representable attribute WHAT of key KEY. If the attribute - is an attribute of a sub key or an user ID, IDX specifies the sub - key or user ID of which the attribute value is returned. The - argument RESERVED is reserved for later use and should be ‘NULL’. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -- Function: unsigned long gpgme_key_get_ulong_attr (gpgme_key_t KEY, - gpgme_attr_t WHAT, const void *RESERVED, int IDX) - The function ‘gpgme_key_get_ulong_attr’ returns the value of the - number-representable attribute WHAT of key KEY. If the attribute - is an attribute of a sub key or an user ID, IDX specifies the sub - key or user ID of which the attribute value is returned. The - argument RESERVED is reserved for later use and should be ‘NULL’. - - The function returns ‘0’ if the attribute can’t be returned as a - number, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -File: gpgme.info, Node: Key Signatures, Next: Manipulating Keys, Prev: Information About Keys, Up: Key Management - -7.5.3 Key Signatures --------------------- - -The following interfaces are deprecated and only provided for backward -compatibility. Don’t use them. They will be removed in a future -version of GPGME. - - The signatures on a key are only available if the key was retrieved -via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode enabled, -because it is expensive to retrieve all signatures of a key. - - So, before using the below interfaces to retrieve the signatures on a -key, you have to make sure that the key was listed with signatures -enabled. One convenient, but blocking, way to do this is to use the -function ‘gpgme_get_key’. - - -- Data type: gpgme_attr_t - The ‘gpgme_attr_t’ type is used to specify a key signature - attribute. The following attributes are defined: - - ‘GPGME_ATTR_KEYID’ - This is the key ID of the key which was used for the - signature. It is representable as a string. - - ‘GPGME_ATTR_ALGO’ - This is the crypto algorithm used to create the signature. It - is representable as a string and as a number. The numbers - correspond to the ‘enum gcry_pk_algos’ values in the gcrypt - library. - - ‘GPGME_ATTR_CREATED’ - This is the timestamp at creation time of the signature. It - is representable as a number. - - ‘GPGME_ATTR_EXPIRE’ - This is the expiration time of the signature. It is - representable as a number. - - ‘GPGME_ATTR_USERID’ - This is the user ID associated with the signing key. The user - ID is representable as a number. - - ‘GPGME_ATTR_NAME’ - This is the name belonging to a user ID. It is representable - as a string. - - ‘GPGME_ATTR_EMAIL’ - This is the email address belonging to a user ID. It is - representable as a string. - - ‘GPGME_ATTR_COMMENT’ - This is the comment belonging to a user ID. It is - representable as a string. - - ‘GPGME_ATTR_KEY_REVOKED’ - This specifies if a key signature is a revocation signature. - It is representable as a number, and is ‘1’ if the key is - revoked, and ‘0’ otherwise. - - ‘GPGME_ATTR_SIG_CLASS’ - This specifies the signature class of a key signature. It is - representable as a number. The meaning is specific to the - crypto engine. - - ‘GPGME_ATTR_SIG_CLASS’ - This specifies the signature class of a key signature. It is - representable as a number. The meaning is specific to the - crypto engine. - - ‘GPGME_ATTR_SIG_STATUS’ - This is the same value as returned by ‘gpgme_get_sig_status’. - - -- Function: const char * gpgme_key_sig_get_string_attr - (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_key_sig_get_string_attr’ returns the value of - the string-representable attribute WHAT of the signature IDX on the - user ID UID_IDX in the key KEY. The argument RESERVED is reserved - for later use and should be ‘NULL’. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, UID_IDX or IDX out of range, or - RESERVED not ‘NULL’. - - -- Function: unsigned long gpgme_key_sig_get_ulong_attr - (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_key_sig_get_ulong_attr’ returns the value of - the number-representable attribute WHAT of the signature IDX on the - user ID UID_IDX in the key KEY. The argument RESERVED is reserved - for later use and should be ‘NULL’. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, UID_IDX or IDX out of range, or - RESERVED not ‘NULL’. - - -File: gpgme.info, Node: Manipulating Keys, Next: Generating Keys, Prev: Key Signatures, Up: Key Management - -7.5.4 Manipulating Keys ------------------------ - - -- Function: void gpgme_key_ref (gpgme_key_t KEY) - The function ‘gpgme_key_ref’ acquires an additional reference for - the key KEY. - - -- Function: void gpgme_key_unref (gpgme_key_t KEY) - The function ‘gpgme_key_unref’ releases a reference for the key - KEY. If this was the last reference, the key will be destroyed and - all resources associated to it will be released. - - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: void gpgme_key_release (gpgme_key_t KEY) - The function ‘gpgme_key_release’ is equivalent to - ‘gpgme_key_unref’. - - -File: gpgme.info, Node: Generating Keys, Next: Exporting Keys, Prev: Manipulating Keys, Up: Key Management - -7.5.5 Generating Keys ---------------------- - - -- Function: gpgme_error_t gpgme_op_genkey (gpgme_ctx_t CTX, - const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) - The function ‘gpgme_op_genkey’ generates a new key pair in the - context CTX. The meaning of PUBLIC and SECRET depends on the - crypto backend. - - GnuPG does not support PUBLIC and SECRET, they should be ‘NULL’. - GnuPG will generate a key pair and add it to the standard key ring. - The fingerprint of the generated key is available with - ‘gpgme_op_genkey_result’. - - GpgSM requires PUBLIC to be a writable data object. GpgSM will - generate a secret key (which will be stored by ‘gpg-agent’, and - return a certificate request in PUBLIC, which then needs to be - signed by the certification authority and imported before it can be - used. GpgSM does not make the fingerprint available. - - The argument PARMS specifies parameters for the key in an XML - string. The details about the format of PARMS are specific to the - crypto engine used by CTX. Here is an example for GnuPG as the - crypto engine (all parameters of OpenPGP key generation are - documented in the GPG manual): - - - Key-Type: default - Subkey-Type: default - Name-Real: Joe Tester - Name-Comment: with stupid passphrase - Name-Email: joe@foo.bar - Expire-Date: 0 - Passphrase: abc - - - Here is an example for GpgSM as the crypto engine (all parameters - of OpenPGP key generation are documented in the GPGSM manual): + Here is an example for GpgSM as the crypto engine (all parameters + of OpenPGP key generation are documented in the GPGSM manual): Key-Type: RSA @@ -3417,6 +3590,7 @@ -- Function: gpgme_error_t gpgme_op_genkey_start (gpgme_ctx_t CTX, const char *PARMS, gpgme_data_t PUBLIC, gpgme_data_t SECRET) + The function ‘gpgme_op_genkey_start’ initiates a ‘gpgme_op_genkey’ operation. It can be completed by calling ‘gpgme_wait’ on the context. *Note Waiting For Completion::. @@ -3427,6 +3601,7 @@ PUBLIC or SECRET is not ‘NULL’. -- Data type: gpgme_genkey_result_t + This is a pointer to a structure used to store the result of a ‘gpgme_op_genkey’ operation. After successfully generating a key, you can retrieve the pointer to the result with @@ -3434,21 +3609,33 @@ members: ‘unsigned int primary : 1’ - This is a flag that is set to 1 if a primary key was created - and to 0 if not. + This flag is set to 1 if a primary key was created and to 0 if + not. ‘unsigned int sub : 1’ - This is a flag that is set to 1 if a subkey was created and to - 0 if not. + This flag is set to 1 if a subkey was created and to 0 if not. + + ‘unsigned int uid : 1’ + This flag is set to 1 if a user ID was created and to 0 if + not. ‘char *fpr’ This is the fingerprint of the key that was created. If both - a primary and a sub key were generated, the fingerprint of the + a primary and a subkey were generated, the fingerprint of the primary key will be returned. If the crypto engine does not provide the fingerprint, ‘fpr’ will be a null pointer. + ‘gpgme_data_t pubkey’ + This will eventually be used to return the public key. It is + currently not used. + + ‘gpgme_data_t seckey’ + This will eventually be used to return the secret key. It is + currently not used. + -- Function: gpgme_genkey_result_t gpgme_op_genkey_result (gpgme_ctx_t CTX) + The function ‘gpgme_op_genkey_result’ returns a ‘gpgme_genkey_result_t’ pointer to a structure holding the result of a ‘gpgme_op_genkey’ operation. The pointer is only valid if the @@ -3458,9 +3645,86 @@ operation is started on the context.  -File: gpgme.info, Node: Exporting Keys, Next: Importing Keys, Prev: Generating Keys, Up: Key Management +File: gpgme.info, Node: Signing Keys, Next: Exporting Keys, Prev: Generating Keys, Up: Key Management + +7.5.6 Signing Keys +------------------ + +Key signatures are a unique concept of the OpenPGP protocol. They can +be used to certify the validity of a key and are used to create the +Web-of-Trust (WoT). Instead of using the ‘gpgme_op_interact’ function +along with a finite state machine, GPGME provides a convenient function +to create key signatures when using modern GnuPG versions. + + -- Function: gpgme_error_t gpgme_op_keysign (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_keysign’ adds a new key signature to the + public key KEY. This function requires at least version 2.1.12 of + GnuPG. + + CTX is the usual context which describes the protocol to use (which + must be OpenPGP) and has also the list of signer keys to be used + for the signature. The common case is to use the default key for + signing other keys. If another key or more than one key shall be + used for a key signature, ‘gpgme_signers_add’ can be used. *Note + Selecting Signers::. + + KEY specifies the key to operate on. + + USERID selects the user ID or user IDs to be signed. If USERID is + set to ‘NULL’ all valid user IDs are signed. The user ID must be + given verbatim because the engine does an exact and case sensitive + match. Thus the ‘uid’ field from the user ID object + (‘gpgme_user_id_t’) is to be used. To select more than one user ID + put them all into one string separated by linefeeds characters + (‘\n’) and set the flag ‘GPGME_KEYSIGN_LFSEP’. + + EXPIRES can be set to the number of seconds since Epoch of the + desired expiration date in UTC for the new signature. The common + case is to use 0 to not set an expiration date. However, if the + configuration of the engine defines a default expiration for key + signatures, that is still used unless the flag + ‘GPGME_KEYSIGN_NOEXPIRE’ is used. Note that this parameter takes + an unsigned long value and not a ‘time_t’ to avoid problems on + systems which use a signed 32 bit ‘time_t’. Note further that the + OpenPGP protocol uses 32 bit values for timestamps and thus can + only encode dates up to the year 2106. + + FLAGS can be set to the bit-wise OR of the following flags: + + ‘GPGME_KEYSIGN_LOCAL’ + Instead of creating an exportable key signature, create a key + signature which is is marked as non-exportable. + + ‘GPGME_KEYSIGN_LFSEP’ + Although linefeeds are uncommon in user IDs this flag is + required to explicitly declare that USERID may contain several + linefeed separated user IDs. + + ‘GPGME_KEYSIGN_NOEXPIRE’ + Force the creation of a key signature without an expiration + date. This overrides EXPIRE and any local configuration of + the engine. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. + + -- Function: gpgme_error_t gpgme_op_keysign_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, const char *USERID, unsigned long EXPIRES, + unsigned int FLAGS); + + The function ‘gpgme_op_keysign_start’ initiates a + ‘gpgme_op_keysign’ operation; see there for details. It must be + completed by calling ‘gpgme_wait’ on the context. *Note Waiting + For Completion::. + + +File: gpgme.info, Node: Exporting Keys, Next: Importing Keys, Prev: Signing Keys, Up: Key Management -7.5.6 Exporting Keys +7.5.7 Exporting Keys -------------------- Exporting keys means the same as running ‘gpg’ with the command @@ -3568,10 +3832,10 @@ specified for KEYDATA. The keys to export are taken form the ‘NULL’ terminated array KEYS. - Only keys of the the currently selected protocol of CTX which do - have a fingerprint set are considered for export. Other keys - specified by the KEYS are ignored. In particular OpenPGP keys - retrieved via an external key listing are not included. + Only keys of the currently selected protocol of CTX which do have a + fingerprint set are considered for export. Other keys specified by + the KEYS are ignored. In particular OpenPGP keys retrieved via an + external key listing are not included. MODE is usually 0; other values are described above. @@ -3597,7 +3861,7 @@  File: gpgme.info, Node: Importing Keys, Next: Deleting Keys, Prev: Exporting Keys, Up: Key Management -7.5.7 Importing Keys +7.5.8 Importing Keys -------------------- Importing keys means the same as running ‘gpg’ with the command @@ -3639,11 +3903,10 @@ which have been retrieved from an external source (i.e. using ‘GPGME_KEYLIST_MODE_EXTERN’). (1) - Only keys of the the currently selected protocol of CTX are - considered for import. Other keys specified by the KEYS are - ignored. As of now all considered keys must have been retrieved - using the same method, that is the used key listing mode must be - identical. + Only keys of the currently selected protocol of CTX are considered + for import. Other keys specified by the KEYS are ignored. As of + now all considered keys must have been retrieved using the same + method, that is the used key listing mode must be identical. After the operation completed successfully, the result can be retrieved with ‘gpgme_op_import_result’. @@ -3720,34 +3983,34 @@ ‘int imported’ The total number of imported keys. - ‘imported_rsa’ + ‘int imported_rsa’ The number of imported RSA keys. - ‘unchanged’ + ‘int unchanged’ The number of unchanged keys. - ‘new_user_ids’ + ‘int new_user_ids’ The number of new user IDs. - ‘new_sub_keys’ + ‘int new_sub_keys’ The number of new sub keys. - ‘new_signatures’ + ‘int new_signatures’ The number of new signatures. - ‘new_revocations’ + ‘int new_revocations’ The number of new revocations. - ‘secret_read’ + ‘int secret_read’ The total number of secret keys read. - ‘secret_imported’ + ‘int secret_imported’ The number of imported secret keys. - ‘secret_unchanged’ + ‘int secret_unchanged’ The number of unchanged secret keys. - ‘not_imported’ + ‘int not_imported’ The number of keys not imported. ‘gpgme_import_status_t imports’ @@ -3764,21 +4027,6 @@ successfully. The returned pointer is only valid until the next operation is started on the context. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t CTX, - gpgme_data_t KEYDATA, int *NR) - The function ‘gpgme_op_import_ext’ is equivalent to: - - gpgme_error_t err = gpgme_op_import (ctx, keydata); - if (!err) - { - gpgme_import_result_t result = gpgme_op_import_result (ctx); - *nr = result->considered; - } - ---------- Footnotes ---------- (1) Thus it is a replacement for the usual workaround of exporting @@ -3787,7 +4035,7 @@  File: gpgme.info, Node: Deleting Keys, Next: Changing Passphrases, Prev: Importing Keys, Up: Key Management -7.5.8 Deleting Keys +7.5.9 Deleting Keys ------------------- -- Function: gpgme_error_t gpgme_op_delete (gpgme_ctx_t CTX, @@ -3815,10 +4063,10 @@ or KEY is not a valid pointer.  -File: gpgme.info, Node: Changing Passphrases, Next: Advanced Key Editing, Prev: Deleting Keys, Up: Key Management +File: gpgme.info, Node: Changing Passphrases, Next: Changing TOFU Data, Prev: Deleting Keys, Up: Key Management -7.5.9 Changing Passphrases --------------------------- +7.5.10 Changing Passphrases +--------------------------- -- Function: gpgme_error_t gpgme_op_passwd (gpgme_ctx_t CTX, const gpgme_key_t KEY, unsigned int FLAGS) @@ -3845,69 +4093,109 @@ oepration could not be started.  -File: gpgme.info, Node: Advanced Key Editing, Prev: Changing Passphrases, Up: Key Management +File: gpgme.info, Node: Changing TOFU Data, Next: Advanced Key Editing, Prev: Changing Passphrases, Up: Key Management -7.5.10 Advanced Key Editing ---------------------------- +7.5.11 Changing TOFU Data +------------------------- - -- Data type: gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, - gpgme_status_code_t STATUS, const char *ARGS, int FD) - The ‘gpgme_edit_cb_t’ type is the type of functions which GPGME - calls if it a key edit operation is on-going. The status code - STATUS and the argument line ARGS are passed through by GPGME from - the crypto engine. The file descriptor FD is -1 for normal status - messages. If STATUS indicates a command rather than a status - message, the response to the command should be written to FD. The - HANDLE is provided by the user at start of operation. +The OpenPGP engine features a Trust-On-First-Use (TOFU) key validation +model. For resolving clonflics it is necessary to declare the policy +for a key. See the GnuPG manual for details on the TOFU implementation. + + -- Data type: enum gpgme_tofu_policy_t + The ‘gpgme_tofu_policy_t’ type specifies the set of possible policy + values that are supported by GPGME: + + ‘GPGME_TOFU_POLICY_AUTO’ + Set the policy to “autoâ€. + ‘GPGME_TOFU_POLICY_GOOD’ + Set the policy to “googâ€. + ‘GPGME_TOFU_POLICY_BAD’ + Set the policy to “badâ€. + ‘GPGME_TOFU_POLICY_ASK’ + Set the policy to “askâ€. + ‘GPGME_TOFU_POLICY_UNKNOWN’ + Set the policy to “unknownâ€. + + To change the policy for a key the following functions can be used: + + -- Function: gpgme_error_t gpgme_op_tofu_policy (gpgme_ctx_t CTX, + const gpgme_key_t KEY, gpgme_tofu_policy_t POLICY) + + The function ‘gpgme_op_tofu_policy’ changes the TOFU policy of KEY. + The valid values for POLICY are listed above. As of now this + function does only work for OpenPGP and requires at least version + 2.1.10 of GnuPG. + + The function returns zero on success, ‘GPG_ERR_NOT_SUPPORTED’ if + the engine does not support the command, or a bunch of other error + codes. - The function should return ‘GPG_ERR_NO_ERROR’ or an error value. + -- Function: gpgme_error_t gpgme_op_tofu_policy_start (gpgme_ctx_t CTX, + const gpgme_key_t KEY, gpgme_tofu_policy_t POLICY) - -- Function: gpgme_error_t gpgme_op_edit (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_edit’ processes the key KEY interactively, - using the edit callback function FNC with the handle HANDLE. The - callback is invoked for every status and command request from the - crypto engine. The output of the crypto engine is written to the - data object OUT. + The function ‘gpgme_op_tofu_policy_start’ initiates a + ‘gpgme_op_tofu_policy’ operation. It can be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - Note that the protocol between the callback function and the crypto - engine is specific to the crypto engine and no further support in - implementing this protocol correctly is provided by GPGME. + The function returns ‘0’ if the operation was started successfully, + and an error code if one of the arguments is not valid or the + oepration could not be started. - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the edit - operation completes successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY - is not a valid pointer, and any error returned by the crypto engine - or the edit callback handler. + +File: gpgme.info, Node: Advanced Key Editing, Prev: Changing TOFU Data, Up: Key Management - -- Function: gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_edit_start’ initiates a ‘gpgme_op_edit’ - operation. It can be completed by calling ‘gpgme_wait’ on the - context. *Note Waiting For Completion::. +7.5.12 Advanced Key Editing +--------------------------- - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX - or KEY is not a valid pointer. + -- Data type: gpgme_error_t (*gpgme_interact_cb_t) (void *HANDLE, + const char *STATUS, const char *ARGS, int FD) + The ‘gpgme_interact_cb_t’ type is the type of functions which GPGME + calls if it a key interact operation is on-going. The status + keyword STATUS and the argument line ARGS are passed through by + GPGME from the crypto engine. An empty string represents EOF. The + file descriptor FD is -1 for normal status messages. If STATUS + indicates a command rather than a status message, the response to + the command should be written to FD. The HANDLE is provided by the + user at start of operation. + + The function should return ‘GPG_ERR_FALSE’ if it did not handle the + status code, ‘0’ for success, or any other error value. + + -- Function: gpgme_error_t gpgme_op_interact (gpgme_ctx_t CTX, + gpgme_key_t KEY, unsigned int FLAGS, gpgme_interact_cb_t FNC, + void *HANDLE, gpgme_data_t OUT) + The function ‘gpgme_op_interact’ processes the key KEY + interactively, using the interact callback function FNC with the + handle HANDLE. The callback is invoked for every status and + command request from the crypto engine. The output of the crypto + engine is written to the data object OUT. - -- Function: gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_card_edit’ is analogous to ‘gpgme_op_edit’, - but should be used to process the smart card corresponding to the - key KEY. + Note that the protocol between the callback function and the crypto + engine is specific to the crypto engine and no further support in + implementing this protocol correctly is provided by GPGME. - -- Function: gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t CTX, - gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, - gpgme_data_t OUT) - The function ‘gpgme_op_card_edit_start’ initiates a - ‘gpgme_op_card_edit’ operation. It can be completed by calling + FLAGS modifies the behaviour of the function; the only defined bit + value is: + + ‘GPGME_INTERACT_CARD’ + This is used for smartcard based keys and uses gpg’s + ‘--card-edit’ command. + + The function returns ‘0’ if the edit operation completes + successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY is not a valid + pointer, and any error returned by the crypto engine or the edit + callback handler. + + -- Function: gpgme_error_t gpgme_op_interact_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, unsigned int FLAGS, gpgme_interact_cb_t FNC, + void *HANDLE, gpgme_data_t OUT) + The function ‘gpgme_op_interact_start’ initiates a + ‘gpgme_op_interact’ operation. It can be completed by calling ‘gpgme_wait’ on the context. *Note Waiting For Completion::. - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX - or KEY is not a valid pointer. + The function returns ‘0’ if the operation was started successfully, + and ‘GPG_ERR_INV_VALUE’ if CTX or KEY is not a valid pointer.  File: gpgme.info, Node: Trust Item Management, Next: Crypto Operations, Prev: Key Management, Up: Contexts @@ -3944,11 +4232,10 @@ * Menu: * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items.  -File: gpgme.info, Node: Listing Trust Items, Next: Information About Trust Items, Up: Trust Item Management +File: gpgme.info, Node: Listing Trust Items, Next: Manipulating Trust Items, Up: Trust Item Management 7.6.1 Listing Trust Items ------------------------- @@ -4000,51 +4287,9 @@ the operation there was not enough memory available.  -File: gpgme.info, Node: Information About Trust Items, Next: Manipulating Trust Items, Prev: Listing Trust Items, Up: Trust Item Management - -7.6.2 Information About Trust Items ------------------------------------ - -The following interfaces are deprecated and only provided for backward -compatibility. Don’t use them. They will be removed in a future -version of GPGME. - - Trust items have attributes which can be queried using the interfaces -below. The attribute identifiers are shared with those for key -attributes. *Note Information About Keys::. - - -- Function: const char * gpgme_trust_item_get_string_attr - (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_trust_item_get_string_attr’ returns the value - of the string-representable attribute WHAT of trust item ITEM. The - arguments IDX and RESERVED are reserved for later use and should be - ‘0’ and ‘NULL’ respectively. - - The string returned is only valid as long as the key is valid. - - The function returns ‘0’ if an attribute can’t be returned as a - string, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -- Function: int gpgme_trust_item_get_int_attr - (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, - const void *RESERVED, int IDX) - The function ‘gpgme_trust_item_get_int_attr’ returns the value of - the number-representable attribute WHAT of trust item ITEM. If the - attribute occurs more than once in the trust item, the index is - specified by IDX. However, currently no such attribute exists, so - IDX should be ‘0’. The argument RESERVED is reserved for later use - and should be ‘NULL’. - - The function returns ‘0’ if the attribute can’t be returned as a - number, KEY is not a valid pointer, IDX out of range, or RESERVED - not ‘NULL’. - - -File: gpgme.info, Node: Manipulating Trust Items, Prev: Information About Trust Items, Up: Trust Item Management +File: gpgme.info, Node: Manipulating Trust Items, Prev: Listing Trust Items, Up: Trust Item Management -7.6.3 Manipulating Trust Items +7.6.2 Manipulating Trust Items ------------------------------ -- Function: void gpgme_trust_item_ref (gpgme_trust_item_t ITEM) @@ -4057,14 +4302,6 @@ will be destroyed and all resources associated to it will be released. - The following interface is deprecated and only provided for backward -compatibility. Don’t use it. It will be removed in a future version of -GPGME. - - -- Function: void gpgme_trust_item_release (gpgme_trust_item_t ITEM) - The function ‘gpgme_trust_item_release’ is an alias for - ‘gpgme_trust_item_unref’. -  File: gpgme.info, Node: Crypto Operations, Next: Miscellaneous, Prev: Trust Item Management, Up: Contexts @@ -4157,8 +4394,10 @@ This is a pointer to a structure used to store the result of a ‘gpgme_op_decrypt’ operation. After successfully decrypting data, you can retrieve the pointer to the result with - ‘gpgme_op_decrypt_result’. The structure contains the following - members: + ‘gpgme_op_decrypt_result’. As with all result structures, it this + structure shall be considered read-only and an application must not + allocated such a strucure on its own. The structure contains the + following members: ‘char *unsupported_algorithm’ If an unsupported algorithm was encountered, this string @@ -4175,6 +4414,19 @@ This is the filename of the original plaintext message file if it is known, otherwise this is a null pointer. + ‘char *session_key’ + A textual representation (nul-terminated string) of the + session key used in symmetric encryption of the message, if + the context has been set to export session keys (see + ‘gpgme_set_ctx_flag, "export-session-key"’), and a session key + was available for the most recent decryption operation. + Otherwise, this is a null pointer. + + You must not try to access this member of the struct unless + ‘gpgme_set_ctx_flag (ctx, "export-session-key")’ returns + success or ‘gpgme_get_ctx_flag (ctx, "export-session-key")’ + returns true (non-empty string). + -- Function: gpgme_decrypt_result_t gpgme_op_decrypt_result (gpgme_ctx_t CTX) The function ‘gpgme_op_decrypt_result’ returns a @@ -4426,6 +4678,12 @@ ‘char *pka_address’ The mailbox from the PKA information or ‘NULL’. + ‘gpgme_key_t key’ + An object describing the key used to create the signature. + This key object may be incomplete in that it only conveys + information availabale directly with a signature. It may also + be ‘NULL’ if such information is not readily available. + -- Data type: gpgme_verify_result_t This is a pointer to a structure used to store the result of a ‘gpgme_op_verify’ operation. After verifying a signature, you can @@ -4454,325 +4712,122 @@ counts as successful in this context). The returned pointer is only valid until the next operation is started on the context. - The following interfaces are deprecated and only provided for -backward compatibility. Don’t use them. They will be removed in a -future version of GPGME. + +File: gpgme.info, Node: Decrypt and Verify, Next: Sign, Prev: Verify, Up: Crypto Operations - -- Data type: enum gpgme_sig_stat_t - The ‘gpgme_sig_stat_t’ type holds the result of a signature check, - or the combined result of all signatures. The following results - are possible: +7.7.3 Decrypt and Verify +------------------------ - ‘GPGME_SIG_STAT_NONE’ - This status should not occur in normal operation. + -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, + gpgme_data_t CIPHER, gpgme_data_t PLAIN) + The function ‘gpgme_op_decrypt_verify’ decrypts the ciphertext in + the data object CIPHER and stores it into the data object PLAIN. + If CIPHER contains signatures, they will be verified. - ‘GPGME_SIG_STAT_GOOD’ - This status indicates that the signature is valid. For the - combined result this status means that all signatures are - valid. + After the operation completed, ‘gpgme_op_decrypt_result’ and + ‘gpgme_op_verify_result’ can be used to retrieve more information + about the signatures. - ‘GPGME_SIG_STAT_GOOD_EXP’ - This status indicates that the signature is valid but expired. - For the combined result this status means that all signatures - are valid and expired. + If the error code ‘GPG_ERR_NO_DATA’ is returned, CIPHER does not + contain any data to decrypt. However, it might still be signed. + The information about detected signatures is available with + ‘gpgme_op_verify_result’ in this case. - ‘GPGME_SIG_STAT_GOOD_EXPKEY’ - This status indicates that the signature is valid but the key - used to verify the signature has expired. For the combined - result this status means that all signatures are valid and all - keys are expired. + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + ciphertext could be decrypted successfully, ‘GPG_ERR_INV_VALUE’ if + CTX, CIPHER or PLAIN is not a valid pointer, ‘GPG_ERR_NO_DATA’ if + CIPHER does not contain any data to decrypt, + ‘GPG_ERR_DECRYPT_FAILED’ if CIPHER is not a valid cipher text, + ‘GPG_ERR_BAD_PASSPHRASE’ if the passphrase for the secret key could + not be retrieved, and passes through any errors that are reported + by the crypto engine support routines. - ‘GPGME_SIG_STAT_BAD’ - This status indicates that the signature is invalid. For the - combined result this status means that all signatures are - invalid. + -- Function: gpgme_error_t gpgme_op_decrypt_verify_start + (gpgme_ctx_t CTX, gpgme_data_t CIPHER, gpgme_data_t PLAIN) + The function ‘gpgme_op_decrypt_verify_start’ initiates a + ‘gpgme_op_decrypt_verify’ operation. It can be completed by + calling ‘gpgme_wait’ on the context. *Note Waiting For + Completion::. - ‘GPGME_SIG_STAT_NOKEY’ - This status indicates that the signature could not be verified - due to a missing key. For the combined result this status - means that all signatures could not be checked due to missing - keys. + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation could be started successfully, ‘GPG_ERR_INV_VALUE’ if + CTX, CIPHER, PLAIN or R_STAT is not a valid pointer, and + ‘GPG_ERR_NO_DATA’ if CIPHER does not contain any data to decrypt. - ‘GPGME_SIG_STAT_NOSIG’ - This status indicates that the signature data provided was not - a real signature. + When processing mails it is sometimes useful to extract the actual +mail address (the “addr-specâ€) from a string. GPGME provides this +helper function which uses the same semantics as the internal functions +in GPGME and GnuPG: + + -- Function: char * gpgme_addrspec_from_uid (const char *UID) + + Return the mail address (called “addr-spec†in RFC-5322) from the + string UID which is assumed to be a user id (called “address†in + RFC-5322). All plain ASCII characters (i.e. those with bit 7 + cleared) in the result are converted to lowercase. Caller must + free the result using ‘gpgme_free’. Returns ‘NULL’ if no valid + address was found (in which case ‘ERRNO’ is set to ‘EINVAL’) or for + other errors. - ‘GPGME_SIG_STAT_ERROR’ - This status indicates that there was some other error which - prevented the signature verification. + +File: gpgme.info, Node: Sign, Next: Encrypt, Prev: Decrypt and Verify, Up: Crypto Operations - ‘GPGME_SIG_STAT_DIFF’ - For the combined result this status means that at least two - signatures have a different status. You can get each key’s - status with ‘gpgme_get_sig_status’. +7.7.4 Sign +---------- - -- Function: const char * gpgme_get_sig_status (gpgme_ctx_t CTX, - int IDX, gpgme_sig_stat_t *R_STAT, time_t *R_CREATED) - The function ‘gpgme_get_sig_status’ is equivalent to: +A signature can contain signatures by one or more keys. The set of keys +used to create a signatures is contained in a context, and is applied to +all following signing operations in this context (until the set is +changed). - gpgme_verify_result_t result; - gpgme_signature_t sig; +* Menu: - result = gpgme_op_verify_result (ctx); - sig = result->signatures; +* Selecting Signers:: How to choose the keys to sign with. +* Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return NULL; + +File: gpgme.info, Node: Selecting Signers, Next: Creating a Signature, Up: Sign - if (r_stat) - { - switch (gpg_err_code (sig->status)) - { - case GPG_ERR_NO_ERROR: - *r_stat = GPGME_SIG_STAT_GOOD; - break; +7.7.4.1 Selecting Signers +......................... - case GPG_ERR_BAD_SIGNATURE: - *r_stat = GPGME_SIG_STAT_BAD; - break; +The key or the keys used to create a signature are stored in the +context. The following functions can be used to manipulate this list. +If no signer has been set into the context a default key is used for +signing. - case GPG_ERR_NO_PUBKEY: - *r_stat = GPGME_SIG_STAT_NOKEY; - break; + -- Function: void gpgme_signers_clear (gpgme_ctx_t CTX) + The function ‘gpgme_signers_clear’ releases a reference for each + key on the signers list and removes the list of signers from the + context CTX. - case GPG_ERR_NO_DATA: - *r_stat = GPGME_SIG_STAT_NOSIG; - break; + Every context starts with an empty list. - case GPG_ERR_SIG_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXP; - break; + -- Function: gpgme_error_t gpgme_signers_add (gpgme_ctx_t CTX, + const gpgme_key_t KEY) + The function ‘gpgme_signers_add’ adds the key KEY to the list of + signers in the context CTX. - case GPG_ERR_KEY_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; - break; + Calling this function acquires an additional reference for the key. - default: - *r_stat = GPGME_SIG_STAT_ERROR; - break; - } - } - if (r_created) - *r_created = sig->timestamp; - return sig->fpr; + -- Function: unsigned int gpgme_signers_count (const gpgme_ctx_t CTX) + The function ‘gpgme_signers_count’ returns the number of signer + keys in the context CTX. - -- Function: const char * gpgme_get_sig_string_attr (gpgme_ctx_t CTX, - int IDX, gpgme_attr_t WHAT, int WHATIDX) - The function ‘gpgme_get_sig_string_attr’ is equivalent to: + -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, + int SEQ) + The function ‘gpgme_signers_enum’ returns the SEQth key in the list + of signers in the context CTX. An additional reference is acquired + for the user. - gpgme_verify_result_t result; - gpgme_signature_t sig; + If SEQ is out of range, ‘NULL’ is returned. - result = gpgme_op_verify_result (ctx); - sig = result->signatures; + +File: gpgme.info, Node: Creating a Signature, Next: Signature Notation Data, Prev: Selecting Signers, Up: Sign - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return NULL; - - switch (what) - { - case GPGME_ATTR_FPR: - return sig->fpr; - - case GPGME_ATTR_ERRTOK: - if (whatidx == 1) - return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; - else - return ""; - default: - break; - } - - return NULL; - - -- Function: const char * gpgme_get_sig_ulong_attr (gpgme_ctx_t CTX, - int IDX, gpgme_attr_t WAHT, int WHATIDX) - The function ‘gpgme_get_sig_ulong_attr’ is equivalent to: - - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return 0; - - switch (what) - { - case GPGME_ATTR_CREATED: - return sig->timestamp; - - case GPGME_ATTR_EXPIRE: - return sig->exp_timestamp; - - case GPGME_ATTR_VALIDITY: - return (unsigned long) sig->validity; - - case GPGME_ATTR_SIG_STATUS: - switch (sig->status) - { - case GPG_ERR_NO_ERROR: - return GPGME_SIG_STAT_GOOD; - - case GPG_ERR_BAD_SIGNATURE: - return GPGME_SIG_STAT_BAD; - - case GPG_ERR_NO_PUBKEY: - return GPGME_SIG_STAT_NOKEY; - - case GPG_ERR_NO_DATA: - return GPGME_SIG_STAT_NOSIG; - - case GPG_ERR_SIG_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXP; - - case GPG_ERR_KEY_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXPKEY; - - default: - return GPGME_SIG_STAT_ERROR; - } - - case GPGME_ATTR_SIG_SUMMARY: - return sig->summary; - - default: - break; - } - return 0; - - -- Function: const char * gpgme_get_sig_key (gpgme_ctx_t CTX, int IDX, - gpgme_key_t *R_KEY) - The function ‘gpgme_get_sig_key’ is equivalent to: - - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - { - sig = sig->next; - idx--; - } - if (!sig || idx) - return gpg_error (GPG_ERR_EOF); - - return gpgme_get_key (ctx, sig->fpr, r_key, 0); - - -File: gpgme.info, Node: Decrypt and Verify, Next: Sign, Prev: Verify, Up: Crypto Operations - -7.7.3 Decrypt and Verify ------------------------- - - -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, - gpgme_data_t CIPHER, gpgme_data_t PLAIN) - The function ‘gpgme_op_decrypt_verify’ decrypts the ciphertext in - the data object CIPHER and stores it into the data object PLAIN. - If CIPHER contains signatures, they will be verified. - - After the operation completed, ‘gpgme_op_decrypt_result’ and - ‘gpgme_op_verify_result’ can be used to retrieve more information - about the signatures. - - If the error code ‘GPG_ERR_NO_DATA’ is returned, CIPHER does not - contain any data to decrypt. However, it might still be signed. - The information about detected signatures is available with - ‘gpgme_op_verify_result’ in this case. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - ciphertext could be decrypted successfully, ‘GPG_ERR_INV_VALUE’ if - CTX, CIPHER or PLAIN is not a valid pointer, ‘GPG_ERR_NO_DATA’ if - CIPHER does not contain any data to decrypt, - ‘GPG_ERR_DECRYPT_FAILED’ if CIPHER is not a valid cipher text, - ‘GPG_ERR_BAD_PASSPHRASE’ if the passphrase for the secret key could - not be retrieved, and passes through any errors that are reported - by the crypto engine support routines. - - -- Function: gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t CTX, - gpgme_data_t CIPHER, gpgme_data_t PLAIN) - The function ‘gpgme_op_decrypt_verify_start’ initiates a - ‘gpgme_op_decrypt_verify’ operation. It can be completed by - calling ‘gpgme_wait’ on the context. *Note Waiting For - Completion::. - - The function returns the error code ‘GPG_ERR_NO_ERROR’ if the - operation could be started successfully, ‘GPG_ERR_INV_VALUE’ if - CTX, CIPHER, PLAIN or R_STAT is not a valid pointer, and - ‘GPG_ERR_NO_DATA’ if CIPHER does not contain any data to decrypt. - - -File: gpgme.info, Node: Sign, Next: Encrypt, Prev: Decrypt and Verify, Up: Crypto Operations - -7.7.4 Sign ----------- - -A signature can contain signatures by one or more keys. The set of keys -used to create a signatures is contained in a context, and is applied to -all following signing operations in this context (until the set is -changed). - -* Menu: - -* Selecting Signers:: How to choose the keys to sign with. -* Creating a Signature:: How to create a signature. -* Signature Notation Data:: How to add notation data to a signature. - - -File: gpgme.info, Node: Selecting Signers, Next: Creating a Signature, Up: Sign - -7.7.4.1 Selecting Signers -......................... - - -- Function: void gpgme_signers_clear (gpgme_ctx_t CTX) - The function ‘gpgme_signers_clear’ releases a reference for each - key on the signers list and removes the list of signers from the - context CTX. - - Every context starts with an empty list. - - -- Function: gpgme_error_t gpgme_signers_add (gpgme_ctx_t CTX, - const gpgme_key_t KEY) - The function ‘gpgme_signers_add’ adds the key KEY to the list of - signers in the context CTX. - - Calling this function acquires an additional reference for the key. - - -- Function: unsigned int gpgme_signers_count (const gpgme_ctx_t CTX) - The function ‘gpgme_signers_count’ returns the number of signer - keys in the context CTX. - - -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, - int SEQ) - The function ‘gpgme_signers_enum’ returns the SEQth key in the list - of signers in the context CTX. An additional reference is acquired - for the user. - - If SEQ is out of range, ‘NULL’ is returned. - - -File: gpgme.info, Node: Creating a Signature, Next: Signature Notation Data, Prev: Selecting Signers, Up: Sign - -7.7.4.2 Creating a Signature -............................ +7.7.4.2 Creating a Signature +............................ -- Data type: enum gpgme_sig_mode_t The ‘gpgme_sig_mode_t’ type is used to specify the desired type of @@ -4990,6 +5045,12 @@ ‘PREP_ENCRYPT’ command). With the ‘GPGME_ENCRYPT_EXPECT_SIGN’ symbol the UI Server is advised to also expect a sign command. + ‘GPGME_ENCRYPT_SYMMETRIC’ + The ‘GPGME_ENCRYPT_SYMMETRIC’ symbol specifies that the output + should be additionally encrypted symmetically even if + recipients are provided. This feature is only supported for + for the OpenPGP crypto engine. + If ‘GPG_ERR_UNUSABLE_PUBKEY’ is returned, some recipients in RECP are invalid, but not all. In this case the plaintext might be encrypted for all valid recipients and returned in CIPHER (if this @@ -5082,9 +5143,11 @@ * Menu: * Running other Programs:: Running other Programs +* Using the Assuan protocol:: Using the Assuan protocol +* Checking for updates:: How to check for software updates  -File: gpgme.info, Node: Running other Programs, Up: Miscellaneous +File: gpgme.info, Node: Running other Programs, Next: Using the Assuan protocol, Up: Miscellaneous 7.8.1 Running other Programs ---------------------------- @@ -5096,10 +5159,10 @@ are part of the GnuPG system but are not directly accessible with the GPGME API. - -- Function: gpgme_error_t gpgme_op_spawn - (gpgme_ctx_t CTX, const char *FILE, const char *ARGV[], - gpgme_data_t DATAIN, gpgme_data_t DATAOUT, gpgme_data_t DATAERR, - unsigned int FLAGS) + -- Function: gpgme_error_t gpgme_op_spawn (gpgme_ctx_t CTX, + const char *FILE, const char *ARGV[], gpgme_data_t DATAIN, + gpgme_data_t DATAOUT, gpgme_data_t DATAERR, + unsigned int FLAGS) The function ‘gpgme_op_spawn’ runs the program FILE with the arguments taken from the NULL terminated array ARGV. If no @@ -5121,14 +5184,206 @@ Under Windows this flag allows the called program to put itself into the foreground. - -- Function: gpgme_error_t gpgme_op_spawn_start - (gpgme_ctx_t CTX, const char *FILE, const char *ARGV[], - gpgme_data_t DATAIN, gpgme_data_t DATAOUT, gpgme_data_t DATAERR, - unsigned int FLAGS) + -- Function: gpgme_error_t gpgme_op_spawn_start (gpgme_ctx_t CTX, + const char *FILE, const char *ARGV[], gpgme_data_t DATAIN, + gpgme_data_t DATAOUT, gpgme_data_t DATAERR, + unsigned int FLAGS) This is the asynchronous variant of ‘gpgme_op_spawn’.  +File: gpgme.info, Node: Using the Assuan protocol, Next: Checking for updates, Prev: Running other Programs, Up: Miscellaneous + +7.8.2 Using the Assuan protocol +------------------------------- + +The Assuan protocol can be used to talk to arbitrary Assuan servers. By +default it is connected to the GnuPG agent, but it may be connected to +arbitrary servers by using ‘gpgme_ctx_set_engine_info’, passing the +location of the servers socket as FILE_NAME argument, and an empty +string as HOME_DIR argument. + + The Assuan protocol functions use three kinds of callbacks to +transfer data: + + -- Data type: gpgme_error_t (*gpgme_assuan_data_cb_t) (void *OPAQUE, + const void *DATA, size_t DATALEN) + + This callback receives any data sent by the server. OPAQUE is the + pointer passed to ‘gpgme_op_assuan_transact_start’, DATA of length + DATALEN refers to the data sent. + + -- Data type: gpgme_error_t (*gpgme_assuan_inquire_cb_t) (void *OPAQUE, + const char *NAME, const char *ARGS, gpgme_data_t *R_DATA) + + This callback is used to provide additional data to the Assuan + server. OPAQUE is the pointer passed to + ‘gpgme_op_assuan_transact_start’, NAME and ARGS specify what kind + of data the server requested, and R_DATA is used to return the + actual data. + + Note: Returning data is currently not implemented in GPGME. + + -- Data type: gpgme_error_t (*gpgme_assuan_status_cb_t) (void *OPAQUE, + const char *STATUS, const char *ARGS) + + This callback receives any status lines sent by the server. OPAQUE + is the pointer passed to ‘gpgme_op_assuan_transact_start’, STATUS + and ARGS denote the status update sent. + + -- Function: gpgme_error_t gpgme_op_assuan_transact_start + (gpgme_ctx_t CTX, const char *COMMAND, + gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE, + gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE, + gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE) + + Send the Assuan COMMAND and return results via the callbacks. Any + callback may be ‘NULL’. The result of the operation may be + retrieved using ‘gpgme_wait_ext’. + + Asynchronous variant. + + -- Function: gpgme_error_t gpgme_op_assuan_transact_ext + (gpgme_ctx_t CTX, const char *COMMAND, + gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE, + gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE, + gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE, + gpgme_error_t *OP_ERR) + + Send the Assuan COMMAND and return results via the callbacks. The + result of the operation is returned in OP_ERR. + + Synchronous variant. + + +File: gpgme.info, Node: Checking for updates, Prev: Using the Assuan protocol, Up: Miscellaneous + +7.8.3 How to check for software updates +--------------------------------------- + +The GnuPG Project operates a server to query the current versions of +software packages related to GnuPG. GPGME can be used to access this +online database and check whether a new version of a software package is +available. + + -- Data type: gpgme_query_swdb_result_t + This is a pointer to a structure used to store the result of a + ‘gpgme_op_query_swdb’ operation. After success full call to that + function, you can retrieve the pointer to the result with + ‘gpgme_op_query_swdb_result’. The structure contains the following + member: + + ‘name’ + This is the name of the package. + + ‘iversion’ + The currently installed version or an empty string. This + value is either a copy of the argument given to + ‘gpgme_op_query_swdb’ or the version of the installed software + as figured out by GPGME or GnuPG. + + ‘created’ + This gives the date the file with the list of version numbers + has originally be created by the GnuPG project. + + ‘retrieved’ + This gives the date the file was downloaded. + + ‘warning’ + If this flag is set either an error has occurred or some of + the information in this structure are not properly set. For + example if the version number of the installed software could + not be figured out, the ‘update’ flag may not reflect a + required update status. + + ‘update’ + If this flag is set an update of the software is available. + + ‘urgent’ + If this flag is set an available update is important. + + ‘noinfo’ + If this flag is set, no valid information could be retrieved. + + ‘unknown’ + If this flag is set the given ‘name’ is not known. + + ‘tooold’ + If this flag is set the available information is not fresh + enough. + + ‘error’ + If this flag is set some other error has occured. + + ‘version’ + The version string of the latest released version. + + ‘reldate’ + The release date of the latest released version. + + -- Function: gpgme_error_t gpgme_op_query_swdb (gpgme_ctx_t CTX, + const char *NAME, const char *IVERSION, gpgme_data_t RESERVED) + + Query the software version database for software package NAME and + check against the installed version given by IVERSION. If IVERSION + is given as ‘NULL’ a check is only done if GPGME can figure out the + version by itself (for example when using "gpgme" or "gnupg"). If + ‘NULL’ is used for NAME the current gpgme version is checked. + RESERVED must be set to 0. + + -- Function: gpgme_query_swdb_result_t gpgme_op_query_swdb_result + (gpgme_ctx_t CTX) + + The function ‘gpgme_op_query_swdb_result’ returns a + ‘gpgme_query_swdb_result_t’ pointer to a structure holding the + result of a ‘gpgme_op_query_swdb’ operation. The pointer is only + valid if the last operation on the context was a sucessful call to + ‘gpgme_op_query_swdb’. If that call failed, the result might be a + ‘NULL’ pointer. The returned pointer is only valid until the next + operation is started on the context CTX. + +Here is an example on how to check whether GnuPG is current: + + #include + + int + main (void) + { + gpg_error_t err; + gpgme_ctx_t ctx; + gpgme_query_swdb_result_t result; + + gpgme_check_version (NULL); + err = gpgme_new (&ctx); + if (err) + fprintf (stderr, "error creating context: %s\n", gpg_strerror (err)); + else + { + gpgme_set_protocol (ctx, GPGME_PROTOCOL_GPGCONF); + + err = gpgme_op_query_swdb (ctx, "gnupg", NULL, 0); + if (err) + fprintf (stderr, "error querying swdb: %s\n", gpg_strerror (err)); + else + { + result = gpgme_op_query_swdb_result (ctx); + if (!result) + fprintf (stderr, "error querying swdb\n"); + if (!result->warning && !result->update) + printf ("GnuPG version %s is current\n", + result->iversion); + else if (!result->warning && result->update) + printf ("GnuPG version %s can be updated to %s\n", + result->iversion, result->version); + else + fprintf (stderr, "error finding the update status\n"); + } + gpgme_release (ctx); + } + return 0; + } + + File: gpgme.info, Node: Run Control, Prev: Miscellaneous, Up: Contexts 7.9 Run Control @@ -5499,6 +5754,7 @@ fd_set wfds; int i, n; int any = 0; + struct timeval tv; struct one_fd *fdlist = loop->fds; pthread_mutex_lock (&loop->lock); @@ -5507,11 +5763,14 @@ for (i = 0; i < MAX_FDS; i++) if (fdlist[i].fd != -1) FD_SET (fdlist[i].fd, fdlist[i].dir ? &rfds : &wfds); - pthread_mutex_unlock (&loop->unlock); + pthread_mutex_unlock (&loop->lock); + + tv.tv_sec = 0; + tv.tv_usec = 1000; do { - n = select (FD_SETSIZE, &rfds, &wfds, NULL, 0); + n = select (FD_SETSIZE, &rfds, &wfds, NULL, &tv); } while (n < 0 && errno == EINTR); @@ -5563,6 +5822,7 @@ gpgme_error_t err; gpgme_data_t sig, text; int i; + pthread_mutexattr_t attr; struct gpgme_io_cbs io_cbs = { add_io_cb, @@ -5572,12 +5832,19 @@ &result }; - init_gpgme (void); + init_gpgme (); /* Initialize the loop structure. */ - pthread_mutex_init (&loop.lock, NULL); + + /* The mutex must be recursive, since remove_io_cb (which acquires a + lock) can be called while holding a lock acquired in do_select. */ + pthread_mutexattr_init (&attr); + pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init (&loop.lock, &attr); + pthread_mutexattr_destroy (&attr); + for (i = 0; i < MAX_FDS; i++) - loop->fds[i].fd = -1; + loop.fds[i].fd = -1; /* Initialize the result structure. */ result.done = 0; @@ -5807,28 +6074,27 @@ in the context CTX. This only works if you use the global event loop or your own event loop. - If you use the global event loop, you must not call ‘gpgme_wait’ or - ‘gpgme_wait’ during cancellation. After successful cancellation, - you can call ‘gpgme_wait’ (optionally waiting on CTX), and the - context CTX will appear as if it had finished with the error code - ‘GPG_ERR_CANCEL’. + If you use the global event loop, you must not call ‘gpgme_wait’ + during cancellation. After successful cancellation, you can call + ‘gpgme_wait’ (optionally waiting on CTX), and the context CTX will + appear as if it had finished with the error code ‘GPG_ERR_CANCEL’. - If you use your an external event loop, you must ensure that no I/O + If you use an external event loop, you must ensure that no I/O callbacks are invoked for this context (for example by halting the event loop). On successful cancellation, all registered I/O callbacks for this context will be unregistered, and a ‘GPGME_EVENT_DONE’ event with the error code ‘GPG_ERR_CANCEL’ will - be signaled. + be signalled. The function returns an error code if the cancellation failed (in this case the state of CTX is not modified). -- Function: gpgme_ctx_t gpgme_cancel_async (gpgme_ctx_t CTX) - The function ‘gpgme_cancel’ attempts to cancel a pending operation - in the context CTX. This can be called by any thread at any time - after starting an operation on the context, but will not take - effect immediately. The actual cancellation happens at the next - time GPGME processes I/O in that context. + The function ‘gpgme_cancel_async’ attempts to cancel a pending + operation in the context CTX. This can be called by any thread at + any time after starting an operation on the context, but will not + take effect immediately. The actual cancellation happens at the + next time GPGME processes I/O in that context. The function returns an error code if the cancellation failed (in this case the state of CTX is not modified). @@ -5975,7 +6241,21 @@ Here is an example of a complete encryption sequence; client lines are indicated by a C:, server responses by C:: - C: S: C: S: C: S: C: S: S: C: S: C: S: C: S: + C: RESET + S: OK + C: RECIPIENT foo@example.net + S: OK + C: RECIPIENT bar@example.com + S: OK + C: PREP_ENCRYPT + S: S PROTOCOL OpenPGP + S: OK + C: INPUT FD=17 + S: OK + C: OUTPUT FD=18 + S: OK + C: ENCRYPT + S: OK  File: gpgme.info, Node: UI Server Sign, Next: UI Server Decrypt, Prev: UI Server Encrypt, Up: UI Server Protocol @@ -6055,11 +6335,14 @@ The decryption is started with the command: -- Command: DECRYPT --protocol=NAME [--no-verify] + [--export-session-key] NAME is the encryption protocol used for the message. For a description of the allowed protocols see the ‘ENCRYPT’ command. This argument is mandatory. If the option ‘--no-verify’ is given, the server should not try to verify a signature, in case the input - data is an OpenPGP combined message. + data is an OpenPGP combined message. If the option + ‘--export-session-key’ is given and the underlying engine knows how + to export the session key, it will appear on a status line  File: gpgme.info, Node: UI Server Verify, Next: UI Server Set Input Files, Prev: UI Server Decrypt, Up: UI Server Protocol @@ -6388,7 +6671,7 @@ the last command. A ‘RESET’ undoes the effect of this command.  -File: gpgme.info, Node: Debugging, Next: Library Copying, Prev: UI Server Protocol, Up: Top +File: gpgme.info, Node: Debugging, Next: Deprecated Functions, Prev: UI Server Protocol, Up: Top Appendix B How to solve problems ******************************** @@ -6424,526 +6707,647 @@ run your tests only with play data.  -File: gpgme.info, Node: Library Copying, Next: Copying, Prev: Debugging, Up: Top +File: gpgme.info, Node: Deprecated Functions, Next: Library Copying, Prev: Debugging, Up: Top -GNU Lesser General Public License -********************************* +Appendix C Deprecated Functions +******************************* - Version 2.1, February 1999 +For backward compatibility GPGME has a number of functions, data types +and constants which are deprecated and should not be used anymore. We +document here those which are really old to help understanding old code +and to allow migration to their modern counterparts. - Copyright © 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence the - version number 2.1.] - -Preamble -======== - -The licenses for most software are designed to take away your freedom to -share and change it. By contrast, the GNU General Public Licenses are -intended to guarantee your freedom to share and change free software—to -make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software—typically libraries—of the Free Software -Foundation and other authors who decide to use it. You can use it too, -but we suggest you first think carefully about whether this license or -the ordinary General Public License is the better strategy to use in any -particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of it -in new free programs; and that you are informed that you can do these -things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling it. -And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that there -is no warranty for the free library. Also, if the library is modified -by someone else and passed on, the recipients should know that what they -have is not the original version, so that the original author’s -reputation will not be affected by problems that might be introduced by -others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that any -patent license obtained for a version of the library must be consistent -with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and is -quite different from the ordinary General Public License. We use this -license for certain libraries in order to permit linking those libraries -into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the entire -combination fits its criteria of freedom. The Lesser General Public -License permits more lax criteria for linking other code with the -library. - - We call this license the "Lesser" General Public License because it -does _Less_ to protect the user’s freedom than the ordinary General -Public License. It also provides other free software developers Less of -an advantage over competing non-free programs. These disadvantages are -the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free library -does the same job as widely used non-free libraries. In this case, -there is little to gain by limiting the free library to free software -only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of free -software. For example, permission to use the GNU C Library in non-free -programs enables many more people to use the whole GNU operating system, -as well as its variant, the GNU/Linux operating system. - - Although the Lesser General Public License is Less protective of the -users’ freedom, it does ensure that the user of a program that is linked -with the Library has the freedom and the wherewithal to run that program -using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -“work based on the library†and a “work that uses the libraryâ€. The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other - program which contains a notice placed by the copyright holder or - other authorized party saying it may be distributed under the terms - of this Lesser General Public License (also called “this Licenseâ€). - Each licensee is addressed as “youâ€. - - A “library†means a collection of software functions and/or data - prepared so as to be conveniently linked with application programs - (which use some of those functions and data) to form executables. - - The “Libraryâ€, below, refers to any such software library or work - which has been distributed under these terms. A “work based on the - Library†means either the Library or any derivative work under - copyright law: that is to say, a work containing the Library or a - portion of it, either verbatim or with modifications and/or - translated straightforwardly into another language. (Hereinafter, - translation is included without limitation in the term - “modificationâ€.) - - “Source code†for a work means the preferred form of the work for - making modifications to it. For a library, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the library. - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running a program using the Library is not restricted, and - output from such a program is covered only if its contents - constitute a work based on the Library (independent of the use of - the Library in a tool for writing it). Whether that is true - depends on what the Library does and what the program that uses the - Library does. - - 1. You may copy and distribute verbatim copies of the Library’s - complete source code as you receive it, in any medium, provided - that you conspicuously and appropriately publish on each copy an - appropriate copyright notice and disclaimer of warranty; keep - intact all the notices that refer to this License and to the - absence of any warranty; and distribute a copy of this License - along with the Library. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Library or any portion of - it, thus forming a work based on the Library, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. The modified work must itself be a software library. - - b. You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c. You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d. If a facility in the modified Library refers to a function or - a table of data to be supplied by an application program that - uses the facility, other than as an argument passed when the - facility is invoked, then you must make a good faith effort to - ensure that, in the event an application does not supply such - function or table, the facility still operates, and performs - whatever part of its purpose remains meaningful. - - (For example, a function in a library to compute square roots - has a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function - must be optional: if the application does not supply it, the - square root function must still compute square roots.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Library, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not apply - to those sections when you distribute them as separate works. But - when you distribute the same sections as part of a whole which is a - work based on the Library, the distribution of the whole must be on - the terms of this License, whose permissions for other licensees - extend to the entire whole, and thus to each and every part - regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Library. - - In addition, mere aggregation of another work not based on the - Library with the Library (or with a work based on the Library) on a - volume of a storage or distribution medium does not bring the other - work under the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public - License instead of this License to a given copy of the Library. To - do this, you must alter all the notices that refer to this License, - so that they refer to the ordinary GNU General Public License, - version 2, instead of to this License. (If a newer version than - version 2 of the ordinary GNU General Public License has appeared, - then you can specify that version instead if you wish.) Do not - make any other change in these notices. - - Once this change is made in a given copy, it is irreversible for - that copy, so the ordinary GNU General Public License applies to - all subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of the - Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or derivative - of it, under Section 2) in object code or executable form under the - terms of Sections 1 and 2 above provided that you accompany it with - the complete corresponding machine-readable source code, which must - be distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy - from a designated place, then offering equivalent access to copy - the source code from the same place satisfies the requirement to - distribute the source code, even though third parties are not - compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the - Library, but is designed to work with the Library by being compiled - or linked with it, is called a “work that uses the Libraryâ€. Such - a work, in isolation, is not a derivative work of the Library, and - therefore falls outside the scope of this License. - - However, linking a “work that uses the Library†with the Library - creates an executable that is a derivative of the Library (because - it contains portions of the Library), rather than a “work that uses - the libraryâ€. The executable is therefore covered by this License. - Section 6 states terms for distribution of such executables. - - When a “work that uses the Library†uses material from a header - file that is part of the Library, the object code for the work may - be a derivative work of the Library even though the source code is - not. Whether this is true is especially significant if the work - can be linked without the Library, or if the work is itself a - library. The threshold for this to be true is not precisely - defined by law. - - If such an object file uses only numerical parameters, data - structure layouts and accessors, and small macros and small inline - functions (ten lines or less in length), then the use of the object - file is unrestricted, regardless of whether it is legally a - derivative work. (Executables containing this object code plus - portions of the Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may - distribute the object code for the work under the terms of Section - 6. Any executables containing that work also fall under Section 6, - whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or link - a “work that uses the Library†with the Library to produce a work - containing portions of the Library, and distribute that work under - terms of your choice, provided that the terms permit modification - of the work for the customer’s own use and reverse engineering for - debugging such modifications. - - You must give prominent notice with each copy of the work that the - Library is used in it and that the Library and its use are covered - by this License. You must supply a copy of this License. If the - work during execution displays copyright notices, you must include - the copyright notice for the Library among them, as well as a - reference directing the user to the copy of this License. Also, - you must do one of these things: - - a. Accompany the work with the complete corresponding - machine-readable source code for the Library including - whatever changes were used in the work (which must be - distributed under Sections 1 and 2 above); and, if the work is - an executable linked with the Library, with the complete - machine-readable “work that uses the Libraryâ€, as object code - and/or source code, so that the user can modify the Library - and then relink to produce a modified executable containing - the modified Library. (It is understood that the user who - changes the contents of definitions files in the Library will - not necessarily be able to recompile the application to use - the modified definitions.) - - b. Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run - time a copy of the library already present on the user’s - computer system, rather than copying library functions into - the executable, and (2) will operate properly with a modified - version of the library, if the user installs one, as long as - the modified version is interface-compatible with the version - that the work was made with. - - c. Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d. If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the - above specified materials from the same place. - - e. Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the “work that uses the - Library†must include any data and utility programs needed for - reproducing the executable from it. However, as a special - exception, the materials to be distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of - the operating system on which the executable runs, unless that - component itself accompanies the executable. - - It may happen that this requirement contradicts the license - restrictions of other proprietary libraries that do not normally - accompany the operating system. Such a contradiction means you - cannot use both them and the Library together in an executable that - you distribute. - - 7. You may place library facilities that are a work based on the - Library side-by-side in a single library together with other - library facilities not covered by this License, and distribute such - a combined library, provided that the separate distribution of the - work based on the Library and of the other library facilities is - otherwise permitted, and provided that you do these two things: - - a. Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b. Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same - work. - - 8. You may not copy, modify, sublicense, link with, or distribute the - Library except as expressly provided under this License. Any - attempt otherwise to copy, modify, sublicense, link with, or - distribute the Library is void, and will automatically terminate - your rights under this License. However, parties who have received - copies, or rights, from you under this License will not have their - licenses terminated so long as such parties remain in full - compliance. - - 9. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Library or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Library (or any work - based on the Library), you indicate your acceptance of this License - to do so, and all its terms and conditions for copying, - distributing or modifying the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the - Library), the recipient automatically receives a license from the - original licensor to copy, distribute, link with or modify the - Library subject to these terms and conditions. You may not impose - any further restrictions on the recipients’ exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties with this License. - - 11. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Library at all. For example, if a patent license would not permit - royalty-free redistribution of the Library by all those who receive - copies directly or indirectly through you, then the only way you - could satisfy both it and this License would be to refrain entirely - from distribution of the Library. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply, and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Library under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 13. The Free Software Foundation may publish revised and/or new - versions of the Lesser General Public License from time to time. - Such new versions will be similar in spirit to the present version, - but may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Library specifies a version number of this License which applies to - it and “any later versionâ€, you have the option of following the - terms and conditions either of that version or of any later version - published by the Free Software Foundation. If the Library does not - specify a license version number, you may choose any version ever - published by the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free - programs whose distribution conditions are incompatible with these, - write to the author to ask for permission. For software which is - copyrighted by the Free Software Foundation, write to the Free - Software Foundation; we sometimes make exceptions for this. Our - decision will be guided by the two goals of preserving the free - status of all derivatives of our free software and of promoting the - sharing and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS - AND/OR OTHER PARTIES PROVIDE THE LIBRARY “AS IS†WITHOUT WARRANTY - OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE - DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR - OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY - OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + *Warning:* These interfaces will be removed in a future version of +GPGME. + + -- Function: void gpgme_key_release (gpgme_key_t KEY) + The function ‘gpgme_key_release’ is equivalent to + ‘gpgme_key_unref’. - END OF TERMS AND CONDITIONS + -- Function: void gpgme_trust_item_release (gpgme_trust_item_t ITEM) + The function ‘gpgme_trust_item_release’ is an alias for + ‘gpgme_trust_item_unref’. -How to Apply These Terms to Your New Libraries -============================================== + -- Function: gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t CTX, + gpgme_data_t KEYDATA, int *NR) + The function ‘gpgme_op_import_ext’ is equivalent to: + + gpgme_error_t err = gpgme_op_import (ctx, keydata); + if (!err) + { + gpgme_import_result_t result = gpgme_op_import_result (ctx); + *nr = result->considered; + } + + -- Data type: gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, + gpgme_status_code_t STATUS, const char *ARGS, int FD) + The ‘gpgme_edit_cb_t’ type is the type of functions which GPGME + calls if it a key edit operation is on-going. The status code + STATUS and the argument line ARGS are passed through by GPGME from + the crypto engine. The file descriptor FD is -1 for normal status + messages. If STATUS indicates a command rather than a status + message, the response to the command should be written to FD. The + HANDLE is provided by the user at start of operation. + + The function should return ‘GPG_ERR_FALSE’ if it did not handle the + status code, ‘0’ for success, or any other error value. + + -- Function: gpgme_error_t gpgme_op_edit (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use ‘gpgme_op_interact’ + instead. + + The function ‘gpgme_op_edit’ processes the key KEY interactively, + using the edit callback function FNC with the handle HANDLE. The + callback is invoked for every status and command request from the + crypto engine. The output of the crypto engine is written to the + data object OUT. + + Note that the protocol between the callback function and the crypto + engine is specific to the crypto engine and no further support in + implementing this protocol correctly is provided by GPGME. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the edit + operation completes successfully, ‘GPG_ERR_INV_VALUE’ if CTX or KEY + is not a valid pointer, and any error returned by the crypto engine + or the edit callback handler. + + -- Function: gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use + ‘gpgme_op_interact_start’ instead. + + The function ‘gpgme_op_edit_start’ initiates a ‘gpgme_op_edit’ + operation. It can be completed by calling ‘gpgme_wait’ on the + context. *Note Waiting For Completion::. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX + or KEY is not a valid pointer. + + -- Function: gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use ‘gpgme_op_interact’ + with the flag ‘GPGME_INTERACT_CARD’ instead. + + The function ‘gpgme_op_card_edit’ is analogous to ‘gpgme_op_edit’, + but should be used to process the smart card corresponding to the + key KEY. + + -- Function: gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t CTX, + gpgme_key_t KEY, gpgme_edit_cb_t FNC, void *HANDLE, + gpgme_data_t OUT) + Note: This function is deprecated, please use + ‘gpgme_op_interact_start’ with the flag ‘GPGME_INTERACT_CARD’ + instead. + + The function ‘gpgme_op_card_edit_start’ initiates a + ‘gpgme_op_card_edit’ operation. It can be completed by calling + ‘gpgme_wait’ on the context. *Note Waiting For Completion::. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the + operation was started successfully, and ‘GPG_ERR_INV_VALUE’ if CTX + or KEY is not a valid pointer. + + -- Function: gpgme_error_t gpgme_data_new_with_read_cb + (gpgme_data_t *DH, int (*READFUNC) (void *HOOK, char *BUFFER, + size_t COUNT, size_t *NREAD), void *HOOK_VALUE) + The function ‘gpgme_data_new_with_read_cb’ creates a new + ‘gpgme_data_t’ object and uses the callback function READFUNC to + retrieve the data on demand. As the callback function can supply + the data in any way it wants, this is the most flexible data type + GPGME provides. However, it can not be used to write data. + + The callback function receives HOOK_VALUE as its first argument + whenever it is invoked. It should return up to COUNT bytes in + BUFFER, and return the number of bytes actually read in NREAD. It + may return ‘0’ in NREAD if no data is currently available. To + indicate ‘EOF’ the function should return with an error code of + ‘-1’ and set NREAD to ‘0’. The callback function may support to + reset its internal read pointer if it is invoked with BUFFER and + NREAD being ‘NULL’ and COUNT being ‘0’. + + The function returns the error code ‘GPG_ERR_NO_ERROR’ if the data + object was successfully created, ‘GPG_ERR_INV_VALUE’ if DH or + READFUNC is not a valid pointer, and ‘GPG_ERR_ENOMEM’ if not enough + memory is available. + + -- Function: gpgme_error_t gpgme_data_rewind (gpgme_data_t DH) + The function ‘gpgme_data_rewind’ is equivalent to: + + return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) + ? gpgme_error_from_errno (errno) : 0; + + -- Data type: gpgme_attr_t + The ‘gpgme_attr_t’ type is used to specify a key or trust item + attribute. The following attributes are defined: + + ‘GPGME_ATTR_KEYID’ + This is the key ID of a sub key. It is representable as a + string. + + For trust items, the trust item refers to the key with this + ID. + + ‘GPGME_ATTR_FPR’ + This is the fingerprint of a sub key. It is representable as + a string. + + ‘GPGME_ATTR_ALGO’ + This is the crypto algorithm for which the sub key can be + used. It is representable as a string and as a number. The + numbers correspond to the ‘enum gcry_pk_algos’ values in the + gcrypt library. + + ‘GPGME_ATTR_LEN’ + This is the key length of a sub key. It is representable as a + number. + + ‘GPGME_ATTR_CREATED’ + This is the timestamp at creation time of a sub key. It is + representable as a number. + + ‘GPGME_ATTR_EXPIRE’ + This is the expiration time of a sub key. It is representable + as a number. + + ‘GPGME_ATTR_OTRUST’ + XXX FIXME (also for trust items) + + ‘GPGME_ATTR_USERID’ + This is a user ID. There can be more than one user IDs in a + GPGME_KEY_T object. The first one (with index 0) is the + primary user ID. The user ID is representable as a number. + + For trust items, this is the user ID associated with this + trust item. + + ‘GPGME_ATTR_NAME’ + This is the name belonging to a user ID. It is representable + as a string. + + ‘GPGME_ATTR_EMAIL’ + This is the email address belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_COMMENT’ + This is the comment belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_VALIDITY’ + This is the validity belonging to a user ID. It is + representable as a string and as a number. See below for a + list of available validities. + + For trust items, this is the validity that is associated with + this trust item. + + ‘GPGME_ATTR_UID_REVOKED’ + This specifies if a user ID is revoked. It is representable + as a number, and is ‘1’ if the user ID is revoked, and ‘0’ + otherwise. + + ‘GPGME_ATTR_UID_INVALID’ + This specifies if a user ID is invalid. It is representable + as a number, and is ‘1’ if the user ID is invalid, and ‘0’ + otherwise. + + ‘GPGME_ATTR_LEVEL’ + This is the trust level of a trust item. + + ‘GPGME_ATTR_TYPE’ + This returns information about the type of key. For the + string function this will eother be "PGP" or "X.509". The + integer function returns 0 for PGP and 1 for X.509. It is + also used for the type of a trust item. + + ‘GPGME_ATTR_IS_SECRET’ + This specifies if the key is a secret key. It is + representable as a number, and is ‘1’ if the key is revoked, + and ‘0’ otherwise. + + ‘GPGME_ATTR_KEY_REVOKED’ + This specifies if a sub key is revoked. It is representable + as a number, and is ‘1’ if the key is revoked, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_INVALID’ + This specifies if a sub key is invalid. It is representable + as a number, and is ‘1’ if the key is invalid, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_EXPIRED’ + This specifies if a sub key is expired. It is representable + as a number, and is ‘1’ if the key is expired, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_DISABLED’ + This specifies if a sub key is disabled. It is representable + as a number, and is ‘1’ if the key is disabled, and ‘0’ + otherwise. + + ‘GPGME_ATTR_KEY_CAPS’ + This is a description of the capabilities of a sub key. It is + representable as a string. The string contains the letter “e†+ if the key can be used for encryption, “s†if the key can be + used for signatures, and “c†if the key can be used for + certifications. + + ‘GPGME_ATTR_CAN_ENCRYPT’ + This specifies if a sub key can be used for encryption. It is + representable as a number, and is ‘1’ if the sub key can be + used for encryption, and ‘0’ otherwise. + + ‘GPGME_ATTR_CAN_SIGN’ + This specifies if a sub key can be used to create data + signatures. It is representable as a number, and is ‘1’ if + the sub key can be used for signatures, and ‘0’ otherwise. + + ‘GPGME_ATTR_CAN_CERTIFY’ + This specifies if a sub key can be used to create key + certificates. It is representable as a number, and is ‘1’ if + the sub key can be used for certifications, and ‘0’ otherwise. -If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of -the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should have -at least the “copyright†line and a pointer to where the full notice is -found. - - ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - This library 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. - - This library 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 library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, - USA. - - Also add information on how to contact you by electronic and paper -mail. - - You should also get your employer (if you work as a programmer) or -your school, if any, to sign a “copyright disclaimer†for the library, -if necessary. Here is a sample; alter the names: + ‘GPGME_ATTR_SERIAL’ + The X.509 issuer serial attribute of the key. It is + representable as a string. - Yoyodyne, Inc., hereby disclaims all copyright interest in the library - `Frob' (a library for tweaking knobs) written by James Random Hacker. + ‘GPGME_ATTR_ISSUE’ + The X.509 issuer name attribute of the key. It is + representable as a string. - SIGNATURE OF TY COON, 1 April 1990 - Ty Coon, President of Vice + ‘GPGME_ATTR_CHAINID’ + The X.509 chain ID can be used to build the certification + chain. It is representable as a string. - That’s all there is to it! + -- Function: const char * gpgme_key_get_string_attr (gpgme_key_t KEY, + gpgme_attr_t WHAT, const void *RESERVED, int IDX) + The function ‘gpgme_key_get_string_attr’ returns the value of the + string-representable attribute WHAT of key KEY. If the attribute + is an attribute of a sub key or an user ID, IDX specifies the sub + key or user ID of which the attribute value is returned. The + argument RESERVED is reserved for later use and should be ‘NULL’. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Function: unsigned long gpgme_key_get_ulong_attr (gpgme_key_t KEY, + gpgme_attr_t WHAT, const void *RESERVED, int IDX) + The function ‘gpgme_key_get_ulong_attr’ returns the value of the + number-representable attribute WHAT of key KEY. If the attribute + is an attribute of a sub key or an user ID, IDX specifies the sub + key or user ID of which the attribute value is returned. The + argument RESERVED is reserved for later use and should be ‘NULL’. + + The function returns ‘0’ if the attribute can’t be returned as a + number, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + The signatures on a key are only available if the key was retrieved +via a listing operation with the ‘GPGME_KEYLIST_MODE_SIGS’ mode enabled, +because it is expensive to retrieve all signatures of a key. + + So, before using the below interfaces to retrieve the signatures on a +key, you have to make sure that the key was listed with signatures +enabled. One convenient, but blocking, way to do this is to use the +function ‘gpgme_get_key’. + + -- Data type: gpgme_attr_t + The ‘gpgme_attr_t’ type is used to specify a key signature + attribute. The following attributes are defined: + + ‘GPGME_ATTR_KEYID’ + This is the key ID of the key which was used for the + signature. It is representable as a string. + + ‘GPGME_ATTR_ALGO’ + This is the crypto algorithm used to create the signature. It + is representable as a string and as a number. The numbers + correspond to the ‘enum gcry_pk_algos’ values in the gcrypt + library. + + ‘GPGME_ATTR_CREATED’ + This is the timestamp at creation time of the signature. It + is representable as a number. + + ‘GPGME_ATTR_EXPIRE’ + This is the expiration time of the signature. It is + representable as a number. + + ‘GPGME_ATTR_USERID’ + This is the user ID associated with the signing key. The user + ID is representable as a number. + + ‘GPGME_ATTR_NAME’ + This is the name belonging to a user ID. It is representable + as a string. + + ‘GPGME_ATTR_EMAIL’ + This is the email address belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_COMMENT’ + This is the comment belonging to a user ID. It is + representable as a string. + + ‘GPGME_ATTR_KEY_REVOKED’ + This specifies if a key signature is a revocation signature. + It is representable as a number, and is ‘1’ if the key is + revoked, and ‘0’ otherwise. + + ‘GPGME_ATTR_SIG_CLASS’ + This specifies the signature class of a key signature. It is + representable as a number. The meaning is specific to the + crypto engine. + + ‘GPGME_ATTR_SIG_CLASS’ + This specifies the signature class of a key signature. It is + representable as a number. The meaning is specific to the + crypto engine. + + ‘GPGME_ATTR_SIG_STATUS’ + This is the same value as returned by ‘gpgme_get_sig_status’. + + -- Function: const char * gpgme_key_sig_get_string_attr + (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_key_sig_get_string_attr’ returns the value of + the string-representable attribute WHAT of the signature IDX on the + user ID UID_IDX in the key KEY. The argument RESERVED is reserved + for later use and should be ‘NULL’. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, UID_IDX or IDX out of range, or + RESERVED not ‘NULL’. + + -- Function: unsigned long gpgme_key_sig_get_ulong_attr + (gpgme_key_t KEY, int UID_IDX, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_key_sig_get_ulong_attr’ returns the value of + the number-representable attribute WHAT of the signature IDX on the + user ID UID_IDX in the key KEY. The argument RESERVED is reserved + for later use and should be ‘NULL’. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, UID_IDX or IDX out of range, or + RESERVED not ‘NULL’. + + Trust items have attributes which can be queried using the interfaces +below. The attribute identifiers are shared with those for key +attributes. *Note Information About Keys::. + + -- Function: const char * gpgme_trust_item_get_string_attr + (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_trust_item_get_string_attr’ returns the value + of the string-representable attribute WHAT of trust item ITEM. The + arguments IDX and RESERVED are reserved for later use and should be + ‘0’ and ‘NULL’ respectively. + + The string returned is only valid as long as the key is valid. + + The function returns ‘0’ if an attribute can’t be returned as a + string, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Function: int gpgme_trust_item_get_int_attr + (gpgme_trust_item_t ITEM, gpgme_attr_t WHAT, + const void *RESERVED, int IDX) + The function ‘gpgme_trust_item_get_int_attr’ returns the value of + the number-representable attribute WHAT of trust item ITEM. If the + attribute occurs more than once in the trust item, the index is + specified by IDX. However, currently no such attribute exists, so + IDX should be ‘0’. The argument RESERVED is reserved for later use + and should be ‘NULL’. + + The function returns ‘0’ if the attribute can’t be returned as a + number, KEY is not a valid pointer, IDX out of range, or RESERVED + not ‘NULL’. + + -- Data type: enum gpgme_sig_stat_t + The ‘gpgme_sig_stat_t’ type holds the result of a signature check, + or the combined result of all signatures. The following results + are possible: + + ‘GPGME_SIG_STAT_NONE’ + This status should not occur in normal operation. + + ‘GPGME_SIG_STAT_GOOD’ + This status indicates that the signature is valid. For the + combined result this status means that all signatures are + valid. + + ‘GPGME_SIG_STAT_GOOD_EXP’ + This status indicates that the signature is valid but expired. + For the combined result this status means that all signatures + are valid and expired. + + ‘GPGME_SIG_STAT_GOOD_EXPKEY’ + This status indicates that the signature is valid but the key + used to verify the signature has expired. For the combined + result this status means that all signatures are valid and all + keys are expired. + + ‘GPGME_SIG_STAT_BAD’ + This status indicates that the signature is invalid. For the + combined result this status means that all signatures are + invalid. + + ‘GPGME_SIG_STAT_NOKEY’ + This status indicates that the signature could not be verified + due to a missing key. For the combined result this status + means that all signatures could not be checked due to missing + keys. + + ‘GPGME_SIG_STAT_NOSIG’ + This status indicates that the signature data provided was not + a real signature. + + ‘GPGME_SIG_STAT_ERROR’ + This status indicates that there was some other error which + prevented the signature verification. + + ‘GPGME_SIG_STAT_DIFF’ + For the combined result this status means that at least two + signatures have a different status. You can get each key’s + status with ‘gpgme_get_sig_status’. + + -- Function: const char * gpgme_get_sig_status (gpgme_ctx_t CTX, + int IDX, gpgme_sig_stat_t *R_STAT, time_t *R_CREATED) + The function ‘gpgme_get_sig_status’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return NULL; + + if (r_stat) + { + switch (gpg_err_code (sig->status)) + { + case GPG_ERR_NO_ERROR: + *r_stat = GPGME_SIG_STAT_GOOD; + break; + + case GPG_ERR_BAD_SIGNATURE: + *r_stat = GPGME_SIG_STAT_BAD; + break; + + case GPG_ERR_NO_PUBKEY: + *r_stat = GPGME_SIG_STAT_NOKEY; + break; + + case GPG_ERR_NO_DATA: + *r_stat = GPGME_SIG_STAT_NOSIG; + break; + + case GPG_ERR_SIG_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXP; + break; + + case GPG_ERR_KEY_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; + break; + + default: + *r_stat = GPGME_SIG_STAT_ERROR; + break; + } + } + if (r_created) + *r_created = sig->timestamp; + return sig->fpr; + + -- Function: const char * gpgme_get_sig_string_attr (gpgme_ctx_t CTX, + int IDX, gpgme_attr_t WHAT, int WHATIDX) + The function ‘gpgme_get_sig_string_attr’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return NULL; + + switch (what) + { + case GPGME_ATTR_FPR: + return sig->fpr; + + case GPGME_ATTR_ERRTOK: + if (whatidx == 1) + return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; + else + return ""; + default: + break; + } + + return NULL; + + -- Function: const char * gpgme_get_sig_ulong_attr (gpgme_ctx_t CTX, + int IDX, gpgme_attr_t WAHT, int WHATIDX) + The function ‘gpgme_get_sig_ulong_attr’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return 0; + + switch (what) + { + case GPGME_ATTR_CREATED: + return sig->timestamp; + + case GPGME_ATTR_EXPIRE: + return sig->exp_timestamp; + + case GPGME_ATTR_VALIDITY: + return (unsigned long) sig->validity; + + case GPGME_ATTR_SIG_STATUS: + switch (sig->status) + { + case GPG_ERR_NO_ERROR: + return GPGME_SIG_STAT_GOOD; + + case GPG_ERR_BAD_SIGNATURE: + return GPGME_SIG_STAT_BAD; + + case GPG_ERR_NO_PUBKEY: + return GPGME_SIG_STAT_NOKEY; + + case GPG_ERR_NO_DATA: + return GPGME_SIG_STAT_NOSIG; + + case GPG_ERR_SIG_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXP; + + case GPG_ERR_KEY_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXPKEY; + + default: + return GPGME_SIG_STAT_ERROR; + } + + case GPGME_ATTR_SIG_SUMMARY: + return sig->summary; + + default: + break; + } + return 0; + + -- Function: const char * gpgme_get_sig_key (gpgme_ctx_t CTX, int IDX, + gpgme_key_t *R_KEY) + The function ‘gpgme_get_sig_key’ is equivalent to: + + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + { + sig = sig->next; + idx--; + } + if (!sig || idx) + return gpg_error (GPG_ERR_EOF); + + return gpgme_get_key (ctx, sig->fpr, r_key, 0); diff -Nru gpgme1.0-1.6.0/doc/gpgme.info-2 gpgme1.0-1.8.0/doc/gpgme.info-2 --- gpgme1.0-1.6.0/doc/gpgme.info-2 2015-08-26 08:05:19.000000000 +0000 +++ gpgme1.0-1.8.0/doc/gpgme.info-2 2016-11-16 12:29:43.000000000 +0000 @@ -1,7 +1,6 @@ This is gpgme.info, produced by makeinfo version 5.2 from gpgme.texi. -Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, 2013, -2014 g10 Code GmbH. +Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -20,11 +19,10 @@ This file documents the GPGME library. - This is Edition 1.6.0, last updated 26 August 2015, of ‘The ‘GnuPG -Made Easy’ Reference Manual’, for Version 1.6.0. + This is Edition 1.8.0-beta50, last updated 16 November 2016, of ‘The +‘GnuPG Made Easy’ Reference Manual’, for Version 1.8.0-beta50. - Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, -2013, 2014 g10 Code GmbH. + Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as @@ -38,6 +36,530 @@ Public License for more details.  +File: gpgme.info, Node: Library Copying, Next: Copying, Prev: Deprecated Functions, Up: Top + +GNU Lesser General Public License +********************************* + + Version 2.1, February 1999 + + Copyright © 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence the + version number 2.1.] + +Preamble +======== + +The licenses for most software are designed to take away your freedom to +share and change it. By contrast, the GNU General Public Licenses are +intended to guarantee your freedom to share and change free software—to +make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software—typically libraries—of the Free Software +Foundation and other authors who decide to use it. You can use it too, +but we suggest you first think carefully about whether this license or +the ordinary General Public License is the better strategy to use in any +particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of it +in new free programs; and that you are informed that you can do these +things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling it. +And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that there +is no warranty for the free library. Also, if the library is modified +by someone else and passed on, the recipients should know that what they +have is not the original version, so that the original author’s +reputation will not be affected by problems that might be introduced by +others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that any +patent license obtained for a version of the library must be consistent +with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and is +quite different from the ordinary General Public License. We use this +license for certain libraries in order to permit linking those libraries +into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the entire +combination fits its criteria of freedom. The Lesser General Public +License permits more lax criteria for linking other code with the +library. + + We call this license the "Lesser" General Public License because it +does _Less_ to protect the user’s freedom than the ordinary General +Public License. It also provides other free software developers Less of +an advantage over competing non-free programs. These disadvantages are +the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free library +does the same job as widely used non-free libraries. In this case, +there is little to gain by limiting the free library to free software +only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of free +software. For example, permission to use the GNU C Library in non-free +programs enables many more people to use the whole GNU operating system, +as well as its variant, the GNU/Linux operating system. + + Although the Lesser General Public License is Less protective of the +users’ freedom, it does ensure that the user of a program that is linked +with the Library has the freedom and the wherewithal to run that program +using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +“work based on the library†and a “work that uses the libraryâ€. The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the terms + of this Lesser General Public License (also called “this Licenseâ€). + Each licensee is addressed as “youâ€. + + A “library†means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The “Libraryâ€, below, refers to any such software library or work + which has been distributed under these terms. A “work based on the + Library†means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or + translated straightforwardly into another language. (Hereinafter, + translation is included without limitation in the term + “modificationâ€.) + + “Source code†for a work means the preferred form of the work for + making modifications to it. For a library, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the library. + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running a program using the Library is not restricted, and + output from such a program is covered only if its contents + constitute a work based on the Library (independent of the use of + the Library in a tool for writing it). Whether that is true + depends on what the Library does and what the program that uses the + Library does. + + 1. You may copy and distribute verbatim copies of the Library’s + complete source code as you receive it, in any medium, provided + that you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep + intact all the notices that refer to this License and to the + absence of any warranty; and distribute a copy of this License + along with the Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Library or any portion of + it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. The modified work must itself be a software library. + + b. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d. If a facility in the modified Library refers to a function or + a table of data to be supplied by an application program that + uses the facility, other than as an argument passed when the + facility is invoked, then you must make a good faith effort to + ensure that, in the event an application does not supply such + function or table, the facility still operates, and performs + whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots + has a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function + must be optional: if the application does not supply it, the + square root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Library, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not apply + to those sections when you distribute them as separate works. But + when you distribute the same sections as part of a whole which is a + work based on the Library, the distribution of the whole must be on + the terms of this License, whose permissions for other licensees + extend to the entire whole, and thus to each and every part + regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Library. + + In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on a + volume of a storage or distribution medium does not bring the other + work under the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To + do this, you must alter all the notices that refer to this License, + so that they refer to the ordinary GNU General Public License, + version 2, instead of to this License. (If a newer version than + version 2 of the ordinary GNU General Public License has appeared, + then you can specify that version instead if you wish.) Do not + make any other change in these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to + all subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of the + Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or derivative + of it, under Section 2) in object code or executable form under the + terms of Sections 1 and 2 above provided that you accompany it with + the complete corresponding machine-readable source code, which must + be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy + the source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled + or linked with it, is called a “work that uses the Libraryâ€. Such + a work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a “work that uses the Library†with the Library + creates an executable that is a derivative of the Library (because + it contains portions of the Library), rather than a “work that uses + the libraryâ€. The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a “work that uses the Library†uses material from a header + file that is part of the Library, the object code for the work may + be a derivative work of the Library even though the source code is + not. Whether this is true is especially significant if the work + can be linked without the Library, or if the work is itself a + library. The threshold for this to be true is not precisely + defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a + derivative work. (Executables containing this object code plus + portions of the Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section + 6. Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or link + a “work that uses the Library†with the Library to produce a work + containing portions of the Library, and distribute that work under + terms of your choice, provided that the terms permit modification + of the work for the customer’s own use and reverse engineering for + debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered + by this License. You must supply a copy of this License. If the + work during execution displays copyright notices, you must include + the copyright notice for the Library among them, as well as a + reference directing the user to the copy of this License. Also, + you must do one of these things: + + a. Accompany the work with the complete corresponding + machine-readable source code for the Library including + whatever changes were used in the work (which must be + distributed under Sections 1 and 2 above); and, if the work is + an executable linked with the Library, with the complete + machine-readable “work that uses the Libraryâ€, as object code + and/or source code, so that the user can modify the Library + and then relink to produce a modified executable containing + the modified Library. (It is understood that the user who + changes the contents of definitions files in the Library will + not necessarily be able to recompile the application to use + the modified definitions.) + + b. Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run + time a copy of the library already present on the user’s + computer system, rather than copying library functions into + the executable, and (2) will operate properly with a modified + version of the library, if the user installs one, as long as + the modified version is interface-compatible with the version + that the work was made with. + + c. Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the + above specified materials from the same place. + + e. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the “work that uses the + Library†must include any data and utility programs needed for + reproducing the executable from it. However, as a special + exception, the materials to be distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of + the operating system on which the executable runs, unless that + component itself accompanies the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you + cannot use both them and the Library together in an executable that + you distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other + library facilities not covered by this License, and distribute such + a combined library, provided that the separate distribution of the + work based on the Library and of the other library facilities is + otherwise permitted, and provided that you do these two things: + + a. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same + work. + + 8. You may not copy, modify, sublicense, link with, or distribute the + Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate + your rights under this License. However, parties who have received + copies, or rights, from you under this License will not have their + licenses terminated so long as such parties remain in full + compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Library or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work + based on the Library), you indicate your acceptance of this License + to do so, and all its terms and conditions for copying, + distributing or modifying the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the + Library subject to these terms and conditions. You may not impose + any further restrictions on the recipients’ exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties with this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Library at all. For example, if a patent license would not permit + royalty-free redistribution of the Library by all those who receive + copies directly or indirectly through you, then the only way you + could satisfy both it and this License would be to refrain entirely + from distribution of the Library. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply, and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Library under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Library specifies a version number of this License which applies to + it and “any later versionâ€, you have the option of following the + terms and conditions either of that version or of any later version + published by the Free Software Foundation. If the Library does not + specify a license version number, you may choose any version ever + published by the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free + status of all derivatives of our free software and of promoting the + sharing and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS + AND/OR OTHER PARTIES PROVIDE THE LIBRARY “AS IS†WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE + DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR + OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY + OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries +============================================== + +If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of +the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should have +at least the “copyright†line and a pointer to where the full notice is +found. + + ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This library 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. + + This library 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 library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, + USA. + + Also add information on how to contact you by electronic and paper +mail. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a “copyright disclaimer†for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the library + `Frob' (a library for tweaking knobs) written by James Random Hacker. + + SIGNATURE OF TY COON, 1 April 1990 + Ty Coon, President of Vice + + That’s all there is to it! + + File: gpgme.info, Node: Copying, Next: Concept Index, Prev: Library Copying, Up: Top GNU General Public License @@ -45,7 +567,7 @@ Version 3, 29 June 2007 - Copyright © 2007 Free Software Foundation, Inc. + Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -721,7 +1243,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -742,14 +1264,14 @@ You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer†for the program, if necessary. For more information on this, and how to apply and follow -the GNU GPL, see . +the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, -please read . +please read .  File: gpgme.info, Node: Concept Index, Next: Function and Data Index, Prev: Copying, Up: Top @@ -767,10 +1289,9 @@ * algorithms, public key: Public Key Algorithms. (line 6) * armor mode: ASCII Armor. (line 6) * ASCII armor: ASCII Armor. (line 6) +* ASSUAN: Assuan. (line 6) * attributes, of a key: Information About Keys. (line 6) -* attributes, of a trust item: Information About Trust Items. - (line 6) * autoconf: Using Automake. (line 6) * automake: Using Automake. (line 6) * backend: Protocols and Engines. (line 6) @@ -794,8 +1315,10 @@ * context, creation: Creating Contexts. (line 6) * context, destruction: Destroying Contexts. (line 6) * context, offline mode: Offline Mode. (line 6) +* context, pinentry mode: Pinentry Mode. (line 6) * context, result of operation: Result Management. (line 6) * context, selecting protocol: Protocol Selection. (line 6) +* context, sender: Setting the Sender. (line 6) * context, text mode: Text Mode. (line 6) * crypto backend: Protocols and Engines. (line 6) * crypto engine: Protocols and Engines. (line 6) @@ -836,8 +1359,10 @@ * debug: Debugging. (line 6) * decryption: Decrypt. (line 6) * decryption and verification: Decrypt and Verify. (line 6) +* deprecated: Deprecated Functions. (line 6) * encryption: Encrypt. (line 6) * engine: Protocols and Engines. (line 6) +* engine, ASSUAN: Assuan. (line 6) * engine, configuration of: Engine Configuration. (line 6) * engine, configuration per context: Crypto Engine. (line 6) * engine, GnuPG: OpenPGP. (line 6) @@ -856,6 +1381,7 @@ * error values, printing of: Error Strings. (line 6) * event loop, external: Using External Event Loops. (line 6) +* From:: Setting the Sender. (line 6) * GDK, using GPGME with: I/O Callback Example GDK. (line 6) * GnuPG: OpenPGP. (line 6) @@ -890,7 +1416,7 @@ * key, information about: Information About Keys. (line 6) * key, manipulation: Manipulating Keys. (line 6) -* key, signatures: Key Signatures. (line 6) +* key, signing: Signing Keys. (line 6) * largefile support: Largefile Support (LFS). (line 6) * LFS: Largefile Support (LFS). @@ -901,7 +1427,7 @@ * locale, default: Locale. (line 6) * locale, of a context: Locale. (line 6) * message digest algorithms: Hash Algorithms. (line 6) -* multi-threading: Multi Threading. (line 6) +* multi-threading: Multi-Threading. (line 6) * notation data: Verify. (line 6) * notation data <1>: Signature Notation Data. (line 6) @@ -909,11 +1435,13 @@ * OpenPGP: OpenPGP. (line 6) * passphrase callback: Passphrase Callback. (line 6) * passphrase, change: Changing Passphrases. (line 6) +* pinentry mode: Pinentry Mode. (line 6) * policy URL: Signature Notation Data. (line 6) * progress meter callback: Progress Meter Callback. (line 6) * protocol: Protocols and Engines. (line 6) +* protocol, ASSUAN: Assuan. (line 6) * protocol, CMS: Cryptographic Message Syntax. (line 6) * protocol, GnuPG: OpenPGP. (line 6) @@ -926,6 +1454,7 @@ * run control: Run Control. (line 6) * S/MIME: Cryptographic Message Syntax. (line 6) +* sender: Setting the Sender. (line 6) * sign: Sign. (line 6) * signal handling: Signal Handling. (line 6) * signals: Signal Handling. (line 6) @@ -936,24 +1465,20 @@ * signature, creation: Sign. (line 6) * signature, selecting signers: Selecting Signers. (line 6) * signature, verification: Verify. (line 6) -* signatures, on a key: Key Signatures. (line 6) * signers, selecting: Selecting Signers. (line 6) * status message callback: Status Message Callback. (line 6) * text mode: Text Mode. (line 6) -* thread-safeness: Multi Threading. (line 6) +* thread-safeness: Multi-Threading. (line 6) * trust item: Trust Item Management. (line 6) * trust item list: Listing Trust Items. (line 6) -* trust item, attributes: Information About Trust Items. - (line 6) -* trust item, information about: Information About Trust Items. - (line 6) * trust item, manipulation: Manipulating Trust Items. (line 6) * type of data: Data Buffer Convenience. (line 6) * UI server: UI Server Protocol. (line 6) * user interface server: UI Server Protocol. (line 6) +* validity, TOFU: Changing TOFU Data. (line 6) * verification: Verify. (line 6) * verification and decryption: Decrypt and Verify. (line 6) * version check, of the engines: Engine Version Check. (line 6) @@ -994,22 +1519,27 @@ * enum gpgme_event_io_t: I/O Callback Interface. (line 58) * enum gpgme_hash_algo_t: Hash Algorithms. (line 9) +* enum gpgme_pinentry_mode_t: Pinentry Mode. (line 19) * enum gpgme_protocol_t: Protocols and Engines. (line 16) * enum gpgme_pubkey_algo_t: Public Key Algorithms. (line 9) * enum gpgme_sig_mode_t: Creating a Signature. (line 6) -* enum gpgme_sig_stat_t: Verify. (line 273) +* enum gpgme_sig_stat_t: Deprecated Functions. + (line 427) +* enum gpgme_tofu_policy_t: Changing TOFU Data. (line 10) * FILE: UI Server Set Input Files. (line 9) * GETINFO: Miscellaneous UI Server Commands. (line 9) -* gpgme_attr_t: Information About Keys. - (line 41) -* gpgme_attr_t <1>: Key Signatures. (line 19) +* gpgme_addrspec_from_uid: Decrypt and Verify. (line 47) +* gpgme_attr_t: Deprecated Functions. + (line 136) +* gpgme_attr_t <1>: Deprecated Functions. + (line 313) * gpgme_cancel: Cancellation. (line 16) -* gpgme_cancel_async: Cancellation. (line 37) +* gpgme_cancel_async: Cancellation. (line 36) * gpgme_check_version: Library Version Check. (line 6) * gpgme_ctx_get_engine_info: Crypto Engine. (line 12) @@ -1018,7 +1548,7 @@ * gpgme_data_encoding_t: Data Buffer Meta-Data. (line 28) * gpgme_data_get_encoding: Data Buffer Meta-Data. - (line 66) + (line 69) * gpgme_data_get_file_name: Data Buffer Meta-Data. (line 6) * gpgme_data_identify: Data Buffer Convenience. @@ -1037,8 +1567,8 @@ (line 22) * gpgme_data_new_from_stream: File Based Data Buffers. (line 29) -* gpgme_data_new_with_read_cb: Callback Based Data Buffers. - (line 98) +* gpgme_data_new_with_read_cb: Deprecated Functions. + (line 107) * gpgme_data_read: Data Buffer I/O Operations. (line 6) * gpgme_data_read_cb_t: Callback Based Data Buffers. @@ -1049,16 +1579,18 @@ (line 11) * gpgme_data_release_cb_t: Callback Based Data Buffers. (line 56) -* gpgme_data_rewind: Data Buffer I/O Operations. - (line 60) +* gpgme_data_rewind: Deprecated Functions. + (line 130) * gpgme_data_seek: Data Buffer I/O Operations. (line 25) * gpgme_data_seek_cb_t: Callback Based Data Buffers. (line 47) * gpgme_data_set_encoding: Data Buffer Meta-Data. - (line 72) + (line 75) * gpgme_data_set_file_name: Data Buffer Meta-Data. (line 16) +* gpgme_data_set_flag: Data Buffer Meta-Data. + (line 80) * gpgme_data_t: Exchanging Data. (line 13) * gpgme_data_type_t: Data Buffer Convenience. (line 7) @@ -1067,17 +1599,25 @@ * gpgme_data_write_cb_t: Callback Based Data Buffers. (line 30) * gpgme_decrypt_result_t: Decrypt. (line 54) -* gpgme_edit_cb_t: Advanced Key Editing. - (line 9) +* gpgme_edit_cb_t: Deprecated Functions. + (line 36) * gpgme_encrypt_result_t: Encrypting a Plaintext. - (line 87) + (line 93) * gpgme_engine_check_version: Engine Version Check. - (line 35) + (line 62) * gpgme_engine_info_t: Engine Information. (line 6) * gpgme_error: Error Values. (line 65) * gpgme_error_from_errno: Error Values. (line 88) * gpgme_error_t: Error Values. (line 24) -* gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, gpgme_status_code_t STATUS, const char *ARGS, int FD): Advanced Key Editing. +* gpgme_error_t (*gpgme_assuan_data_cb_t) (void *OPAQUE, const void *DATA, size_t DATALEN): Using the Assuan protocol. + (line 15) +* gpgme_error_t (*gpgme_assuan_inquire_cb_t) (void *OPAQUE, const char *NAME, const char *ARGS, gpgme_data_t *R_DATA): Using the Assuan protocol. + (line 23) +* gpgme_error_t (*gpgme_assuan_status_cb_t) (void *OPAQUE, const char *STATUS, const char *ARGS): Using the Assuan protocol. + (line 35) +* gpgme_error_t (*gpgme_edit_cb_t) (void *HANDLE, gpgme_status_code_t STATUS, const char *ARGS, int FD): Deprecated Functions. + (line 33) +* gpgme_error_t (*gpgme_interact_cb_t) (void *HANDLE, const char *STATUS, const char *ARGS, int FD): Advanced Key Editing. (line 6) * gpgme_error_t (*gpgme_io_cb_t) (void *DATA, int FD): I/O Callback Interface. (line 6) @@ -1101,8 +1641,10 @@ (line 7) * gpgme_free: Destroying Data Buffers. (line 25) -* gpgme_genkey_result_t: Generating Keys. (line 74) +* gpgme_genkey_result_t: Generating Keys. (line 295) * gpgme_get_armor: ASCII Armor. (line 13) +* gpgme_get_ctx_flag: Status Message Callback. + (line 73) * gpgme_get_dirinfo: Engine Version Check. (line 6) * gpgme_get_engine_info: Engine Information. (line 46) @@ -1111,93 +1653,127 @@ * gpgme_get_io_cbs: Registering I/O Callbacks. (line 44) * gpgme_get_key: Listing Keys. (line 147) -* gpgme_get_keylist_mode: Key Listing Mode. (line 68) +* gpgme_get_keylist_mode: Key Listing Mode. (line 73) * gpgme_get_offline: Offline Mode. (line 23) -* gpgme_get_passphrase_cb: Passphrase Callback. (line 55) +* gpgme_get_passphrase_cb: Passphrase Callback. (line 59) +* gpgme_get_pinentry_mode: Pinentry Mode. (line 14) * gpgme_get_progress_cb: Progress Meter Callback. (line 31) * gpgme_get_protocol: Protocol Selection. (line 21) * gpgme_get_protocol_name: Protocols and Engines. - (line 48) -* gpgme_get_sig_key: Verify. (line 472) -* gpgme_get_sig_status: Verify. (line 321) -* gpgme_get_sig_string_attr: Verify. (line 376) -* gpgme_get_sig_ulong_attr: Verify. (line 410) + (line 51) +* gpgme_get_sender: Setting the Sender. (line 26) +* gpgme_get_sig_key: Deprecated Functions. + (line 626) +* gpgme_get_sig_status: Deprecated Functions. + (line 475) +* gpgme_get_sig_string_attr: Deprecated Functions. + (line 530) +* gpgme_get_sig_ulong_attr: Deprecated Functions. + (line 564) * gpgme_get_status_cb: Status Message Callback. (line 29) * gpgme_get_textmode: Text Mode. (line 20) * gpgme_hash_algo_name: Hash Algorithms. (line 28) * gpgme_hash_algo_t: Hash Algorithms. (line 10) -* gpgme_import_result_t: Importing Keys. (line 111) -* gpgme_import_status_t: Importing Keys. (line 73) +* gpgme_import_result_t: Importing Keys. (line 110) +* gpgme_import_status_t: Importing Keys. (line 72) +* gpgme_interact_cb_t: Advanced Key Editing. + (line 9) * gpgme_invalid_key_t: Crypto Operations. (line 10) * gpgme_io_cb_t: I/O Callback Interface. (line 7) * gpgme_keylist_result_t: Listing Keys. (line 124) -* gpgme_key_get_string_attr: Information About Keys. - (line 183) -* gpgme_key_get_ulong_attr: Information About Keys. - (line 197) +* gpgme_key_get_string_attr: Deprecated Functions. + (line 278) +* gpgme_key_get_ulong_attr: Deprecated Functions. + (line 292) * gpgme_key_ref: Manipulating Keys. (line 6) -* gpgme_key_release: Manipulating Keys. (line 19) -* gpgme_key_sig_get_string_attr: Key Signatures. (line 75) -* gpgme_key_sig_get_ulong_attr: Key Signatures. (line 89) -* gpgme_key_sig_t: Key Management. (line 92) -* gpgme_key_t: Key Management. (line 200) +* gpgme_key_release: Deprecated Functions. + (line 14) +* gpgme_key_sig_get_string_attr: Deprecated Functions. + (line 369) +* gpgme_key_sig_get_ulong_attr: Deprecated Functions. + (line 383) +* gpgme_key_sig_t: Key objects. (line 226) +* gpgme_key_t: Key objects. (line 10) * gpgme_key_unref: Manipulating Keys. (line 10) * gpgme_new: Creating Contexts. (line 6) * gpgme_new_signature_t: Creating a Signature. (line 57) * gpgme_off_t: Exchanging Data. (line 24) -* gpgme_op_card_edit: Advanced Key Editing. - (line 48) -* gpgme_op_card_edit_start: Advanced Key Editing. - (line 55) +* gpgme_op_adduid: Generating Keys. (line 161) +* gpgme_op_adduid_start: Generating Keys. (line 185) +* gpgme_op_assuan_transact_ext: Using the Assuan protocol. + (line 56) +* gpgme_op_assuan_transact_start: Using the Assuan protocol. + (line 43) +* gpgme_op_card_edit: Deprecated Functions. + (line 82) +* gpgme_op_card_edit_start: Deprecated Functions. + (line 92) +* gpgme_op_createkey: Generating Keys. (line 14) +* gpgme_op_createkey_start: Generating Keys. (line 99) +* gpgme_op_createsubkey: Generating Keys. (line 109) +* gpgme_op_createsubkey_start: Generating Keys. (line 151) * gpgme_op_decrypt: Decrypt. (line 6) -* gpgme_op_decrypt_result: Decrypt. (line 76) +* gpgme_op_decrypt_result: Decrypt. (line 91) * gpgme_op_decrypt_start: Decrypt. (line 20) * gpgme_op_decrypt_verify: Decrypt and Verify. (line 6) -* gpgme_op_decrypt_verify <1>: Decrypt and Verify. (line 30) +* gpgme_op_decrypt_verify_start: Decrypt and Verify. (line 30) * gpgme_op_delete: Deleting Keys. (line 6) * gpgme_op_delete_start: Deleting Keys. (line 20) -* gpgme_op_edit: Advanced Key Editing. - (line 19) -* gpgme_op_edit_start: Advanced Key Editing. - (line 37) +* gpgme_op_edit: Deprecated Functions. + (line 47) +* gpgme_op_edit_start: Deprecated Functions. + (line 68) * gpgme_op_encrypt: Encrypting a Plaintext. (line 6) * gpgme_op_encrypt_result: Encrypting a Plaintext. - (line 98) + (line 104) * gpgme_op_encrypt_sign: Encrypting a Plaintext. - (line 109) + (line 115) * gpgme_op_encrypt_sign_start: Encrypting a Plaintext. - (line 119) + (line 125) * gpgme_op_encrypt_start: Encrypting a Plaintext. - (line 70) + (line 76) * gpgme_op_export: Exporting Keys. (line 38) * gpgme_op_export_ext: Exporting Keys. (line 69) * gpgme_op_export_ext_start: Exporting Keys. (line 90) * gpgme_op_export_keys: Exporting Keys. (line 101) * gpgme_op_export_keys_start: Exporting Keys. (line 124) * gpgme_op_export_start: Exporting Keys. (line 58) -* gpgme_op_genkey: Generating Keys. (line 6) -* gpgme_op_genkey_result: Generating Keys. (line 95) -* gpgme_op_genkey_start: Generating Keys. (line 63) +* gpgme_op_genkey: Generating Keys. (line 225) +* gpgme_op_genkey_result: Generating Keys. (line 328) +* gpgme_op_genkey_start: Generating Keys. (line 283) * gpgme_op_import: Importing Keys. (line 9) -* gpgme_op_import_ext: Importing Keys. (line 175) +* gpgme_op_import_ext: Deprecated Functions. + (line 22) * gpgme_op_import_keys: Importing Keys. (line 35) -* gpgme_op_import_keys_start: Importing Keys. (line 60) -* gpgme_op_import_result: Importing Keys. (line 161) +* gpgme_op_import_keys_start: Importing Keys. (line 59) +* gpgme_op_import_result: Importing Keys. (line 160) * gpgme_op_import_start: Importing Keys. (line 24) +* gpgme_op_interact: Advanced Key Editing. + (line 21) +* gpgme_op_interact_start: Advanced Key Editing. + (line 46) * gpgme_op_keylist_end: Listing Keys. (line 81) * gpgme_op_keylist_ext_start: Listing Keys. (line 33) * gpgme_op_keylist_next: Listing Keys. (line 65) * gpgme_op_keylist_result: Listing Keys. (line 135) * gpgme_op_keylist_start: Listing Keys. (line 6) +* gpgme_op_keysign: Signing Keys. (line 12) +* gpgme_op_keysign_start: Signing Keys. (line 68) * gpgme_op_passwd: Changing Passphrases. (line 6) * gpgme_op_passwd_start: Changing Passphrases. (line 19) +* gpgme_op_query_swdb: Checking for updates. + (line 66) +* gpgme_op_query_swdb_result: Checking for updates. + (line 76) +* gpgme_op_revuid: Generating Keys. (line 192) +* gpgme_op_revuid_start: Generating Keys. (line 218) * gpgme_op_sign: Creating a Signature. (line 21) * gpgme_op_sign_result: Creating a Signature. @@ -1208,29 +1784,38 @@ (line 13) * gpgme_op_spawn_start: Running other Programs. (line 38) +* gpgme_op_tofu_policy: Changing TOFU Data. (line 27) +* gpgme_op_tofu_policy_start: Changing TOFU Data. (line 39) * gpgme_op_trustlist_end: Listing Trust Items. (line 44) * gpgme_op_trustlist_next: Listing Trust Items. (line 27) * gpgme_op_trustlist_start: Listing Trust Items. (line 6) * gpgme_op_verify: Verify. (line 6) -* gpgme_op_verify_result: Verify. (line 256) +* gpgme_op_verify_result: Verify. (line 262) * gpgme_op_verify_start: Verify. (line 26) * gpgme_passphrase_cb_t: Passphrase Callback. (line 10) +* gpgme_pinentry_mode_t: Pinentry Mode. (line 20) * gpgme_progress_cb_t: Progress Meter Callback. (line 8) * gpgme_protocol_t: Protocols and Engines. (line 17) * gpgme_protocol_t <1>: Engine Information. (line 7) * gpgme_pubkey_algo_name: Public Key Algorithms. - (line 47) + (line 50) +* gpgme_pubkey_algo_string: Public Key Algorithms. + (line 59) * gpgme_pubkey_algo_t: Public Key Algorithms. (line 10) +* gpgme_query_swdb_result_t: Checking for updates. + (line 11) * gpgme_recipient_t: Decrypt. (line 30) * gpgme_register_io_cb_t: I/O Callback Interface. (line 23) * gpgme_release: Destroying Contexts. (line 6) -* gpgme_result_ref: Result Management. (line 14) -* gpgme_result_unref: Result Management. (line 20) +* gpgme_result_ref: Result Management. (line 15) +* gpgme_result_unref: Result Management. (line 21) * gpgme_set_armor: ASCII Armor. (line 6) +* gpgme_set_ctx_flag: Status Message Callback. + (line 37) * gpgme_set_engine_info: Engine Configuration. (line 11) * gpgme_set_global_flag: Library Version Check. @@ -1243,17 +1828,19 @@ * gpgme_set_locale: Locale. (line 14) * gpgme_set_offline: Offline Mode. (line 6) * gpgme_set_passphrase_cb: Passphrase Callback. (line 36) +* gpgme_set_pinentry_mode: Pinentry Mode. (line 6) * gpgme_set_progress_cb: Progress Meter Callback. (line 16) * gpgme_set_protocol: Protocol Selection. (line 6) +* gpgme_set_sender: Setting the Sender. (line 13) * gpgme_set_status_cb: Status Message Callback. (line 17) * gpgme_set_textmode: Text Mode. (line 6) * gpgme_signature_t: Verify. (line 88) -* gpgme_signers_add: Selecting Signers. (line 13) -* gpgme_signers_clear: Selecting Signers. (line 6) -* gpgme_signers_count: Selecting Signers. (line 20) -* gpgme_signers_enum: Selecting Signers. (line 24) +* gpgme_signers_add: Selecting Signers. (line 18) +* gpgme_signers_clear: Selecting Signers. (line 11) +* gpgme_signers_count: Selecting Signers. (line 25) +* gpgme_signers_enum: Selecting Signers. (line 29) * gpgme_sign_result_t: Creating a Signature. (line 85) * gpgme_sig_mode_t: Creating a Signature. @@ -1265,30 +1852,32 @@ * gpgme_sig_notation_get: Signature Notation Data. (line 41) * gpgme_sig_notation_t: Verify. (line 38) -* gpgme_sig_stat_t: Verify. (line 274) +* gpgme_sig_stat_t: Deprecated Functions. + (line 428) * gpgme_ssize_t: Exchanging Data. (line 30) * gpgme_status_cb_t: Status Message Callback. (line 8) * gpgme_strerror: Error Strings. (line 6) * gpgme_strerror_r: Error Strings. (line 15) * gpgme_strsource: Error Strings. (line 26) -* gpgme_subkey_t: Key Management. (line 11) -* gpgme_trust_item_get_int_attr: Information About Trust Items. - (line 28) -* gpgme_trust_item_get_string_attr: Information About Trust Items. - (line 14) +* gpgme_subkey_t: Key objects. (line 94) +* gpgme_tofu_policy_t: Changing TOFU Data. (line 11) +* gpgme_trust_item_get_int_attr: Deprecated Functions. + (line 413) +* gpgme_trust_item_get_string_attr: Deprecated Functions. + (line 399) * gpgme_trust_item_ref: Manipulating Trust Items. (line 6) -* gpgme_trust_item_release: Manipulating Trust Items. - (line 20) +* gpgme_trust_item_release: Deprecated Functions. + (line 18) * gpgme_trust_item_t: Trust Item Management. (line 8) * gpgme_trust_item_unref: Manipulating Trust Items. (line 10) -* gpgme_user_id_t: Key Management. (line 165) +* gpgme_user_id_t: Key objects. (line 180) * gpgme_validity_t: Information About Keys. (line 9) -* gpgme_verify_result_t: Verify. (line 241) +* gpgme_verify_result_t: Verify. (line 247) * gpgme_wait: Waiting For Completion. (line 6) * IMPORT_FILES: UI Server Import/Export Keys. diff -Nru gpgme1.0-1.6.0/doc/gpgme.texi gpgme1.0-1.8.0/doc/gpgme.texi --- gpgme1.0-1.6.0/doc/gpgme.texi 2015-08-26 08:05:11.000000000 +0000 +++ gpgme1.0-1.8.0/doc/gpgme.texi 2016-11-16 09:17:20.000000000 +0000 @@ -1,6 +1,7 @@ \input texinfo @c -*- mode: texinfo; coding: utf-8; -*- @documentencoding UTF-8 @setfilename gpgme.info +@include defs.inc @settitle The `GnuPG Made Easy' Reference Manual @dircategory GNU Libraries @@ -13,8 +14,7 @@ @syncodeindex pg fn @copying -Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2010, 2012, 2013, 2014 g10 Code GmbH. +Copyright @copyright{} 2002--2008, 2010, 2012--2016 g10 Code GmbH. @quotation Permission is granted to copy, distribute and/or modify this document @@ -30,14 +30,12 @@ General Public License for more details. @end copying -@include version.texi - @c Macros used by the description of the UI server protocol -@macro clnt - @sc{c:} @c +@macro clnt{string} + @sc{c:} \string\ @end macro -@macro srvr - @sc{s:} @c +@macro srvr{string} + @sc{s:} \string\ @end macro @@ -72,7 +70,7 @@ @center for version @value{VERSION} @page @vskip 0pt plus 1filll -Published by g10 Code GmbH@* Hüttenstr. 61@* 40699 Erkrath, Germany +Published by The GnuPG Project@* c/o g10 Code GmbH@* Hüttenstr. 61@* 40699 Erkrath, Germany @insertcopying @end titlepage @@ -102,6 +100,7 @@ * UI Server Protocol:: The GnuPG UI Server Protocol. * Debugging:: How to solve problems. +* Deprecated Functions:: Documentation of deprecated functions. * Library Copying:: The GNU Lesser General Public License says how you can copy and share `GnuPG Made Easy'. @@ -131,7 +130,7 @@ * Using Libtool:: Avoiding compiler options entirely. * Library Version Check:: Getting and verifying the library version. * Signal Handling:: How @acronym{GPGME} affects signal handling. -* Multi Threading:: How @acronym{GPGME} can be used in an MT environment. +* Multi-Threading:: How @acronym{GPGME} can be used in an MT environment. Protocols and Engines @@ -187,6 +186,7 @@ * Protocol Selection:: Selecting the protocol used by a context. * Crypto Engine:: Configuring the crypto engine. +* Setting the Sender:: How to tell the engine the sender. * ASCII Armor:: Requesting @acronym{ASCII} armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. @@ -199,21 +199,22 @@ Key Management +* Key objects:: Description of the key structures. * Listing Keys:: Browsing the list of available keys. * Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. * Manipulating Keys:: Operations on keys. * Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. * Exporting Keys:: Retrieving key data from the key ring. * Importing Keys:: Adding keys to the key ring. * Deleting Keys:: Removing keys from the key ring. * Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. * Advanced Key Editing:: Advanced key edit operation. Trust Item Management * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. Crypto Operations @@ -236,7 +237,9 @@ Miscellaneous -* Running other Programs:: Running other Programs +* Running other Programs:: Running other Programs. +* Using the Assuan protocol:: Using the Assuan protocol. +* Checking for updates:: How to check for software updates. Run Control @@ -298,6 +301,13 @@ examples at the end of the manual, and then only read up those parts of the interface which are unclear. +The documentation for the language bindings is currently not included +in this manual. Those languages bindings follow the general +programming model of @acronym{GPGME} but may provide some extra high +level abstraction on top of the @acronym{GPGME} style API. For now +please see the README files in the @file{lang/} directory of the +source distribution. + @node Features @section Features @@ -324,8 +334,11 @@ integrate strong cryptography in his application. Once support for @acronym{GPGME} has been added to a program, it is easy to add support for other crypto protocols once @acronym{GPGME} backends provide them. -@end table +@item it's language friendly +@acronym{GPGME} comes with languages bindings for several common +programming languages: Common Lisp, C++, Python 2, and Python 3. +@end table @node Overview @section Overview @@ -369,7 +382,7 @@ * Using Libtool:: Avoiding compiler options entirely. * Library Version Check:: Getting and verifying the library version. * Signal Handling:: How @acronym{GPGME} affects signal handling. -* Multi Threading:: How @acronym{GPGME} can be used in an MT environment. +* Multi-Threading:: How @acronym{GPGME} can be used in an MT environment. @end menu @@ -445,11 +458,18 @@ gcc -o foo foo.c `gpgme-config --cflags --libs` @end example -If you want to link to one of the thread-safe versions of -@acronym{GPGME}, you must specify the @option{--thread} option before -any other option to select the thread package you want to link with. -Supported thread packages are @option{--thread=pth} and -@option{--thread=pthread}. +If you need to detect the installed language bindings you can use list +them using: + +@example +gpgme-config --print-lang +@end example + +or test for the availability using + +@example +gpgme-config --have-lang=python && echo 'Bindings for Pythons available' +@end example @node Largefile Support (LFS) @@ -588,7 +608,9 @@ @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}. +@code{GPGME_PTHREAD_CFLAGS} and @code{GPGME_PTHREAD_LIBS}. Since +version 1.8.0 this is no longer required to GPGME_PTHREAD as +@acronym{GPGME} itself is thread safe. This macro searches for @command{gpgme-config} along the PATH. If you are cross-compiling, it is useful to set the environment variable @@ -679,12 +701,12 @@ features are identified by the following values for @var{name}: @table @code -@item "debug" +@item debug To enable debugging use the string ``debug'' for @var{name} and @var{value} identical to the value used with the environment variable @code{GPGME_DEBUG}. -@item "disable-gpgconf" +@item disable-gpgconf Using this feature with any @var{value} disables the detection of the gpgconf program and thus forces GPGME to fallback into the simple OpenPGP only mode. It may be used to force the use of GnuPG-1 on @@ -692,8 +714,8 @@ the use of @code{gpgme_set_engine_info} is a better way to select a specific engine version. -@item "gpgconf-name" -@itemx "gpg-name" +@item gpgconf-name +@itemx gpg-name Set the name of the gpgconf respective gpg binary. The defaults are @code{GNU/GnuPG/gpgconf} and @code{GNU/GnuPG/gpg}. Under Unix the leading directory part is ignored. Under Windows the leading @@ -701,6 +723,22 @@ @code{.exe} suffix is added by GPGME. Use forward slashed even under Windows. +@item require-gnupg +Set the mimimum version of the required GnuPG engine. If that version +is not met, GPGME fails early instead of trying to use the existant +version. The given version must be a string with major, minor, and +micro number. Example: "2.1.0". + +@item w32-inst-dir +On Windows GPGME needs to know its installation directory to find its +spawn helper. This is in general no problem because a DLL has this +information. Some applications however link statically to GPGME and +thus GPGME can only figure out the installation directory of this +application which may be wrong in certain cases. By supplying an +installation directory as value to this flag, GPGME will assume that +that directory is the installation directory. This flag has no effect +on non-Windows platforms. + @end table This function returns @code{0} on success. In contrast to other @@ -767,37 +805,17 @@ @code{gpgme_check_version} is called or afterwards. -@node Multi Threading -@section Multi Threading +@node Multi-Threading +@section Multi-Threading @cindex thread-safeness @cindex multi-threading -The @acronym{GPGME} library is not entirely thread-safe, but it can -still be used in a multi-threaded environment if some care is taken. -If the following requirements are met, there should be no race -conditions to worry about: +The @acronym{GPGME} library is mostly thread-safe, and can be used +in a multi-threaded environment but there are some requirements +for multi-threaded use: @itemize @bullet @item -@acronym{GPGME} supports the thread libraries pthread and GNU Pth. -The support for this has to be enabled at compile time. -@acronym{GPGME} will automatically detect the location in which the -thread libraries are installed and activate the support for them at -build time. - -Support for other thread libraries is very easy to add. Please -contact us if you have the need. - -@item -If you want to use @acronym{GPGME} with threads, you must link to the -right version of the library. The name of the right library is -@code{libgpgme-} followed by the name of the thread package you use. -For example, if you use GNU Pth, the right name is -@code{libgpgme-pth}. Use the Automake macros or -@command{gpgme-config} program for simplicity. - - -@item The function @code{gpgme_check_version} must be called before any other function in the library, because it initializes the thread support subsystem in @acronym{GPGME}. To achieve this in @@ -862,9 +880,12 @@ @item GPGME_PROTOCOL_CMS This specifies the Cryptographic Message Syntax. -@item GPGME_PROTOCOL_ASSUAN +@item GPGME_PROTOCOL_GPGCONF Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help. +@item GPGME_PROTOCOL_ASSUAN +This specifies the raw Assuan protocol. + @item GPGME_PROTOCOL_G13 Under development. Please ask on @email{gnupg-devel@@gnupg.org} for help. @@ -895,6 +916,7 @@ * Engine Configuration:: Changing the engine configuration. * OpenPGP:: Support for the OpenPGP protocol. * Cryptographic Message Syntax:: Support for the CMS. +* Assuan:: Support for the raw Assuan protocol. @end menu @@ -914,9 +936,34 @@ @item homedir Return the default home directory. +@item sysconfdir +Return the name of the system configuration directory + +@item bindir +Return the name of the directory with GnuPG program files. + +@item libdir +Return the name of the directory with GnuPG related library files. + +@item libexecdir +Return the name of the directory with GnuPG helper program files. + +@item datadir +Return the name of the directory with GnuPG shared data. + +@item localedir +Return the name of the directory with GnuPG locale data. + @item agent-socket Return the name of the socket to connect to the gpg-agent. +@item agent-ssh-socket +Return the name of the socket to connect to the ssh-agent component of +gpg-agent. + +@item dirmngr-socket +Return the name of the socket to connect to the dirmngr. + @item uiserver-socket Return the name of the socket to connect to the user interface server. @@ -1099,6 +1146,20 @@ The @acronym{CMS} protocol is specified by @code{GPGME_PROTOCOL_CMS}. +@node Assuan +@section Assuan +@cindex ASSUAN +@cindex protocol, ASSUAN +@cindex engine, ASSUAN + +Assuan is the RPC library used by the various @acronym{GnuPG} +components. The Assuan protocol allows one to talk to arbitrary +Assuan servers using @acronym{GPGME}. @xref{Using the Assuan +protocol}. + +The ASSUAN protocol is specified by @code{GPGME_PROTOCOL_ASSUAN}. + + @node Algorithms @chapter Algorithms @cindex algorithms @@ -1161,6 +1222,9 @@ This value indicates ECDH, the Eliptic Curve Diffie-Hellmann encryption algorithm as defined by RFC-6637. +@item GPGME_PK_EDDSA +This value indicates the EdDSA algorithm. + @end table @end deftp @@ -1174,6 +1238,14 @@ returned. @end deftypefun +@deftypefun {char *} gpgme_pubkey_algo_string (@w{gpgme_subkey_t @var{key}}) +The function @code{gpgme_pubkey_algo_string} is a convenience function +to build and return an algorithm string in the same way GnuPG does +(e.g. ``rsa2048'' or ``ed25519''). The caller must free the result +using @code{gpgme_free}. On error (e.g. invalid argument or memory +exhausted), the function returns NULL and sets @code{ERRNO}. +@end deftypefun + @node Hash Algorithms @section Hash Algorithms @@ -1899,33 +1971,6 @@ enough memory is available. @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_data_new_with_read_cb (@w{gpgme_data_t *@var{dh}}, @w{int (*@var{readfunc})} (@w{void *@var{hook}}, @w{char *@var{buffer}}, @w{size_t @var{count}}, @w{size_t *@var{nread}}), @w{void *@var{hook_value}}) -The function @code{gpgme_data_new_with_read_cb} creates a new -@code{gpgme_data_t} object and uses the callback function @var{readfunc} -to retrieve the data on demand. As the callback function can supply -the data in any way it wants, this is the most flexible data type -@acronym{GPGME} provides. However, it can not be used to write data. - -The callback function receives @var{hook_value} as its first argument -whenever it is invoked. It should return up to @var{count} bytes in -@var{buffer}, and return the number of bytes actually read in -@var{nread}. It may return @code{0} in @var{nread} if no data is -currently available. To indicate @code{EOF} the function should -return with an error code of @code{-1} and set @var{nread} to -@code{0}. The callback function may support to reset its internal -read pointer if it is invoked with @var{buffer} and @var{nread} being -@code{NULL} and @var{count} being @code{0}. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -data object was successfully created, @code{GPG_ERR_INV_VALUE} if -@var{dh} or @var{readfunc} is not a valid pointer, and -@code{GPG_ERR_ENOMEM} if not enough memory is available. -@end deftypefun - @node Destroying Data Buffers @section Destroying Data Buffers @@ -1954,9 +1999,11 @@ @deftypefun void gpgme_free (@w{void *@var{buffer}}) The function @code{gpgme_free} releases the memory returned by -@code{gpgme_data_release_and_get_mem}. It should be used instead of -the system libraries @code{free} function in case different allocators -are used in a single program. +@code{gpgme_data_release_and_get_mem} and +@code{gpgme_pubkey_algo_string}. It should be used instead of the +system libraries @code{free} function in case different allocators are +used by a program. This is often the case if gpgme is used under +Windows as a DLL. @end deftypefun @@ -2035,20 +2082,6 @@ If the function fails, -1 is returned and @var{errno} is set. @end deftypefun -The following function is deprecated and should not be used. It will -be removed in a future version of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_data_rewind (@w{gpgme_data_t @var{dh}}) -The function @code{gpgme_data_rewind} is equivalent to: - -@example - return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) - ? gpgme_error_from_errno (errno) : 0; -@end example -@end deftypefun - - - @node Data Buffer Meta-Data @subsection Data Buffer Meta-Data @@ -2107,6 +2140,9 @@ This specifies that the data is encoded in an armored form as used by OpenPGP and PEM. +@item GPGME_DATA_ENCODING_MIME +This specifies that the data is encoded as a MIME part. + @item GPGME_DATA_ENCODING_URL The data is a list of linefeed delimited URLs. This is only useful with @code{gpgme_op_import}. @@ -2134,6 +2170,30 @@ the data object with the handle @var{dh} to @var{enc}. @end deftypefun +@deftypefun {gpgme_error_t} gpgme_data_set_flag @ + (@w{gpgme_data_t @var{dh}}, @ + @w{const char *@var{name}}, @ + @w{const char *@var{value}}) + +Some minor properties of the data object can be controlled with flags +set by this function. The properties are identified by the following +values for @var{name}: + +@table @code +@item size-hint +The value is a decimal number with the length gpgme shall assume for +this data object. This is useful if the data is provided by callbacks +or via file descriptors but the applications knows the total size of +the data. If this is set the OpenPGP engine may use this to decide on +buffer allocation strategies and to provide a total value for its +progress information. + +@end table + +This function returns @code{0} on success. +@end deftypefun + + @node Data Buffer Convenience @subsection Data Buffer Convenience Functions @cindex data buffer, convenience @@ -2253,10 +2313,12 @@ The detailed result of an operation is returned in operation-specific structures such as @code{gpgme_decrypt_result_t}. The corresponding retrieval functions such as @code{gpgme_op_decrypt_result} provide -static access to the results after an operation completes. The -following interfaces make it possible to detach a result structure -from its associated context and give it a lifetime beyond that of the -current operation or context. +static access to the results after an operation completes. Those +structures shall be considered read-only and an application must not +allocate such a structure on its own. The following interfaces make +it possible to detach a result structure from its associated context +and give it a lifetime beyond that of the current operation or +context. @deftypefun void gpgme_result_ref (@w{void *@var{result}}) The function @code{gpgme_result_ref} acquires an additional reference @@ -2285,9 +2347,11 @@ @menu * Protocol Selection:: Selecting the protocol used by a context. * Crypto Engine:: Configuring the crypto engine. +* Setting the Sender:: How to tell the engine the sender. * ASCII Armor:: Requesting @acronym{ASCII} armored output. * Text Mode:: Choosing canonical text mode. * Offline Mode:: Choosing offline mode. +* Pinentry Mode:: Choosing the pinentry mode. * Included Certificates:: Including a number of certificates. * Key Listing Mode:: Selecting key listing mode. * Passphrase Callback:: Getting the passphrase from the user. @@ -2366,6 +2430,47 @@ @end deftypefun +@node Setting the Sender +@subsection How to tell the engine the sender. +@cindex context, sender +@cindex sender +@cindex From: + +Some engines can make use of the sender’s address, for example to +figure out the best user id in certain trust models. For verification +and signing of mails, it is thus suggested to let the engine know the +sender ("From:") address. @acronym{GPGME} provides two functions to +accomplish that. Note that the esoteric use of multiple "From:" +addresses is not supported. + +@deftypefun gpgme_error_t gpgme_set_sender @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{int @var{address}}) + +The function @code{gpgme_set_sender} specifies the sender address for +use in sign and verify operations. @var{address} is expected to be +the ``addr-spec'' part of an address but my also be a complete mailbox +address, in which case this function extracts the ``addr-spec'' from +it. Using @code{NULL} for @var{address} clears the sender address. + +The function returns 0 on success or an error code on failure. The +most likely failure is that no valid ``addr-spec'' was found in +@var{address}. + +@end deftypefun + +@deftypefun @w{const char *} gpgme_get_sender @ + (@w{gpgme_ctx_t @var{ctx}}) + +The function @code{gpgme_get_sender} returns the current sender +address from the context, or NULL if none was set. The returned +value is valid as long as the @var{ctx} is valid and +@code{gpgme_set_sender} has not been called again. + +@end deftypefun + + + @c FIXME: Unfortunately, using @acronym here breaks texi2dvi. @node ASCII Armor @subsection @acronym{ASCII} Armor @@ -2448,6 +2553,57 @@ @end deftypefun +@node Pinentry Mode +@subsection Pinentry Mode +@cindex context, pinentry mode +@cindex pinentry mode + +@deftypefun gpgme_error_t gpgme_set_pinentry_mode (@w{gpgme_ctx_t @var{ctx}}, +@w{gpgme_pinentry_mode_t @var{mode}}) +The function @code{gpgme_set_pinentry_mode} specifies the pinentry mode +to be used. + +For GnuPG >= 2.1 this option is required to be set to +@code{GPGME_PINENTRY_MODE_LOOPBACK} to enable the passphrase callback +mechanism in GPGME through @code{gpgme_set_passphrase_cb}. +@end deftypefun + +@deftypefun gpgme_pinentry_mode_t gpgme_get_pinentry_mode (@w{gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_get_pinenty_mode} returns the +mode set for the context. +@end deftypefun + +@deftp {Data type} {enum gpgme_pinentry_mode_t} +@tindex gpgme_pinentry_mode_t +The @code{gpgme_minentry_mode_t} type specifies the set of possible pinentry +modes that are supported by @acronym{GPGME} if GnuPG >= 2.1 is used. +The following modes are supported: + +@table @code +@item GPGME_PINENTRY_MODE_DEFAULT +Use the default of the agent, which is ask. + +@item GPGME_PINENTRY_MODE_ASK +Force the use of the Pinentry. + +@item GPGME_PINENTRY_MODE_CANCEL +Emulate use of Pinentry's cancel button. + +@item GPGME_PINENTRY_MODE_ERROR +Return a Pinentry error @code{No Pinentry}. + +@item GPGME_PINENTRY_MODE_LOOPBACK +Redirect Pinentry queries to the caller. +This enables the use of @code{gpgme_set_passphrase_cb} whis pinentry +queries redirected to gpgme. + +Note: This mode requires @code{allow-loopback-pinentry} to be enabled +in the @file{gpg-agent.conf} or an agent started with that option. + +@end table +@end deftp + + @node Included Certificates @subsection Included Certificates @cindex certificates, included @@ -2520,6 +2676,11 @@ keys. This only works if @code{GPGME_KEYLIST_MODE_SIGS} is also enabled. +@item GPGME_KEYLIST_MODE_WITH_TOFU +The @code{GPGME_KEYLIST_MODE_WITH_TOFU} symbol specifies that +information pertaining to the TOFU trust model should be included in +the listed keys. + @item GPGME_KEYLIST_MODE_WITH_SECRET The @code{GPGME_KEYLIST_MODE_WITH_SECRET} returns information about the presence of a corresponding secret key in a public key listing. A @@ -2616,6 +2777,10 @@ support an external passphrase callback at all, in this case the error code @code{GPG_ERR_NOT_SUPPORTED} is returned. +For GnuPG >= 2.1 the pinentry mode has to be set to +@code{GPGME_PINENTRY_MODE_LOOPBACK} to enable the passphrase callback. +See @code{gpgme_set_pinentry_mode}. + The user can disable the use of a passphrase callback function by calling @code{gpgme_set_passphrase_cb} with @var{passfunc} being @code{NULL}. @@ -2713,6 +2878,60 @@ variables. @end deftypefun +@deftypefun {gpgme_error_t} gpgme_set_ctx_flag @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{name}}, @ + @w{const char *@var{value}}) + +Some minor properties of the context can be controlled with flags set +by this function. The properties are identified by the following +values for @var{name}: + +@table @code +@item "full-status" +Using a @var{value} of "1" the status callback set by +gpgme_set_status_cb returns all status lines with the exception of +PROGRESS lines. With the default of "0" the status callback is only +called in certain situations. + +@item "raw-description" +Setting the @var{value} to "1" returns human readable strings in a raw +format. For example the non breaking space characters ("~") will not +be removed from the @code{description} field of the +@code{gpgme_tofu_info_t} object. + +@item "export-session-key" +Using a @var{value} of "1" specifies that the context should try to +export the symmetric session key when decrypting data. By default, or +when using an empty string or "0" for @var{value}, session keys are +not exported. + +@item "override-session-key" +The string given in @var{value} is passed to the GnuPG engine to override +the session key for decryption. The format of that session key is +specific to GnuPG and can be retrieved during a decrypt operation when +the context flag "export-session-key" is enabled. Please be aware that +using this feature with GnuPG < 2.1.16 will leak the session key on +many platforms via ps(1). + +@end table + +This function returns @code{0} on success. +@end deftypefun + + +@deftypefun {const char *} gpgme_get_ctx_flag @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{name}}) + +The value of flags settable by @code{gpgme_set_ctx_flag} can be +retrieved by this function. If @var{name} is unknown the function +returns @code{NULL}. For boolean flags an empty string is returned +for False and the string "1" is returned for True; either atoi(3) or a +test for an empty string can be used to get the boolean value. + +@end deftypefun + @node Locale @subsection Locale @@ -2760,9 +2979,120 @@ respective keys that should be used for the operation. The following section describes how such keys can be selected and manipulated. + +@menu +* Key objects:: Description of the key structures. +* Listing Keys:: Browsing the list of available keys. +* Information About Keys:: Requesting detailed information about keys. +* Manipulating Keys:: Operations on keys. +* Generating Keys:: Creating new key pairs. +* Signing Keys:: Adding key signatures to public keys. +* Exporting Keys:: Retrieving key data from the key ring. +* Importing Keys:: Adding keys to the key ring. +* Deleting Keys:: Removing keys from the key ring. +* Changing Passphrases:: Change the passphrase of a key. +* Changing TOFU Data:: Changing data pertaining to TOFU. +* Advanced Key Editing:: Advanced key edit operation. +@end menu + +@node Key objects +@subsection Key objects + +The keys are represented in GPGME by structures which may only be read +by the application but never be allocated or changed. They are valid +as long as the key object itself is valid. + +@deftp {Data type} gpgme_key_t + +The @code{gpgme_key_t} type is a pointer to a key object. It has the +following members: + +@table @code +@item gpgme_keylist_mode_t keylist_mode +The keylist mode that was active when the key was retrieved. + +@item unsigned int revoked : 1 +This is true if the key is revoked. + +@item unsigned int expired : 1 +This is true if the key is expired. + +@item unsigned int disabled : 1 +This is true if the key is disabled. + +@item unsigned int invalid : 1 +This is true if the key is invalid. This might have several reasons, +for a example for the S/MIME backend, it will be set during key +listings if the key could not be validated due to missing +certificates or unmatched policies. + +@item unsigned int can_encrypt : 1 +This is true if the key (ie one of its subkeys) can be used for +encryption. + +@item unsigned int can_sign : 1 +This is true if the key (ie one of its subkeys) can be used to create +data signatures. + +@item unsigned int can_certify : 1 +This is true if the key (ie one of its subkeys) can be used to create +key certificates. + +@item unsigned int can_authenticate : 1 +This is true if the key (ie one of its subkeys) can be used for +authentication. + +@item unsigned int is_qualified : 1 +This is true if the key can be used for qualified signatures according +to local government regulations. + +@item unsigned int secret : 1 +This is true if the key is a secret key. Note, that this will always +be true even if the corresponding subkey flag may be false +(offline/stub keys). This is only set if a listing of secret keys has +been requested or if @code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. + +@item gpgme_protocol_t protocol +This is the protocol supported by this key. + +@item char *issuer_serial +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +issuer serial. + +@item char *issuer_name +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +issuer name. + +@item char *chain_id +If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the +chain ID, which can be used to built the certificate chain. + +@item gpgme_validity_t owner_trust +If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the +owner trust. + +@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. + +@item gpgme_user_id_t uids +This is a linked list with the user IDs of the key. The first user ID +in the list is the main (or primary) user ID. + +@item char *fpr +This field gives the fingerprint of the primary key. Note that +this is a copy of the fingerprint of the first subkey. For an +incomplete key (for example from a verification result) a subkey may +be missing but this field may be set nevertheless. + +@end table +@end deftp + + @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 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 @code{gpgme_key_t} can contain several subkeys. The first subkey in @@ -2823,6 +3153,10 @@ This is the fingerprint of the subkey in hexadecimal digits, if available. +@item char *keygrip +The keygrip of the subkey in hex digit form or @code{NULL} if not +availabale. + @item long int timestamp This is the creation timestamp of the subkey. This is -1 if the timestamp is invalid, and 0 if it is not available. @@ -2838,38 +3172,89 @@ The serial number of a smart card holding this key or @code{NULL}. @item char *curve -For ECC algoritms the name of the curve. +For ECC algorithms the name of the curve. @end table @end deftp -@deftp {Data type} gpgme_key_sig_t -The @code{gpgme_key_sig_t} type is a pointer to a key signature structure. -Key signatures are one component of a @code{gpgme_key_t} object, and -validate user IDs on the key. - -The signatures on a key are only available if the key was retrieved -via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode -enabled, because it can be expensive to retrieve all signatures of a -key. +@deftp {Data type} gpgme_user_id_t -The signature notations on a key signature are only available if the -key was retrieved via a listing operation with the -@code{GPGME_KEYLIST_MODE_SIG_NOTATIONS} mode enabled, because it can -be expensive to retrieve all signature notations. +A user ID is a component of a @code{gpgme_key_t} object. One key can +have many user IDs. The first one in the list is the main (or +primary) user ID. -The key signature structure has the following members: +The user ID structure has the following members. @table @code -@item gpgme_key_sig_t next -This is a pointer to the next key signature structure in the linked -list, or @code{NULL} if this is the last element. +@item gpgme_user_id_t next +This is a pointer to the next user ID structure in the linked list, or +@code{NULL} if this is the last element. @item unsigned int revoked : 1 -This is true if the key signature is a revocation signature. +This is true if the user ID is revoked. -@item unsigned int expired : 1 -This is true if the key signature is expired. +@item unsigned int invalid : 1 +This is true if the user ID is invalid. + +@item gpgme_validity_t validity +This specifies the validity of the user ID. + +@item char *uid +This is the user ID string. + +@item char *name +This is the name component of @code{uid}, if available. + +@item char *comment +This is the comment component of @code{uid}, if available. + +@item char *email +This is the email component of @code{uid}, if available. + +@item char *address; +The mail address (addr-spec from RFC-5322) of the user ID string. +This is general the same as the @code{email} part of this structure +but might be slightly different. If no mail address is available +@code{NULL} is stored. + +@item gpgme_tofu_info_t tofu +If not @code{NULL} information from the TOFU database pertaining to +this user id. + +@item gpgme_key_sig_t signatures +This is a linked list with the signatures on this user ID. +@end table +@end deftp + + +@deftp {Data type} gpgme_key_sig_t + +The @code{gpgme_key_sig_t} type is a pointer to a key signature structure. +Key signatures are one component of a @code{gpgme_key_t} object, and +validate user IDs on the key in the OpenPGP protocol. + +The signatures on a key are only available if the key was retrieved +via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode +enabled, because it can be expensive to retrieve all signatures of a +key. + +The signature notations on a key signature are only available if the +key was retrieved via a listing operation with the +@code{GPGME_KEYLIST_MODE_SIG_NOTATIONS} mode enabled, because it can +be expensive to retrieve all signature notations. + +The key signature structure has the following members: + +@table @code +@item gpgme_key_sig_t next +This is a pointer to the next key signature structure in the linked +list, or @code{NULL} if this is the last element. + +@item unsigned int revoked : 1 +This is true if the key signature is a revocation signature. + +@item unsigned int expired : 1 +This is true if the key signature is expired. @item unsigned int invalid : 1 This is true if the key signature is invalid. @@ -2917,134 +3302,6 @@ @end table @end deftp -@deftp {Data type} gpgme_user_id_t -A user ID is a component of a @code{gpgme_key_t} object. One key can -have many user IDs. The first one in the list is the main (or -primary) user ID. - -The user ID structure has the following members. - -@table @code -@item gpgme_user_id_t next -This is a pointer to the next user ID structure in the linked list, or -@code{NULL} if this is the last element. - -@item unsigned int revoked : 1 -This is true if the user ID is revoked. - -@item unsigned int invalid : 1 -This is true if the user ID is invalid. - -@item gpgme_validity_t validity -This specifies the validity of the user ID. - -@item char *uid -This is the user ID string. - -@item char *name -This is the name component of @code{uid}, if available. - -@item char *comment -This is the comment component of @code{uid}, if available. - -@item char *email -This is the email component of @code{uid}, if available. - -@item gpgme_key_sig_t signatures -This is a linked list with the signatures on this user ID. -@end table -@end deftp - -@deftp {Data type} gpgme_key_t -The @code{gpgme_key_t} type is a pointer to a key object. It has the -following members: - -@table @code -@item gpgme_keylist_mode_t keylist_mode -The keylist mode that was active when the key was retrieved. - -@item unsigned int revoked : 1 -This is true if the key is revoked. - -@item unsigned int expired : 1 -This is true if the key is expired. - -@item unsigned int disabled : 1 -This is true if the key is disabled. - -@item unsigned int invalid : 1 -This is true if the key is invalid. This might have several reasons, -for a example for the S/MIME backend, it will be set in during key -listsing if the key could not be validated due to a missing -certificates or unmatched policies. - -@item unsigned int can_encrypt : 1 -This is true if the key (ie one of its subkeys) can be used for -encryption. - -@item unsigned int can_sign : 1 -This is true if the key (ie one of its subkeys) can be used to create -data signatures. - -@item unsigned int can_certify : 1 -This is true if the key (ie one of its subkeys) can be used to create -key certificates. - -@item unsigned int can_authenticate : 1 -This is true if the key (ie one of its subkeys) can be used for -authentication. - -@item unsigned int is_qualified : 1 -This is true if the key can be used for qualified signatures according -to local government regulations. - -@item unsigned int secret : 1 -This is true if the key is a secret key. Note, that this will always -be true even if the corresponding subkey flag may be false -(offline/stub keys). This is only set if a listing of secret keys has -been requested or if @code{GPGME_KEYLIST_MODE_WITH_SECRET} is active. - -@item gpgme_protocol_t protocol -This is the protocol supported by this key. - -@item char *issuer_serial -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -issuer serial. - -@item char *issuer_name -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -issuer name. - -@item char *chain_id -If @code{protocol} is @code{GPGME_PROTOCOL_CMS}, then this is the -chain ID, which can be used to built the certificate chain. - -@item gpgme_validity_t owner_trust -If @code{protocol} is @code{GPGME_PROTOCOL_OpenPGP}, then this is the -owner trust. - -@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. - -@item gpgme_user_id_t uids -This is a linked list with the user IDs of the key. The first user ID -in the list is the main (or primary) user ID. -@end table -@end deftp - -@menu -* Listing Keys:: Browsing the list of available keys. -* Information About Keys:: Requesting detailed information about keys. -* Key Signatures:: Listing the signatures on a key. -* Manipulating Keys:: Operations on keys. -* Generating Keys:: Creating new key pairs. -* Exporting Keys:: Retrieving key data from the key ring. -* Importing Keys:: Adding keys to the key ring. -* Deleting Keys:: Removing keys from the key ring. -* Changing Passphrases:: Change the passphrase of a key. -* Advanced Key Editing:: Advanced key edit operation. -@end menu @node Listing Keys @@ -3264,315 +3521,326 @@ @end deftp -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. -@deftp {Data type} gpgme_attr_t -The @code{gpgme_attr_t} type is used to specify a key or trust item -attribute. The following attributes are defined: -@table @code -@item GPGME_ATTR_KEYID -This is the key ID of a sub key. It is representable as a string. +@node Manipulating Keys +@subsection Manipulating Keys +@cindex key, manipulation -For trust items, the trust item refers to the key with this ID. +@deftypefun void gpgme_key_ref (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_ref} acquires an additional reference for +the key @var{key}. +@end deftypefun -@item GPGME_ATTR_FPR -This is the fingerprint of a sub key. It is representable as a -string. +@deftypefun void gpgme_key_unref (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_unref} releases a reference for the key +@var{key}. If this was the last reference, the key will be destroyed +and all resources associated to it will be released. +@end deftypefun -@item GPGME_ATTR_ALGO -This is the crypto algorithm for which the sub key can be used. It -is representable as a string and as a number. The numbers correspond -to the @code{enum gcry_pk_algos} values in the gcrypt library. -@item GPGME_ATTR_LEN -This is the key length of a sub key. It is representable as a -number. +@node Generating Keys +@subsection Generating Keys +@cindex key, creation +@cindex key ring, add -@item GPGME_ATTR_CREATED -This is the timestamp at creation time of a sub key. It is -representable as a number. +GPGME provides a set of functions to create public key pairs. Most of +these functions require the use of GnuPG 2.1 and later; for older +GnuPG versions the @code{gpgme_op_genkey} function can be used. +Existing code which wants to update to the new functions or new code +which shall supports older GnuPG versions may try the new functions +first and provide a fallback to the old function if the error code +@code{GPG_ERR_NOT_SUPPORTED} is received. -@item GPGME_ATTR_EXPIRE -This is the expiration time of a sub key. It is representable as a -number. +@c +@c gpgme_op_createkey +@c +@deftypefun gpgme_error_t gpgme_op_createkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{userid}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{gpgme_key_t @var{extrakey}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_createkey} generates a new key for the +procotol active in the context @var{ctx}. As of now this function +does only work for OpenPGP and requires at least version 2.1.13 of +GnuPG. -@item GPGME_ATTR_OTRUST -XXX FIXME (also for trust items) +@var{userid} is commonly the mail address associated with the key. +GPGME does not require a specificy syntax but if more than a mail +address is given, RFC-822 style format is suggested. The value is +expected to be in UTF-8 encoding (i.e. no IDN encoding for mail +addresses). This is a required parameter. + +@var{algo} specifies the algorithm for the new key (actually a keypair +of public and private key). For a list of supported algorithms, see +the GnuPG manual. If @var{algo} is @code{NULL} or the string +"default", the key is generated using the default algorithm of the +engine. If the string "future-default" is used the engine may use an +algorithm which is planned to be the default in a future release of +the engine; however existing implementation of the protocol may not be +able to already handle such future algorithms. For the OpenPGP +protocol, the specification of a default algorithm, without requesting +a non-default usage via @var{flags}, triggers the creation of a +primary key plus a secondary key (subkey). + +@var{reserved} must be set to zero. + +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new key. Using 0 does not +set an expiration date. Note that this parameter takes an unsigned long +value and not a @code{time_t} to avoid problems on systems which use a +signed 32 bit @code{time_t}. Note further that the OpenPGP protocol +uses 32 bit values for timestamps and thus can only encode dates up to +the year 2106. + +@var{extrakey} is currently not used and must be set to @code{NULL}. +A future version of GPGME may use this parameter to create X.509 keys. + +@var{flags} can be set to the bit-wise OR of the following flags: + +@table @code +@item GPGME_CREATE_SIGN +@itemx GPGME_CREATE_ENCR +@itemx GPGME_CREATE_CERT +@itemx GPGME_CREATE_AUTH +Do not create the key with the default capabilities (key usage) of the +requested algorithm but use those explicitly given by these flags: +``signing'', ``encryption'', ``certification'', or ``authentication''. +The allowed combinations depend on the algorithm. + +If any of these flags are set and a default algorithm has been +selected only one key is created in the case of the OpenPGP +protocol. + +@item GPGME_CREATE_NOPASSWD +Request generation of the key without password protection. + +@item GPGME_CREATE_SELFSIGNED +For an X.509 key do not create a CSR but a self-signed certificate. +This has not yet been implemented. + +@item GPGME_CREATE_NOSTORE +Do not store the created key in the local key database. +This has not yet been implemented. + +@item GPGME_CREATE_WANTPUB +@itemx GPGME_CREATE_WANTSEC +Return the public or secret key as part of the result structure. +This has not yet been implemented. + +@item GPGME_CREATE_FORCE +The engine does not allow the creation of a key with a user ID +already existing in the local key database. This flag can be used to +override this check. + +@end table + +After the operation completed successfully, information about the +created key can be retrieved with @code{gpgme_op_genkey_result}. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. + +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_createkey_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{userid}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{gpgme_key_t @var{extrakey}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_createkey_start} initiates a +@code{gpgme_op_createkey} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@item GPGME_ATTR_USERID -This is a user ID. There can be more than one user IDs in a -@var{gpgme_key_t} object. The first one (with index 0) is the primary -user ID. The user ID is representable as a number. +@end deftypefun -For trust items, this is the user ID associated with this trust item. +@c +@c gpgme_op_createsubkey +@c +@deftypefun gpgme_error_t gpgme_op_createsubkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_createsubkey} creates and adds a new +subkey to the primary OpenPGP key given by @var{KEY}. The only +allowed protocol in @var{ctx} is @code{GPGME_PROTOCOL_OPENPGP}. +Subkeys (aka secondary keys) are a concept in the OpenPGP protocol to +bind several keys to a primary key. As of now this function requires +at least version 2.1.13 of GnuPG. + +@var{key} specifies the key to operate on. + +@var{algo} specifies the algorithm for the new subkey. For a list of +supported algorithms, see the GnuPG manual. If @var{algo} is +@code{NULL} or the string "default", the subkey is generated using the +default algorithm for an encryption subkey of the engine. If the +string "future-default" is used the engine may use an encryption +algorithm which is planned to be the default in a future release of +the engine; however existing implementation of the protocol may not be +able to already handle such future algorithms. + +@var{reserved} must be set to zero. + +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new subkey. Using 0 does not +set an expiration date. Note that this parameter takes an unsigned long +value and not a @code{time_t} to avoid problems on systems which use a +signed 32 bit @code{time_t}. Note further that the OpenPGP protocol +uses 32 bit values for timestamps and thus can only encode dates up to +the year 2106. + +@var{flags} takes the same values as described above for +@code{gpgme_op_createkey}. + +After the operation completed successfully, information about the +created key can be retrieved with @code{gpgme_op_genkey_result}. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@item GPGME_ATTR_NAME -This is the name belonging to a user ID. It is representable as a string. -@item GPGME_ATTR_EMAIL -This is the email address belonging to a user ID. It is representable -as a string. +@end deftypefun -@item GPGME_ATTR_COMMENT -This is the comment belonging to a user ID. It is representable as a -string. +@deftypefun gpgme_error_t gpgme_op_createsubkey_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{algo}}, @ + @w{unsigned long @var{reserved}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_createsubkey_start} initiates a +@code{gpgme_op_createsubkey} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -@item GPGME_ATTR_VALIDITY -This is the validity belonging to a user ID. It is representable as a -string and as a number. See below for a list of available validities. +@end deftypefun -For trust items, this is the validity that is associated with this -trust item. -@item GPGME_ATTR_UID_REVOKED -This specifies if a user ID is revoked. It is representable as a -number, and is @code{1} if the user ID is revoked, and @code{0} -otherwise. +@c +@c gpgme_op_adduid +@c +@deftypefun gpgme_error_t gpgme_op_adduid @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_adduid} adds a new user ID to the OpenPGP +key given by @var{KEY}. Adding additional user IDs after key creation +is a feature of the OpenPGP protocol and thus the protocol for the +context @var{ctx} must be set to OpenPGP. As of now this function +requires at least version 2.1.13 of GnuPG. + +@var{key} specifies the key to operate on. + +@var{userid} is the user ID to add to the key. A user ID is commonly +the mail address to be associated with the key. GPGME does not +require a specificy syntax but if more than a mail address is given, +RFC-822 style format is suggested. The value is expected to be in +UTF-8 encoding (i.e. no IDN encoding for mail addresses). This is a +required parameter. + +@var{flags} are currently not used and must be set to zero. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@item GPGME_ATTR_UID_INVALID -This specifies if a user ID is invalid. It is representable as a -number, and is @code{1} if the user ID is invalid, and @code{0} -otherwise. +@end deftypefun -@item GPGME_ATTR_LEVEL -This is the trust level of a trust item. - -@item GPGME_ATTR_TYPE -This returns information about the type of key. For the string function -this will eother be "PGP" or "X.509". The integer function returns 0 -for PGP and 1 for X.509. It is also used for the type of a trust item. - -@item GPGME_ATTR_IS_SECRET -This specifies if the key is a secret key. It is representable as a -number, and is @code{1} if the key is revoked, and @code{0} otherwise. - -@item GPGME_ATTR_KEY_REVOKED -This specifies if a sub key is revoked. It is representable as a -number, and is @code{1} if the key is revoked, and @code{0} otherwise. - -@item GPGME_ATTR_KEY_INVALID -This specifies if a sub key is invalid. It is representable as a -number, and is @code{1} if the key is invalid, and @code{0} otherwise. - -@item GPGME_ATTR_KEY_EXPIRED -This specifies if a sub key is expired. It is representable as a -number, and is @code{1} if the key is expired, and @code{0} otherwise. - -@item GPGME_ATTR_KEY_DISABLED -This specifies if a sub key is disabled. It is representable as a -number, and is @code{1} if the key is disabled, and @code{0} otherwise. - -@item GPGME_ATTR_KEY_CAPS -This is a description of the capabilities of a sub key. It is -representable as a string. The string contains the letter ``e'' if -the key can be used for encryption, ``s'' if the key can be used for -signatures, and ``c'' if the key can be used for certifications. - -@item GPGME_ATTR_CAN_ENCRYPT -This specifies if a sub key can be used for encryption. It is -representable as a number, and is @code{1} if the sub key can be used -for encryption, and @code{0} otherwise. - -@item GPGME_ATTR_CAN_SIGN -This specifies if a sub key can be used to create data signatures. It -is representable as a number, and is @code{1} if the sub key can be -used for signatures, and @code{0} otherwise. - -@item GPGME_ATTR_CAN_CERTIFY -This specifies if a sub key can be used to create key certificates. -It is representable as a number, and is @code{1} if the sub key can be -used for certifications, and @code{0} otherwise. - -@item GPGME_ATTR_SERIAL -The X.509 issuer serial attribute of the key. It is representable as -a string. - -@item GPGME_ATTR_ISSUE -The X.509 issuer name attribute of the key. It is representable as a -string. - -@item GPGME_ATTR_CHAINID -The X.509 chain ID can be used to build the certification chain. It -is representable as a string. -@end table -@end deftp - -@deftypefun {const char *} gpgme_key_get_string_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_get_string_attr} returns the value of the -string-representable attribute @var{what} of key @var{key}. If the -attribute is an attribute of a sub key or an user ID, @var{idx} -specifies the sub key or user ID of which the attribute value is -returned. The argument @var{reserved} is reserved for later use and -should be @code{NULL}. - -The string returned is only valid as long as the key is valid. - -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - -@deftypefun {unsigned long} gpgme_key_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_get_ulong_attr} returns the value of the -number-representable attribute @var{what} of key @var{key}. If the -attribute is an attribute of a sub key or an user ID, @var{idx} -specifies the sub key or user ID of which the attribute value is -returned. The argument @var{reserved} is reserved for later use and -should be @code{NULL}. +@deftypefun gpgme_error_t gpgme_op_adduid_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_adduid_start} initiates a +@code{gpgme_op_adduid} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -The function returns @code{0} if the attribute can't be returned as a -number, @var{key} is not a valid pointer, @var{idx} out of range, or -@var{reserved} not @code{NULL}. @end deftypefun -@node Key Signatures -@subsection Key Signatures -@cindex key, signatures -@cindex signatures, on a key - -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -The signatures on a key are only available if the key was retrieved -via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode -enabled, because it is expensive to retrieve all signatures of a key. - -So, before using the below interfaces to retrieve the signatures on a -key, you have to make sure that the key was listed with signatures -enabled. One convenient, but blocking, way to do this is to use the -function @code{gpgme_get_key}. - -@deftp {Data type} gpgme_attr_t -The @code{gpgme_attr_t} type is used to specify a key signature -attribute. The following attributes are defined: - -@table @code -@item GPGME_ATTR_KEYID -This is the key ID of the key which was used for the signature. It is -representable as a string. - -@item GPGME_ATTR_ALGO -This is the crypto algorithm used to create the signature. It is -representable as a string and as a number. The numbers correspond to -the @code{enum gcry_pk_algos} values in the gcrypt library. - -@item GPGME_ATTR_CREATED -This is the timestamp at creation time of the signature. It is -representable as a number. - -@item GPGME_ATTR_EXPIRE -This is the expiration time of the signature. It is representable as -a number. - -@item GPGME_ATTR_USERID -This is the user ID associated with the signing key. The user ID is -representable as a number. - -@item GPGME_ATTR_NAME -This is the name belonging to a user ID. It is representable as a string. - -@item GPGME_ATTR_EMAIL -This is the email address belonging to a user ID. It is representable -as a string. - -@item GPGME_ATTR_COMMENT -This is the comment belonging to a user ID. It is representable as a -string. - -@item GPGME_ATTR_KEY_REVOKED -This specifies if a key signature is a revocation signature. It is -representable as a number, and is @code{1} if the key is revoked, and -@code{0} otherwise. - -@c @item GPGME_ATTR_KEY_EXPIRED -@c This specifies if a key signature is expired. It is representable as -@c a number, and is @code{1} if the key is revoked, and @code{0} -@c otherwise. @c -@item GPGME_ATTR_SIG_CLASS -This specifies the signature class of a key signature. It is -representable as a number. The meaning is specific to the crypto -engine. - -@item GPGME_ATTR_SIG_CLASS -This specifies the signature class of a key signature. It is -representable as a number. The meaning is specific to the crypto -engine. - -@item GPGME_ATTR_SIG_STATUS -This is the same value as returned by @code{gpgme_get_sig_status}. -@end table -@end deftp - -@deftypefun {const char *} gpgme_key_sig_get_string_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_sig_get_string_attr} returns the value of -the string-representable attribute @var{what} of the signature -@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The -argument @var{reserved} is reserved for later use and should be -@code{NULL}. - -The string returned is only valid as long as the key is valid. - -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} -out of range, or @var{reserved} not @code{NULL}. -@end deftypefun - -@deftypefun {unsigned long} gpgme_key_sig_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_key_sig_get_ulong_attr} returns the value of -the number-representable attribute @var{what} of the signature -@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The -argument @var{reserved} is reserved for later use and should be -@code{NULL}. - -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} -out of range, or @var{reserved} not @code{NULL}. -@end deftypefun - - -@node Manipulating Keys -@subsection Manipulating Keys -@cindex key, manipulation - -@deftypefun void gpgme_key_ref (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_ref} acquires an additional reference for -the key @var{key}. -@end deftypefun +@c gpgme_op_revuid +@c +@deftypefun gpgme_error_t gpgme_op_revuid @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_revuid} revokes a user ID from the OpenPGP +key given by @var{KEY}. Revoking user IDs after key creation is a +feature of the OpenPGP protocol and thus the protocol for the context +@var{ctx} must be set to OpenPGP. As of now this function requires at +least version 2.1.13 of GnuPG. + +@var{key} specifies the key to operate on. + +@var{userid} is the user ID to be revoked from the key. The user ID +must be given verbatim because the engine does an exact and case +sensitive match. Thus the @code{uid} field from the user ID object +(@code{gpgme_user_id_t}) is to be used. This is a required parameter. + +@var{flags} are currently not used and must be set to zero. + +Note that the engine won't allow to revoke the last valid user ID. To +change a user ID is better to first add the new user ID, then revoke +the old one, and finally publish the key. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. -@deftypefun void gpgme_key_unref (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_unref} releases a reference for the key -@var{key}. If this was the last reference, the key will be destroyed -and all resources associated to it will be released. @end deftypefun +@deftypefun gpgme_error_t gpgme_op_revuid_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_revuid_start} initiates a +@code{gpgme_op_revuid} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun void gpgme_key_release (@w{gpgme_key_t @var{key}}) -The function @code{gpgme_key_release} is equivalent to -@code{gpgme_key_unref}. @end deftypefun -@node Generating Keys -@subsection Generating Keys -@cindex key, creation -@cindex key ring, add +@c +@c gpgme_op_genkey +@c +@deftypefun gpgme_error_t gpgme_op_genkey @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{parms}}, @ + @w{gpgme_data_t @var{public}}, @ + @w{gpgme_data_t @var{secret}}) -@deftypefun gpgme_error_t gpgme_op_genkey (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{parms}}, @w{gpgme_data_t @var{public}}, @w{gpgme_data_t @var{secret}}) The function @code{gpgme_op_genkey} generates a new key pair in the context @var{ctx}. The meaning of @var{public} and @var{secret} depends on the crypto backend. -GnuPG does not support @var{public} and @var{secret}, they should be +GPG does not support @var{public} and @var{secret}, they should be @code{NULL}. GnuPG will generate a key pair and add it to the standard key ring. The fingerprint of the generated key is available with @code{gpgme_op_genkey_result}. @@ -3629,6 +3897,7 @@ @end deftypefun @deftypefun gpgme_error_t gpgme_op_genkey_start (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{parms}}, @w{gpgme_data_t @var{public}}, @w{gpgme_data_t @var{secret}}) + The function @code{gpgme_op_genkey_start} initiates a @code{gpgme_op_genkey} operation. It can be completed by calling @code{gpgme_wait} on the context. @xref{Waiting For Completion}. @@ -3640,7 +3909,12 @@ @code{NULL}. @end deftypefun + +@c +@c gpgme_op_genkey_result +@c @deftp {Data type} {gpgme_genkey_result_t} + This is a pointer to a structure used to store the result of a @code{gpgme_op_genkey} operation. After successfully generating a key, you can retrieve the pointer to the result with @@ -3649,22 +3923,34 @@ @table @code @item unsigned int primary : 1 -This is a flag that is set to 1 if a primary key was created and to 0 +This flag is set to 1 if a primary key was created and to 0 if not. @item unsigned int sub : 1 -This is a flag that is set to 1 if a subkey was created and to 0 -if not. +This flag is set to 1 if a subkey was created and to 0 if not. + +@item unsigned int uid : 1 +This flag is set to 1 if a user ID was created and to 0 if not. @item char *fpr This is the fingerprint of the key that was created. If both a -primary and a sub key were generated, the fingerprint of the primary +primary and a subkey were generated, the fingerprint of the primary key will be returned. If the crypto engine does not provide the fingerprint, @code{fpr} will be a null pointer. + +@item gpgme_data_t pubkey +This will eventually be used to return the public key. It is +currently not used. + +@item gpgme_data_t seckey +This will eventually be used to return the secret key. It is +currently not used. + @end table @end deftp @deftypefun gpgme_genkey_result_t gpgme_op_genkey_result (@w{gpgme_ctx_t @var{ctx}}) + The function @code{gpgme_op_genkey_result} returns a @code{gpgme_genkey_result_t} pointer to a structure holding the result of a @code{gpgme_op_genkey} operation. The pointer is only valid if the @@ -3672,9 +3958,110 @@ @code{gpgme_op_genkey_start} operation, and if this operation finished successfully. The returned pointer is only valid until the next operation is started on the context. + +@end deftypefun + + +@c +@c SIGNING KEYS +@c +@node Signing Keys +@subsection Signing Keys +@cindex key, signing + +Key signatures are a unique concept of the OpenPGP protocol. They can +be used to certify the validity of a key and are used to create the +Web-of-Trust (WoT). Instead of using the @code{gpgme_op_interact} +function along with a finite state machine, GPGME provides a +convenient function to create key signatures when using modern GnuPG +versions. + + +@c +@c gpgme_op_keysign +@c +@deftypefun gpgme_error_t gpgme_op_keysign @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_keysign} adds a new key signature to the +public key @var{KEY}. This function requires at least version 2.1.12 of +GnuPG. + +@var{CTX} is the usual context which describes the protocol to use +(which must be OpenPGP) and has also the list of signer keys to be +used for the signature. The common case is to use the default key for +signing other keys. If another key or more than one key shall be used +for a key signature, @code{gpgme_signers_add} can be used. +@xref{Selecting Signers}. + +@var{key} specifies the key to operate on. + +@var{userid} selects the user ID or user IDs to be signed. If +@var{userid} is set to @code{NULL} all valid user IDs are signed. The +user ID must be given verbatim because the engine does an exact and +case sensitive match. Thus the @code{uid} field from the user ID +object (@code{gpgme_user_id_t}) is to be used. To select more than +one user ID put them all into one string separated by linefeeds +characters (@code{\n}) and set the flag @code{GPGME_KEYSIGN_LFSEP}. + +@var{expires} can be set to the number of seconds since Epoch of the +desired expiration date in UTC for the new signature. The common case +is to use 0 to not set an expiration date. However, if the +configuration of the engine defines a default expiration for key +signatures, that is still used unless the flag +@code{GPGME_KEYSIGN_NOEXPIRE} is used. Note that this parameter takes +an unsigned long value and not a @code{time_t} to avoid problems on +systems which use a signed 32 bit @code{time_t}. Note further that +the OpenPGP protocol uses 32 bit values for timestamps and thus can +only encode dates up to the year 2106. + +@var{flags} can be set to the bit-wise OR of the following flags: + +@table @code +@item GPGME_KEYSIGN_LOCAL +Instead of creating an exportable key signature, create a key +signature which is is marked as non-exportable. + +@item GPGME_KEYSIGN_LFSEP +Although linefeeds are uncommon in user IDs this flag is required to +explicitly declare that @var{userid} may contain several linefeed +separated user IDs. + +@item GPGME_KEYSIGN_NOEXPIRE +Force the creation of a key signature without an expiration date. This +overrides @var{expire} and any local configuration of the engine. + +@end table + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. + +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_keysign_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{const char *@var{userid}}, @ + @w{unsigned long @var{expires}}, @ + @w{unsigned int @var{flags}}); + +The function @code{gpgme_op_keysign_start} initiates a +@code{gpgme_op_keysign} operation; see there for details. It must +be completed by calling @code{gpgme_wait} on the context. +@xref{Waiting For Completion}. + @end deftypefun +@c +@c EXPORTING KEYS +@c @node Exporting Keys @subsection Exporting Keys @cindex key, export @@ -3787,7 +4174,7 @@ specified for @var{keydata}. The keys to export are taken form the @code{NULL} terminated array -@var{keys}. Only keys of the the currently selected protocol of +@var{keys}. Only keys of the currently selected protocol of @var{ctx} which do have a fingerprint set are considered for export. Other keys specified by the @var{keys} are ignored. In particular OpenPGP keys retrieved via an external key listing are not included. @@ -3860,7 +4247,7 @@ for the usual workaround of exporting and then importing a key to make an X.509 key permanent.} -Only keys of the the currently selected protocol of @var{ctx} are +Only keys of the currently selected protocol of @var{ctx} are considered for import. Other keys specified by the @var{keys} are ignored. As of now all considered keys must have been retrieved using the same method, that is the used key listing mode must be identical. @@ -3947,34 +4334,34 @@ @item int imported The total number of imported keys. -@item imported_rsa +@item int imported_rsa The number of imported RSA keys. -@item unchanged +@item int unchanged The number of unchanged keys. -@item new_user_ids +@item int new_user_ids The number of new user IDs. -@item new_sub_keys +@item int new_sub_keys The number of new sub keys. -@item new_signatures +@item int new_signatures The number of new signatures. -@item new_revocations +@item int new_revocations The number of new revocations. -@item secret_read +@item int secret_read The total number of secret keys read. -@item secret_imported +@item int secret_imported The number of imported secret keys. -@item secret_unchanged +@item int secret_unchanged The number of unchanged secret keys. -@item not_imported +@item int not_imported The number of keys not imported. @item gpgme_import_status_t imports @@ -3993,24 +4380,6 @@ operation is started on the context. @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun gpgme_error_t gpgme_op_import_ext (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{keydata}}, @w{int *@var{nr}}) -The function @code{gpgme_op_import_ext} is equivalent to: - -@example - gpgme_error_t err = gpgme_op_import (ctx, keydata); - if (!err) - @{ - gpgme_import_result_t result = gpgme_op_import_result (ctx); - *nr = result->considered; - @} -@end example -@end deftypefun - - @node Deleting Keys @subsection Deleting Keys @cindex key, delete @@ -4043,7 +4412,7 @@ @node Changing Passphrases -@subsection Changing Passphrases +@subsection Changing Passphrases @cindex passphrase, change @deftypefun gpgme_error_t gpgme_op_passwd @ @@ -4077,27 +4446,104 @@ @end deftypefun -@node Advanced Key Editing -@subsection Advanced Key Editing -@cindex key, edit +@c +@c CHANGING TOFU DATA +@c +@node Changing TOFU Data +@subsection Changing TOFU Data +@cindex validity, TOFU -@deftp {Data type} {gpgme_error_t (*gpgme_edit_cb_t) (@w{void *@var{handle}}, @w{gpgme_status_code_t @var{status}}, @w{const char *@var{args}}, @w{int @var{fd}})} -@tindex gpgme_edit_cb_t -The @code{gpgme_edit_cb_t} type is the type of functions which -@acronym{GPGME} calls if it a key edit operation is on-going. The -status code @var{status} and the argument line @var{args} are passed -through by @acronym{GPGME} from the crypto engine. The file -descriptor @var{fd} is -1 for normal status messages. If @var{status} -indicates a command rather than a status message, the response to the -command should be written to @var{fd}. The @var{handle} is provided -by the user at start of operation. +The OpenPGP engine features a Trust-On-First-Use (TOFU) key validation +model. For resolving clonflics it is necessary to declare the policy +for a key. See the GnuPG manual for details on the TOFU +implementation. + +@deftp {Data type} {enum gpgme_tofu_policy_t} +@tindex gpgme_tofu_policy_t +The @code{gpgme_tofu_policy_t} type specifies the set of possible +policy values that are supported by @acronym{GPGME}: + +@table @code +@item GPGME_TOFU_POLICY_AUTO +Set the policy to ``auto''. +@item GPGME_TOFU_POLICY_GOOD +Set the policy to ``goog''. +@item GPGME_TOFU_POLICY_BAD +Set the policy to ``bad''. +@item GPGME_TOFU_POLICY_ASK +Set the policy to ``ask''. +@item GPGME_TOFU_POLICY_UNKNOWN +Set the policy to ``unknown''. +@end table -The function should return @code{GPG_ERR_NO_ERROR} or an error value. @end deftp -@deftypefun gpgme_error_t gpgme_op_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_edit} processes the key @var{KEY} -interactively, using the edit callback function @var{FNC} with the +To change the policy for a key the following functions can be used: + +@deftypefun gpgme_error_t gpgme_op_tofu_policy @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const gpgme_key_t @var{key}}, @ + @w{gpgme_tofu_policy_t @var{policy}}) + +The function @code{gpgme_op_tofu_policy} changes the TOFU policy of +@var{key}. The valid values for @var{policy} are listed above. As of +now this function does only work for OpenPGP and requires at least +version 2.1.10 of GnuPG. + +The function returns zero on success, @code{GPG_ERR_NOT_SUPPORTED} if +the engine does not support the command, or a bunch of other error +codes. + +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_tofu_policy_start @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const gpgme_key_t @var{key}}, @ + @w{gpgme_tofu_policy_t @var{policy}}) + +The function @code{gpgme_op_tofu_policy_start} initiates a +@code{gpgme_op_tofu_policy} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns @code{0} if the operation was started successfully, +and an error code if one of the arguments is not valid or the oepration +could not be started. + +@end deftypefun + + +@node Advanced Key Editing +@subsection Advanced Key Editing +@cindex key, edit + +@deftp {Data type} {gpgme_error_t (*gpgme_interact_cb_t) @ + (@w{void *@var{handle}}, @ + @w{const char *@var{status}}, @ + @w{const char *@var{args}}, @ + @w{int @var{fd}})} +@tindex gpgme_interact_cb_t +The @code{gpgme_interact_cb_t} type is the type of functions which +@acronym{GPGME} calls if it a key interact operation is on-going. The +status keyword @var{status} and the argument line @var{args} are +passed through by @acronym{GPGME} from the crypto engine. An empty +string represents EOF. The file descriptor @var{fd} is -1 for normal +status messages. If @var{status} indicates a command rather than a +status message, the response to the command should be written to +@var{fd}. The @var{handle} is provided by the user at start of +operation. + +The function should return @code{GPG_ERR_FALSE} if it did not handle +the status code, @code{0} for success, or any other error value. +@end deftp + +@deftypefun gpgme_error_t gpgme_op_interact (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{unsigned int @var{flags}}, @ + @w{gpgme_interact_cb_t @var{fnc}}, @ + @w{void *@var{handle}}, @ + @w{gpgme_data_t @var{out}}) +The function @code{gpgme_op_interact} processes the key @var{KEY} +interactively, using the interact callback function @var{FNC} with the handle @var{HANDLE}. The callback is invoked for every status and command request from the crypto engine. The output of the crypto engine is written to the data object @var{out}. @@ -4106,39 +4552,40 @@ engine is specific to the crypto engine and no further support in implementing this protocol correctly is provided by @acronym{GPGME}. -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -edit operation completes successfully, @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer, and any error returned -by the crypto engine or the edit callback handler. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_op_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_edit_start} initiates a -@code{gpgme_op_edit} operation. It can be completed by calling -@code{gpgme_wait} on the context. @xref{Waiting For Completion}. +@var{flags} modifies the behaviour of the function; the only defined +bit value is: -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation was started successfully, and @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer. -@end deftypefun +@table @code +@item GPGME_INTERACT_CARD +This is used for smartcard based keys and uses gpg’s +@code{--card-edit} command. +@end table -@deftypefun gpgme_error_t gpgme_op_card_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_card_edit} is analogous to -@code{gpgme_op_edit}, but should be used to process the smart card corresponding to the key @var{key}. +The function returns @code{0} if the edit operation completes +successfully, @code{GPG_ERR_INV_VALUE} if @var{ctx} or @var{key} is +not a valid pointer, and any error returned by the crypto engine or +the edit callback handler. @end deftypefun -@deftypefun gpgme_error_t gpgme_op_card_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) -The function @code{gpgme_op_card_edit_start} initiates a -@code{gpgme_op_card_edit} operation. It can be completed by calling + +@deftypefun gpgme_error_t gpgme_op_interact_start (@w{gpgme_ctx_t @var{ctx}}, @ + @w{gpgme_key_t @var{key}}, @ + @w{unsigned int @var{flags}}, @ + @w{gpgme_interact_cb_t @var{fnc}}, @ + @w{void *@var{handle}}, @ + @w{gpgme_data_t @var{out}}) +The function @code{gpgme_op_interact_start} initiates a +@code{gpgme_op_interact} operation. It can be completed by calling @code{gpgme_wait} on the context. @xref{Waiting For Completion}. -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation was started successfully, and @code{GPG_ERR_INV_VALUE} if -@var{ctx} or @var{key} is not a valid pointer. +The function returns @code{0} if the operation was started +successfully, and @code{GPG_ERR_INV_VALUE} if @var{ctx} or @var{key} +is not a valid pointer. @end deftypefun + @node Trust Item Management @section Trust Item Management @cindex trust item @@ -4173,7 +4620,6 @@ @menu * Listing Trust Items:: Browsing the list of available trust items. -* Information About Trust Items:: Requesting information about trust items. * Manipulating Trust Items:: Operations on trust items. @end menu @@ -4230,47 +4676,6 @@ @end deftypefun -@node Information About Trust Items -@subsection Information About Trust Items -@cindex trust item, information about -@cindex trust item, attributes -@cindex attributes, of a trust item - -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -Trust items have attributes which can be queried using the interfaces -below. The attribute identifiers are shared with those for key -attributes. @xref{Information About Keys}. - -@deftypefun {const char *} gpgme_trust_item_get_string_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_trust_item_get_string_attr} returns the value -of the string-representable attribute @var{what} of trust item -@var{item}. The arguments @var{idx} and @var{reserved} are reserved -for later use and should be @code{0} and @code{NULL} respectively. - -The string returned is only valid as long as the key is valid. - -The function returns @code{0} if an attribute can't be returned as a -string, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - -@deftypefun int gpgme_trust_item_get_int_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) -The function @code{gpgme_trust_item_get_int_attr} returns the value of -the number-representable attribute @var{what} of trust item -@var{item}. If the attribute occurs more than once in the trust item, -the index is specified by @var{idx}. However, currently no such -attribute exists, so @var{idx} should be @code{0}. The argument -@var{reserved} is reserved for later use and should be @code{NULL}. - -The function returns @code{0} if the attribute can't be returned as a -number, @var{key} is not a valid pointer, @var{idx} out of range, -or @var{reserved} not @code{NULL}. -@end deftypefun - - @node Manipulating Trust Items @subsection Manipulating Trust Items @cindex trust item, manipulation @@ -4288,16 +4693,6 @@ @end deftypefun -The following interface is deprecated and only provided for backward -compatibility. Don't use it. It will be removed in a future version -of @acronym{GPGME}. - -@deftypefun void gpgme_trust_item_release (@w{gpgme_trust_item_t @var{item}}) -The function @code{gpgme_trust_item_release} is an alias for -@code{gpgme_trust_item_unref}. -@end deftypefun - - @node Crypto Operations @section Crypto Operations @cindex cryptographic operation @@ -4394,8 +4789,10 @@ This is a pointer to a structure used to store the result of a @code{gpgme_op_decrypt} operation. After successfully decrypting data, you can retrieve the pointer to the result with -@code{gpgme_op_decrypt_result}. The structure contains the following -members: +@code{gpgme_op_decrypt_result}. As with all result structures, it +this structure shall be considered read-only and an application must +not allocated such a strucure on its own. The structure contains the +following members: @table @code @item char *unsupported_algorithm @@ -4411,6 +4808,19 @@ @item char *file_name This is the filename of the original plaintext message file if it is known, otherwise this is a null pointer. + +@item char *session_key +A textual representation (nul-terminated string) of the session key +used in symmetric encryption of the message, if the context has been +set to export session keys (see @code{gpgme_set_ctx_flag, +"export-session-key"}), and a session key was available for the most +recent decryption operation. Otherwise, this is a null pointer. + +You must not try to access this member of the struct unless +@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns success +or @code{gpgme_get_ctx_flag (ctx, "export-session-key")} returns true +(non-empty string). + @end table @end deftp @@ -4676,6 +5086,13 @@ @item char *pka_address The mailbox from the PKA information or @code{NULL}. + +@item gpgme_key_t key +An object describing the key used to create the signature. This key +object may be incomplete in that it only conveys information +availabale directly with a signature. It may also be @code{NULL} if +such information is not readily available. + @end table @end deftp @@ -4712,321 +5129,111 @@ @end deftypefun -The following interfaces are deprecated and only provided for backward -compatibility. Don't use them. They will be removed in a future -version of @acronym{GPGME}. - -@deftp {Data type} {enum gpgme_sig_stat_t} -@tindex gpgme_sig_stat_t -The @code{gpgme_sig_stat_t} type holds the result of a signature check, or -the combined result of all signatures. The following results are -possible: +@node Decrypt and Verify +@subsection Decrypt and Verify +@cindex decryption and verification +@cindex verification and decryption +@cindex signature check +@cindex cryptographic operation, decryption and verification -@table @code -@item GPGME_SIG_STAT_NONE -This status should not occur in normal operation. +@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) +The function @code{gpgme_op_decrypt_verify} decrypts the ciphertext in +the data object @var{cipher} and stores it into the data object +@var{plain}. If @var{cipher} contains signatures, they will be +verified. -@item GPGME_SIG_STAT_GOOD -This status indicates that the signature is valid. For the combined -result this status means that all signatures are valid. +After the operation completed, @code{gpgme_op_decrypt_result} and +@code{gpgme_op_verify_result} can be used to retrieve more information +about the signatures. -@item GPGME_SIG_STAT_GOOD_EXP -This status indicates that the signature is valid but expired. For -the combined result this status means that all signatures are valid -and expired. +If the error code @code{GPG_ERR_NO_DATA} is returned, @var{cipher} +does not contain any data to decrypt. However, it might still be +signed. The information about detected signatures is available with +@code{gpgme_op_verify_result} in this case. -@item GPGME_SIG_STAT_GOOD_EXPKEY -This status indicates that the signature is valid but the key used to -verify the signature has expired. For the combined result this status -means that all signatures are valid and all keys are expired. +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +ciphertext could be decrypted successfully, @code{GPG_ERR_INV_VALUE} +if @var{ctx}, @var{cipher} or @var{plain} is not a valid pointer, +@code{GPG_ERR_NO_DATA} if @var{cipher} does not contain any data to +decrypt, @code{GPG_ERR_DECRYPT_FAILED} if @var{cipher} is not a valid +cipher text, @code{GPG_ERR_BAD_PASSPHRASE} if the passphrase for the +secret key could not be retrieved, and passes through any errors that +are reported by the crypto engine support routines. +@end deftypefun -@item GPGME_SIG_STAT_BAD -This status indicates that the signature is invalid. For the combined -result this status means that all signatures are invalid. +@deftypefun gpgme_error_t gpgme_op_decrypt_verify_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) +The function @code{gpgme_op_decrypt_verify_start} initiates a +@code{gpgme_op_decrypt_verify} operation. It can be completed by +calling @code{gpgme_wait} on the context. @xref{Waiting For +Completion}. -@item GPGME_SIG_STAT_NOKEY -This status indicates that the signature could not be verified due to -a missing key. For the combined result this status means that all -signatures could not be checked due to missing keys. +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation could be started successfully, @code{GPG_ERR_INV_VALUE} if +@var{ctx}, @var{cipher}, @var{plain} or @var{r_stat} is not a valid +pointer, and @code{GPG_ERR_NO_DATA} if @var{cipher} does not contain +any data to decrypt. +@end deftypefun -@item GPGME_SIG_STAT_NOSIG -This status indicates that the signature data provided was not a real -signature. +When processing mails it is sometimes useful to extract the actual +mail address (the ``addr-spec'') from a string. GPGME provides this +helper function which uses the same semantics as the internal +functions in GPGME and GnuPG: + +@deftypefun @w{char *} gpgme_addrspec_from_uid (@w{const char *@var{uid}}) + +Return the mail address (called ``addr-spec'' in RFC-5322) from the +string @var{uid} which is assumed to be a user id (called ``address'' +in RFC-5322). All plain ASCII characters (i.e. those with bit 7 +cleared) in the result are converted to lowercase. Caller must free +the result using @code{gpgme_free}. Returns @code{NULL} if no valid +address was found (in which case @code{ERRNO} is set to @code{EINVAL}) +or for other errors. -@item GPGME_SIG_STAT_ERROR -This status indicates that there was some other error which prevented -the signature verification. +@end deftypefun -@item GPGME_SIG_STAT_DIFF -For the combined result this status means that at least two signatures -have a different status. You can get each key's status with -@code{gpgme_get_sig_status}. -@end table -@end deftp -@deftypefun {const char *} gpgme_get_sig_status (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_sig_stat_t *@var{r_stat}}, @w{time_t *@var{r_created}}) -The function @code{gpgme_get_sig_status} is equivalent to: +@node Sign +@subsection Sign +@cindex signature, creation +@cindex sign +@cindex cryptographic operation, signing -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; +A signature can contain signatures by one or more keys. The set of +keys used to create a signatures is contained in a context, and is +applied to all following signing operations in this context (until the +set is changed). - result = gpgme_op_verify_result (ctx); - sig = result->signatures; +@menu +* Selecting Signers:: How to choose the keys to sign with. +* Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. +@end menu - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return NULL; - if (r_stat) - @{ - switch (gpg_err_code (sig->status)) - @{ - case GPG_ERR_NO_ERROR: - *r_stat = GPGME_SIG_STAT_GOOD; - break; +@node Selecting Signers +@subsubsection Selecting Signers +@cindex signature, selecting signers +@cindex signers, selecting - case GPG_ERR_BAD_SIGNATURE: - *r_stat = GPGME_SIG_STAT_BAD; - break; +The key or the keys used to create a signature are stored in the +context. The following functions can be used to manipulate this list. +If no signer has been set into the context a default key is used for +signing. - case GPG_ERR_NO_PUBKEY: - *r_stat = GPGME_SIG_STAT_NOKEY; - break; +@deftypefun void gpgme_signers_clear (@w{gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_signers_clear} releases a reference for each +key on the signers list and removes the list of signers from the +context @var{ctx}. - case GPG_ERR_NO_DATA: - *r_stat = GPGME_SIG_STAT_NOSIG; - break; +Every context starts with an empty list. +@end deftypefun - case GPG_ERR_SIG_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXP; - break; +@deftypefun gpgme_error_t gpgme_signers_add (@w{gpgme_ctx_t @var{ctx}}, @w{const gpgme_key_t @var{key}}) +The function @code{gpgme_signers_add} adds the key @var{key} to the +list of signers in the context @var{ctx}. - case GPG_ERR_KEY_EXPIRED: - *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; - break; - - default: - *r_stat = GPGME_SIG_STAT_ERROR; - break; - @} - @} - if (r_created) - *r_created = sig->timestamp; - return sig->fpr; -@end example -@end deftypefun - -@deftypefun {const char *} gpgme_get_sig_string_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{what}}, @w{int @var{whatidx}}) -The function @code{gpgme_get_sig_string_attr} is equivalent to: - -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return NULL; - - switch (what) - @{ - case GPGME_ATTR_FPR: - return sig->fpr; - - case GPGME_ATTR_ERRTOK: - if (whatidx == 1) - return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; - else - return ""; - default: - break; - @} - - return NULL; -@end example -@end deftypefun - -@deftypefun {const char *} gpgme_get_sig_ulong_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{waht}}, @w{int @var{whatidx}}) -The function @code{gpgme_get_sig_ulong_attr} is equivalent to: - -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return 0; - - switch (what) - @{ - case GPGME_ATTR_CREATED: - return sig->timestamp; - - case GPGME_ATTR_EXPIRE: - return sig->exp_timestamp; - - case GPGME_ATTR_VALIDITY: - return (unsigned long) sig->validity; - - case GPGME_ATTR_SIG_STATUS: - switch (sig->status) - @{ - case GPG_ERR_NO_ERROR: - return GPGME_SIG_STAT_GOOD; - - case GPG_ERR_BAD_SIGNATURE: - return GPGME_SIG_STAT_BAD; - - case GPG_ERR_NO_PUBKEY: - return GPGME_SIG_STAT_NOKEY; - - case GPG_ERR_NO_DATA: - return GPGME_SIG_STAT_NOSIG; - - case GPG_ERR_SIG_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXP; - - case GPG_ERR_KEY_EXPIRED: - return GPGME_SIG_STAT_GOOD_EXPKEY; - - default: - return GPGME_SIG_STAT_ERROR; - @} - - case GPGME_ATTR_SIG_SUMMARY: - return sig->summary; - - default: - break; - @} - return 0; -@end example -@end deftypefun - -@deftypefun {const char *} gpgme_get_sig_key (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_key_t *@var{r_key}}) -The function @code{gpgme_get_sig_key} is equivalent to: - -@example - gpgme_verify_result_t result; - gpgme_signature_t sig; - - result = gpgme_op_verify_result (ctx); - sig = result->signatures; - - while (sig && idx) - @{ - sig = sig->next; - idx--; - @} - if (!sig || idx) - return gpg_error (GPG_ERR_EOF); - - return gpgme_get_key (ctx, sig->fpr, r_key, 0); -@end example -@end deftypefun - - -@node Decrypt and Verify -@subsection Decrypt and Verify -@cindex decryption and verification -@cindex verification and decryption -@cindex signature check -@cindex cryptographic operation, decryption and verification - -@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) -The function @code{gpgme_op_decrypt_verify} decrypts the ciphertext in -the data object @var{cipher} and stores it into the data object -@var{plain}. If @var{cipher} contains signatures, they will be -verified. - -After the operation completed, @code{gpgme_op_decrypt_result} and -@code{gpgme_op_verify_result} can be used to retrieve more information -about the signatures. - -If the error code @code{GPG_ERR_NO_DATA} is returned, @var{cipher} -does not contain any data to decrypt. However, it might still be -signed. The information about detected signatures is available with -@code{gpgme_op_verify_result} in this case. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -ciphertext could be decrypted successfully, @code{GPG_ERR_INV_VALUE} -if @var{ctx}, @var{cipher} or @var{plain} is not a valid pointer, -@code{GPG_ERR_NO_DATA} if @var{cipher} does not contain any data to -decrypt, @code{GPG_ERR_DECRYPT_FAILED} if @var{cipher} is not a valid -cipher text, @code{GPG_ERR_BAD_PASSPHRASE} if the passphrase for the -secret key could not be retrieved, and passes through any errors that -are reported by the crypto engine support routines. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_op_decrypt_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}}) -The function @code{gpgme_op_decrypt_verify_start} initiates a -@code{gpgme_op_decrypt_verify} operation. It can be completed by -calling @code{gpgme_wait} on the context. @xref{Waiting For -Completion}. - -The function returns the error code @code{GPG_ERR_NO_ERROR} if the -operation could be started successfully, @code{GPG_ERR_INV_VALUE} if -@var{ctx}, @var{cipher}, @var{plain} or @var{r_stat} is not a valid -pointer, and @code{GPG_ERR_NO_DATA} if @var{cipher} does not contain -any data to decrypt. -@end deftypefun - - -@node Sign -@subsection Sign -@cindex signature, creation -@cindex sign -@cindex cryptographic operation, signing - -A signature can contain signatures by one or more keys. The set of -keys used to create a signatures is contained in a context, and is -applied to all following signing operations in this context (until the -set is changed). - -@menu -* Selecting Signers:: How to choose the keys to sign with. -* Creating a Signature:: How to create a signature. -* Signature Notation Data:: How to add notation data to a signature. -@end menu - - -@node Selecting Signers -@subsubsection Selecting Signers -@cindex signature, selecting signers -@cindex signers, selecting - -@deftypefun void gpgme_signers_clear (@w{gpgme_ctx_t @var{ctx}}) -The function @code{gpgme_signers_clear} releases a reference for each -key on the signers list and removes the list of signers from the -context @var{ctx}. - -Every context starts with an empty list. -@end deftypefun - -@deftypefun gpgme_error_t gpgme_signers_add (@w{gpgme_ctx_t @var{ctx}}, @w{const gpgme_key_t @var{key}}) -The function @code{gpgme_signers_add} adds the key @var{key} to the -list of signers in the context @var{ctx}. - -Calling this function acquires an additional reference for the key. -@end deftypefun +Calling this function acquires an additional reference for the key. +@end deftypefun @deftypefun @w{unsigned int} gpgme_signers_count (@w{const gpgme_ctx_t @var{ctx}}) The function @code{gpgme_signers_count} returns the number of signer keys in @@ -5271,6 +5478,12 @@ @code{GPGME_ENCRYPT_EXPECT_SIGN} symbol the UI Server is advised to also expect a sign command. +@item GPGME_ENCRYPT_SYMMETRIC +The @code{GPGME_ENCRYPT_SYMMETRIC} symbol specifies that the +output should be additionally encrypted symmetically even +if recipients are provided. This feature is only supported for +for the OpenPGP crypto engine. + @end table If @code{GPG_ERR_UNUSABLE_PUBKEY} is returned, some recipients in @@ -5369,6 +5582,8 @@ @menu * Running other Programs:: Running other Programs +* Using the Assuan protocol:: Using the Assuan protocol +* Checking for updates:: How to check for software updates @end menu @@ -5383,7 +5598,7 @@ with the GPGME API. -@deftypefun gpgme_error_t gpgme_op_spawn +@deftypefun gpgme_error_t gpgme_op_spawn @ (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{file}}, @ @w{const char *@var{argv}[]}, @w{gpgme_data_t @var{datain}}, @ @w{gpgme_data_t @var{dataout}}, @w{gpgme_data_t @var{dataerr}}, @ @@ -5413,7 +5628,7 @@ @end table @end deftypefun -@deftypefun gpgme_error_t gpgme_op_spawn_start +@deftypefun gpgme_error_t gpgme_op_spawn_start @ (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{file}}, @ @w{const char *@var{argv}[]}, @w{gpgme_data_t @var{datain}}, @ @w{gpgme_data_t @var{dataout}}, @w{gpgme_data_t @var{dataerr}}, @ @@ -5423,50 +5638,263 @@ @end deftypefun -@node Run Control -@section Run Control -@cindex run control -@cindex cryptographic operation, running +@node Using the Assuan protocol +@subsection Using the Assuan protocol -@acronym{GPGME} supports running operations synchronously and -asynchronously. You can use asynchronous operation to set up a -context up to initiating the desired operation, but delay performing -it to a later point. +The Assuan protocol can be used to talk to arbitrary Assuan servers. +By default it is connected to the GnuPG agent, but it may be connected +to arbitrary servers by using @code{gpgme_ctx_set_engine_info}, +passing the location of the servers socket as @var{file_name} +argument, and an empty string as @var{home_dir} argument. -Furthermore, you can use an external event loop to control exactly -when @acronym{GPGME} runs. This ensures that @acronym{GPGME} only -runs when necessary and also prevents it from blocking for a long -time. +The Assuan protocol functions use three kinds of callbacks to transfer +data: -@menu -* Waiting For Completion:: Waiting until an operation is completed. -* Using External Event Loops:: Advanced control over what happens when. -* Cancellation:: How to end pending operations prematurely. -@end menu +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_data_cb_t) @ + (@w{void *@var{opaque}}, @w{const void *@var{data}}, @ + @w{size_t @var{datalen}})} +This callback receives any data sent by the server. @var{opaque} is +the pointer passed to @code{gpgme_op_assuan_transact_start}, +@var{data} of length @var{datalen} refers to the data sent. +@end deftp -@node Waiting For Completion -@subsection Waiting For Completion -@cindex cryptographic operation, wait for -@cindex wait for completion +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_inquire_cb_t) @ + (@w{void *@var{opaque}}, @w{const char *@var{name}}, @ + @w{const char *@var{args}}, @w{gpgme_data_t *@var{r_data}})} -@deftypefun gpgme_ctx_t gpgme_wait (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_error_t *@var{status}}, @w{int @var{hang}}) -The function @code{gpgme_wait} continues the pending operation within -the context @var{ctx}. In particular, it ensures the data exchange -between @acronym{GPGME} and the crypto backend and watches over the -run time status of the backend process. +This callback is used to provide additional data to the Assuan server. +@var{opaque} is the pointer passed to +@code{gpgme_op_assuan_transact_start}, @var{name} and @var{args} +specify what kind of data the server requested, and @var{r_data} is +used to return the actual data. -If @var{hang} is true, the function does not return until the -operation is completed or cancelled. Otherwise the function will not -block for a long time. +Note: Returning data is currently not implemented in @acronym{GPGME}. +@end deftp -The error status of the finished operation is returned in @var{status} -if @code{gpgme_wait} does not return @code{NULL}. +@deftp {Data type} {gpgme_error_t (*gpgme_assuan_status_cb_t) @ + (@w{void *@var{opaque}}, @w{const char *@var{status}}, @ + @w{const char *@var{args}})} -The @var{ctx} argument can be @code{NULL}. In that case, -@code{gpgme_wait} waits for any context to complete its operation. +This callback receives any status lines sent by the server. +@var{opaque} is the pointer passed to +@code{gpgme_op_assuan_transact_start}, @var{status} and @var{args} +denote the status update sent. +@end deftp -@code{gpgme_wait} can be used only in conjunction with any context +@deftypefun gpgme_error_t gpgme_op_assuan_transact_start @ + (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{command}}, @ + @w{gpgme_assuan_data_cb_t @var{data_cb}}, @ + @w{void * @var{data_cb_value}}, @ + @w{gpgme_assuan_inquire_cb_t @var{inquire_cb}}, @ + @w{void * @var{inquire_cb_value}}, @ + @w{gpgme_assuan_status_cb_t @var{status_cb}}, @ + @w{void * @var{status_cb_value}}) + +Send the Assuan @var{command} and return results via the callbacks. +Any callback may be @code{NULL}. The result of the operation may be +retrieved using @code{gpgme_wait_ext}. + +Asynchronous variant. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_assuan_transact_ext @ + (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{command}}, @ + @w{gpgme_assuan_data_cb_t @var{data_cb}}, @ + @w{void * @var{data_cb_value}}, @ + @w{gpgme_assuan_inquire_cb_t @var{inquire_cb}}, @ + @w{void * @var{inquire_cb_value}}, @ + @w{gpgme_assuan_status_cb_t @var{status_cb}}, @ + @w{void * @var{status_cb_value}}, @ + @w{gpgme_error_t *@var{op_err}}) + +Send the Assuan @var{command} and return results via the callbacks. +The result of the operation is returned in @var{op_err}. + +Synchronous variant. +@end deftypefun + + +@node Checking for updates +@subsection How to check for software updates + +The GnuPG Project operates a server to query the current versions of +software packages related to GnuPG. GPGME can be used to +access this online database and check whether a new version of a +software package is available. + +@deftp {Data type} {gpgme_query_swdb_result_t} +This is a pointer to a structure used to store the result of a +@code{gpgme_op_query_swdb} operation. After success full call to that +function, you can retrieve the pointer to the result with +@code{gpgme_op_query_swdb_result}. The structure contains the +following member: + +@table @code +@item name +This is the name of the package. + +@item iversion +The currently installed version or an empty string. This value is +either a copy of the argument given to @code{gpgme_op_query_swdb} or +the version of the installed software as figured out by GPGME or GnuPG. + +@item created +This gives the date the file with the list of version numbers has +originally be created by the GnuPG project. + +@item retrieved +This gives the date the file was downloaded. + +@item warning +If this flag is set either an error has occurred or some of the +information in this structure are not properly set. For example if +the version number of the installed software could not be figured out, +the @code{update} flag may not reflect a required update status. + +@item update +If this flag is set an update of the software is available. + +@item urgent +If this flag is set an available update is important. + +@item noinfo +If this flag is set, no valid information could be retrieved. + +@item unknown +If this flag is set the given @code{name} is not known. + +@item tooold +If this flag is set the available information is not fresh enough. + +@item error +If this flag is set some other error has occured. + +@item version +The version string of the latest released version. + +@item reldate +The release date of the latest released version. + +@end table +@end deftp + +@deftypefun gpgme_error_t gpgme_op_query_swdb @ + (@w{gpgme_ctx_t @var{ctx}}, @ + @w{const char *@var{name}}, @ + @w{const char *@var{iversion}}, @ + @w{gpgme_data_t @var{reserved}}) + +Query the software version database for software package @var{name} +and check against the installed version given by @var{iversion}. If +@var{iversion} is given as @code{NULL} a check is only done if GPGME +can figure out the version by itself (for example when using +"gpgme" or "gnupg"). If @code{NULL} is used for @var{name} the +current gpgme version is checked. @var{reserved} must be set to 0. + +@end deftypefun + +@deftypefun gpgme_query_swdb_result_t gpgme_op_query_swdb_result @ + (@w{gpgme_ctx_t @var{ctx}}) + +The function @code{gpgme_op_query_swdb_result} returns a +@code{gpgme_query_swdb_result_t} pointer to a structure holding the +result of a @code{gpgme_op_query_swdb} operation. The pointer is only +valid if the last operation on the context was a sucessful call to +@code{gpgme_op_query_swdb}. If that call failed, the result might +be a @code{NULL} pointer. The returned pointer is only valid until +the next operation is started on the context @var{ctx}. +@end deftypefun + +@noindent +Here is an example on how to check whether GnuPG is current: + +@example +#include + +int +main (void) +@{ + gpg_error_t err; + gpgme_ctx_t ctx; + gpgme_query_swdb_result_t result; + + gpgme_check_version (NULL); + err = gpgme_new (&ctx); + if (err) + fprintf (stderr, "error creating context: %s\n", gpg_strerror (err)); + else + @{ + gpgme_set_protocol (ctx, GPGME_PROTOCOL_GPGCONF); + + err = gpgme_op_query_swdb (ctx, "gnupg", NULL, 0); + if (err) + fprintf (stderr, "error querying swdb: %s\n", gpg_strerror (err)); + else + @{ + result = gpgme_op_query_swdb_result (ctx); + if (!result) + fprintf (stderr, "error querying swdb\n"); + if (!result->warning && !result->update) + printf ("GnuPG version %s is current\n", + result->iversion); + else if (!result->warning && result->update) + printf ("GnuPG version %s can be updated to %s\n", + result->iversion, result->version); + else + fprintf (stderr, "error finding the update status\n"); + @} + gpgme_release (ctx); + @} + return 0; +@} +@end example + + +@node Run Control +@section Run Control +@cindex run control +@cindex cryptographic operation, running + +@acronym{GPGME} supports running operations synchronously and +asynchronously. You can use asynchronous operation to set up a +context up to initiating the desired operation, but delay performing +it to a later point. + +Furthermore, you can use an external event loop to control exactly +when @acronym{GPGME} runs. This ensures that @acronym{GPGME} only +runs when necessary and also prevents it from blocking for a long +time. + +@menu +* Waiting For Completion:: Waiting until an operation is completed. +* Using External Event Loops:: Advanced control over what happens when. +* Cancellation:: How to end pending operations prematurely. +@end menu + + +@node Waiting For Completion +@subsection Waiting For Completion +@cindex cryptographic operation, wait for +@cindex wait for completion + +@deftypefun gpgme_ctx_t gpgme_wait (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_error_t *@var{status}}, @w{int @var{hang}}) +The function @code{gpgme_wait} continues the pending operation within +the context @var{ctx}. In particular, it ensures the data exchange +between @acronym{GPGME} and the crypto backend and watches over the +run time status of the backend process. + +If @var{hang} is true, the function does not return until the +operation is completed or cancelled. Otherwise the function will not +block for a long time. + +The error status of the finished operation is returned in @var{status} +if @code{gpgme_wait} does not return @code{NULL}. + +The @var{ctx} argument can be @code{NULL}. In that case, +@code{gpgme_wait} waits for any context to complete its operation. + +@code{gpgme_wait} can be used only in conjunction with any context that has a pending operation initiated with one of the @code{gpgme_op_*_start} functions except @code{gpgme_op_keylist_start} and @code{gpgme_op_trustlist_start} (for which you should use the @@ -5807,6 +6235,7 @@ fd_set wfds; int i, n; int any = 0; + struct timeval tv; struct one_fd *fdlist = loop->fds; pthread_mutex_lock (&loop->lock); @@ -5815,11 +6244,14 @@ for (i = 0; i < MAX_FDS; i++) if (fdlist[i].fd != -1) FD_SET (fdlist[i].fd, fdlist[i].dir ? &rfds : &wfds); - pthread_mutex_unlock (&loop->unlock); + pthread_mutex_unlock (&loop->lock); + + tv.tv_sec = 0; + tv.tv_usec = 1000; do @{ - n = select (FD_SETSIZE, &rfds, &wfds, NULL, 0); + n = select (FD_SETSIZE, &rfds, &wfds, NULL, &tv); @} while (n < 0 && errno == EINTR); @@ -5873,6 +6305,7 @@ gpgme_error_t err; gpgme_data_t sig, text; int i; + pthread_mutexattr_t attr; struct gpgme_io_cbs io_cbs = @{ add_io_cb, @@ -5882,12 +6315,19 @@ &result @}; - init_gpgme (void); + init_gpgme (); /* Initialize the loop structure. */ - pthread_mutex_init (&loop.lock, NULL); + + /* The mutex must be recursive, since remove_io_cb (which acquires a + lock) can be called while holding a lock acquired in do_select. */ + pthread_mutexattr_init (&attr); + pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init (&loop.lock, &attr); + pthread_mutexattr_destroy (&attr); + for (i = 0; i < MAX_FDS; i++) - loop->fds[i].fd = -1; + loop.fds[i].fd = -1; /* Initialize the result structure. */ result.done = 0; @@ -6124,16 +6564,16 @@ global event loop or your own event loop. If you use the global event loop, you must not call @code{gpgme_wait} -or @code{gpgme_wait} during cancellation. After successful +during cancellation. After successful cancellation, you can call @code{gpgme_wait} (optionally waiting on @var{ctx}), and the context @var{ctx} will appear as if it had finished with the error code @code{GPG_ERR_CANCEL}. -If you use your an external event loop, you must ensure that no I/O +If you use an external event loop, you must ensure that no I/O callbacks are invoked for this context (for example by halting the event loop). On successful cancellation, all registered I/O callbacks for this context will be unregistered, and a @code{GPGME_EVENT_DONE} -event with the error code @code{GPG_ERR_CANCEL} will be signaled. +event with the error code @code{GPG_ERR_CANCEL} will be signalled. The function returns an error code if the cancellation failed (in this case the state of @var{ctx} is not modified). @@ -6141,7 +6581,7 @@ @deftypefun gpgme_ctx_t gpgme_cancel_async (@w{gpgme_ctx_t @var{ctx}}) -The function @code{gpgme_cancel} attempts to cancel a pending +The function @code{gpgme_cancel_async} attempts to cancel a pending operation in the context @var{ctx}. This can be called by any thread at any time after starting an operation on the context, but will not take effect immediately. The actual cancellation happens at the next @@ -6198,6 +6638,682 @@ you run your tests only with play data. +@node Deprecated Functions +@appendix Deprecated Functions +@cindex deprecated + +For backward compatibility @acronym{GPGME} has a number of functions, +data types and constants which are deprecated and should not be used +anymore. We document here those which are really old to help +understanding old code and to allow migration to their modern +counterparts. + +@strong{Warning:} These interfaces will be removed in a future version +of @acronym{GPGME}. + +@deftypefun void gpgme_key_release (@w{gpgme_key_t @var{key}}) +The function @code{gpgme_key_release} is equivalent to +@code{gpgme_key_unref}. +@end deftypefun + +@deftypefun void gpgme_trust_item_release (@w{gpgme_trust_item_t @var{item}}) +The function @code{gpgme_trust_item_release} is an alias for +@code{gpgme_trust_item_unref}. +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_import_ext (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{keydata}}, @w{int *@var{nr}}) +The function @code{gpgme_op_import_ext} is equivalent to: + +@example + gpgme_error_t err = gpgme_op_import (ctx, keydata); + if (!err) + @{ + gpgme_import_result_t result = gpgme_op_import_result (ctx); + *nr = result->considered; + @} +@end example +@end deftypefun + + +@deftp {Data type} {gpgme_error_t (*gpgme_edit_cb_t) @ + (@w{void *@var{handle}}, @ + @w{gpgme_status_code_t @var{status}}, @ + @w{const char *@var{args}}, @ + @w{int @var{fd}})} +@tindex gpgme_edit_cb_t +The @code{gpgme_edit_cb_t} type is the type of functions which +@acronym{GPGME} calls if it a key edit operation is on-going. The +status code @var{status} and the argument line @var{args} are passed +through by @acronym{GPGME} from the crypto engine. The file +descriptor @var{fd} is -1 for normal status messages. If @var{status} +indicates a command rather than a status message, the response to the +command should be written to @var{fd}. The @var{handle} is provided +by the user at start of operation. + +The function should return @code{GPG_ERR_FALSE} if it did not handle +the status code, @code{0} for success, or any other error value. +@end deftp + +@deftypefun gpgme_error_t gpgme_op_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use +@code{gpgme_op_interact} instead. + +The function @code{gpgme_op_edit} processes the key @var{KEY} +interactively, using the edit callback function @var{FNC} with the +handle @var{HANDLE}. The callback is invoked for every status and +command request from the crypto engine. The output of the crypto +engine is written to the data object @var{out}. + +Note that the protocol between the callback function and the crypto +engine is specific to the crypto engine and no further support in +implementing this protocol correctly is provided by @acronym{GPGME}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +edit operation completes successfully, @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer, and any error returned +by the crypto engine or the edit callback handler. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use +@code{gpgme_op_interact_start} instead. + +The function @code{gpgme_op_edit_start} initiates a +@code{gpgme_op_edit} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation was started successfully, and @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer. +@end deftypefun + + +@deftypefun gpgme_error_t gpgme_op_card_edit (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use @code{gpgme_op_interact} +with the flag @code{GPGME_INTERACT_CARD} instead. + +The function @code{gpgme_op_card_edit} is analogous to +@code{gpgme_op_edit}, but should be used to process the smart card corresponding to the key @var{key}. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_op_card_edit_start (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{key}}, @w{gpgme_edit_cb_t @var{fnc}}, @w{void *@var{handle}}, @w{gpgme_data_t @var{out}}) +Note: This function is deprecated, please use @code{gpgme_op_interact_start} +with the flag @code{GPGME_INTERACT_CARD} instead. + +The function @code{gpgme_op_card_edit_start} initiates a +@code{gpgme_op_card_edit} operation. It can be completed by calling +@code{gpgme_wait} on the context. @xref{Waiting For Completion}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +operation was started successfully, and @code{GPG_ERR_INV_VALUE} if +@var{ctx} or @var{key} is not a valid pointer. +@end deftypefun + + + +@deftypefun gpgme_error_t gpgme_data_new_with_read_cb (@w{gpgme_data_t *@var{dh}}, @w{int (*@var{readfunc})} (@w{void *@var{hook}}, @w{char *@var{buffer}}, @w{size_t @var{count}}, @w{size_t *@var{nread}}), @w{void *@var{hook_value}}) +The function @code{gpgme_data_new_with_read_cb} creates a new +@code{gpgme_data_t} object and uses the callback function @var{readfunc} +to retrieve the data on demand. As the callback function can supply +the data in any way it wants, this is the most flexible data type +@acronym{GPGME} provides. However, it can not be used to write data. + +The callback function receives @var{hook_value} as its first argument +whenever it is invoked. It should return up to @var{count} bytes in +@var{buffer}, and return the number of bytes actually read in +@var{nread}. It may return @code{0} in @var{nread} if no data is +currently available. To indicate @code{EOF} the function should +return with an error code of @code{-1} and set @var{nread} to +@code{0}. The callback function may support to reset its internal +read pointer if it is invoked with @var{buffer} and @var{nread} being +@code{NULL} and @var{count} being @code{0}. + +The function returns the error code @code{GPG_ERR_NO_ERROR} if the +data object was successfully created, @code{GPG_ERR_INV_VALUE} if +@var{dh} or @var{readfunc} is not a valid pointer, and +@code{GPG_ERR_ENOMEM} if not enough memory is available. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_data_rewind (@w{gpgme_data_t @var{dh}}) +The function @code{gpgme_data_rewind} is equivalent to: + +@example + return (gpgme_data_seek (dh, 0, SEEK_SET) == -1) + ? gpgme_error_from_errno (errno) : 0; +@end example +@end deftypefun + + +@deftp {Data type} gpgme_attr_t +The @code{gpgme_attr_t} type is used to specify a key or trust item +attribute. The following attributes are defined: + +@table @code +@item GPGME_ATTR_KEYID +This is the key ID of a sub key. It is representable as a string. + +For trust items, the trust item refers to the key with this ID. + +@item GPGME_ATTR_FPR +This is the fingerprint of a sub key. It is representable as a +string. + +@item GPGME_ATTR_ALGO +This is the crypto algorithm for which the sub key can be used. It +is representable as a string and as a number. The numbers correspond +to the @code{enum gcry_pk_algos} values in the gcrypt library. + +@item GPGME_ATTR_LEN +This is the key length of a sub key. It is representable as a +number. + +@item GPGME_ATTR_CREATED +This is the timestamp at creation time of a sub key. It is +representable as a number. + +@item GPGME_ATTR_EXPIRE +This is the expiration time of a sub key. It is representable as a +number. + +@item GPGME_ATTR_OTRUST +XXX FIXME (also for trust items) + +@item GPGME_ATTR_USERID +This is a user ID. There can be more than one user IDs in a +@var{gpgme_key_t} object. The first one (with index 0) is the primary +user ID. The user ID is representable as a number. + +For trust items, this is the user ID associated with this trust item. + +@item GPGME_ATTR_NAME +This is the name belonging to a user ID. It is representable as a string. + +@item GPGME_ATTR_EMAIL +This is the email address belonging to a user ID. It is representable +as a string. + +@item GPGME_ATTR_COMMENT +This is the comment belonging to a user ID. It is representable as a +string. + +@item GPGME_ATTR_VALIDITY +This is the validity belonging to a user ID. It is representable as a +string and as a number. See below for a list of available validities. + +For trust items, this is the validity that is associated with this +trust item. + +@item GPGME_ATTR_UID_REVOKED +This specifies if a user ID is revoked. It is representable as a +number, and is @code{1} if the user ID is revoked, and @code{0} +otherwise. + +@item GPGME_ATTR_UID_INVALID +This specifies if a user ID is invalid. It is representable as a +number, and is @code{1} if the user ID is invalid, and @code{0} +otherwise. + +@item GPGME_ATTR_LEVEL +This is the trust level of a trust item. + +@item GPGME_ATTR_TYPE +This returns information about the type of key. For the string function +this will eother be "PGP" or "X.509". The integer function returns 0 +for PGP and 1 for X.509. It is also used for the type of a trust item. + +@item GPGME_ATTR_IS_SECRET +This specifies if the key is a secret key. It is representable as a +number, and is @code{1} if the key is revoked, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_REVOKED +This specifies if a sub key is revoked. It is representable as a +number, and is @code{1} if the key is revoked, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_INVALID +This specifies if a sub key is invalid. It is representable as a +number, and is @code{1} if the key is invalid, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_EXPIRED +This specifies if a sub key is expired. It is representable as a +number, and is @code{1} if the key is expired, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_DISABLED +This specifies if a sub key is disabled. It is representable as a +number, and is @code{1} if the key is disabled, and @code{0} otherwise. + +@item GPGME_ATTR_KEY_CAPS +This is a description of the capabilities of a sub key. It is +representable as a string. The string contains the letter ``e'' if +the key can be used for encryption, ``s'' if the key can be used for +signatures, and ``c'' if the key can be used for certifications. + +@item GPGME_ATTR_CAN_ENCRYPT +This specifies if a sub key can be used for encryption. It is +representable as a number, and is @code{1} if the sub key can be used +for encryption, and @code{0} otherwise. + +@item GPGME_ATTR_CAN_SIGN +This specifies if a sub key can be used to create data signatures. It +is representable as a number, and is @code{1} if the sub key can be +used for signatures, and @code{0} otherwise. + +@item GPGME_ATTR_CAN_CERTIFY +This specifies if a sub key can be used to create key certificates. +It is representable as a number, and is @code{1} if the sub key can be +used for certifications, and @code{0} otherwise. + +@item GPGME_ATTR_SERIAL +The X.509 issuer serial attribute of the key. It is representable as +a string. + +@item GPGME_ATTR_ISSUE +The X.509 issuer name attribute of the key. It is representable as a +string. + +@item GPGME_ATTR_CHAINID +The X.509 chain ID can be used to build the certification chain. It +is representable as a string. +@end table +@end deftp + +@deftypefun {const char *} gpgme_key_get_string_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_get_string_attr} returns the value of the +string-representable attribute @var{what} of key @var{key}. If the +attribute is an attribute of a sub key or an user ID, @var{idx} +specifies the sub key or user ID of which the attribute value is +returned. The argument @var{reserved} is reserved for later use and +should be @code{NULL}. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun {unsigned long} gpgme_key_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_get_ulong_attr} returns the value of the +number-representable attribute @var{what} of key @var{key}. If the +attribute is an attribute of a sub key or an user ID, @var{idx} +specifies the sub key or user ID of which the attribute value is +returned. The argument @var{reserved} is reserved for later use and +should be @code{NULL}. + +The function returns @code{0} if the attribute can't be returned as a +number, @var{key} is not a valid pointer, @var{idx} out of range, or +@var{reserved} not @code{NULL}. +@end deftypefun + + +@c +@c Key Signatures +@c +The signatures on a key are only available if the key was retrieved +via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode +enabled, because it is expensive to retrieve all signatures of a key. + +So, before using the below interfaces to retrieve the signatures on a +key, you have to make sure that the key was listed with signatures +enabled. One convenient, but blocking, way to do this is to use the +function @code{gpgme_get_key}. + +@deftp {Data type} gpgme_attr_t +The @code{gpgme_attr_t} type is used to specify a key signature +attribute. The following attributes are defined: + +@table @code +@item GPGME_ATTR_KEYID +This is the key ID of the key which was used for the signature. It is +representable as a string. + +@item GPGME_ATTR_ALGO +This is the crypto algorithm used to create the signature. It is +representable as a string and as a number. The numbers correspond to +the @code{enum gcry_pk_algos} values in the gcrypt library. + +@item GPGME_ATTR_CREATED +This is the timestamp at creation time of the signature. It is +representable as a number. + +@item GPGME_ATTR_EXPIRE +This is the expiration time of the signature. It is representable as +a number. + +@item GPGME_ATTR_USERID +This is the user ID associated with the signing key. The user ID is +representable as a number. + +@item GPGME_ATTR_NAME +This is the name belonging to a user ID. It is representable as a string. + +@item GPGME_ATTR_EMAIL +This is the email address belonging to a user ID. It is representable +as a string. + +@item GPGME_ATTR_COMMENT +This is the comment belonging to a user ID. It is representable as a +string. + +@item GPGME_ATTR_KEY_REVOKED +This specifies if a key signature is a revocation signature. It is +representable as a number, and is @code{1} if the key is revoked, and +@code{0} otherwise. + +@c @item GPGME_ATTR_KEY_EXPIRED +@c This specifies if a key signature is expired. It is representable as +@c a number, and is @code{1} if the key is revoked, and @code{0} +@c otherwise. +@c +@item GPGME_ATTR_SIG_CLASS +This specifies the signature class of a key signature. It is +representable as a number. The meaning is specific to the crypto +engine. + +@item GPGME_ATTR_SIG_CLASS +This specifies the signature class of a key signature. It is +representable as a number. The meaning is specific to the crypto +engine. + +@item GPGME_ATTR_SIG_STATUS +This is the same value as returned by @code{gpgme_get_sig_status}. +@end table +@end deftp + +@deftypefun {const char *} gpgme_key_sig_get_string_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_sig_get_string_attr} returns the value of +the string-representable attribute @var{what} of the signature +@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The +argument @var{reserved} is reserved for later use and should be +@code{NULL}. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} +out of range, or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun {unsigned long} gpgme_key_sig_get_ulong_attr (@w{gpgme_key_t @var{key}}, @w{int @var{uid_idx}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_key_sig_get_ulong_attr} returns the value of +the number-representable attribute @var{what} of the signature +@var{idx} on the user ID @var{uid_idx} in the key @var{key}. The +argument @var{reserved} is reserved for later use and should be +@code{NULL}. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{uid_idx} or @var{idx} +out of range, or @var{reserved} not @code{NULL}. +@end deftypefun + + +@c node Information About Trust Items +@c subsection Information About Trust Items +@c cindex trust item, information about +@c cindex trust item, attributes +@c cindex attributes, of a trust item + +Trust items have attributes which can be queried using the interfaces +below. The attribute identifiers are shared with those for key +attributes. @xref{Information About Keys}. + +@deftypefun {const char *} gpgme_trust_item_get_string_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_trust_item_get_string_attr} returns the value +of the string-representable attribute @var{what} of trust item +@var{item}. The arguments @var{idx} and @var{reserved} are reserved +for later use and should be @code{0} and @code{NULL} respectively. + +The string returned is only valid as long as the key is valid. + +The function returns @code{0} if an attribute can't be returned as a +string, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + +@deftypefun int gpgme_trust_item_get_int_attr (@w{gpgme_trust_item_t @var{item}}, @w{gpgme_attr_t @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}}) +The function @code{gpgme_trust_item_get_int_attr} returns the value of +the number-representable attribute @var{what} of trust item +@var{item}. If the attribute occurs more than once in the trust item, +the index is specified by @var{idx}. However, currently no such +attribute exists, so @var{idx} should be @code{0}. The argument +@var{reserved} is reserved for later use and should be @code{NULL}. + +The function returns @code{0} if the attribute can't be returned as a +number, @var{key} is not a valid pointer, @var{idx} out of range, +or @var{reserved} not @code{NULL}. +@end deftypefun + + +@deftp {Data type} {enum gpgme_sig_stat_t} +@tindex gpgme_sig_stat_t +The @code{gpgme_sig_stat_t} type holds the result of a signature check, or +the combined result of all signatures. The following results are +possible: + +@table @code +@item GPGME_SIG_STAT_NONE +This status should not occur in normal operation. + +@item GPGME_SIG_STAT_GOOD +This status indicates that the signature is valid. For the combined +result this status means that all signatures are valid. + +@item GPGME_SIG_STAT_GOOD_EXP +This status indicates that the signature is valid but expired. For +the combined result this status means that all signatures are valid +and expired. + +@item GPGME_SIG_STAT_GOOD_EXPKEY +This status indicates that the signature is valid but the key used to +verify the signature has expired. For the combined result this status +means that all signatures are valid and all keys are expired. + +@item GPGME_SIG_STAT_BAD +This status indicates that the signature is invalid. For the combined +result this status means that all signatures are invalid. + +@item GPGME_SIG_STAT_NOKEY +This status indicates that the signature could not be verified due to +a missing key. For the combined result this status means that all +signatures could not be checked due to missing keys. + +@item GPGME_SIG_STAT_NOSIG +This status indicates that the signature data provided was not a real +signature. + +@item GPGME_SIG_STAT_ERROR +This status indicates that there was some other error which prevented +the signature verification. + +@item GPGME_SIG_STAT_DIFF +For the combined result this status means that at least two signatures +have a different status. You can get each key's status with +@code{gpgme_get_sig_status}. +@end table +@end deftp + +@deftypefun {const char *} gpgme_get_sig_status (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_sig_stat_t *@var{r_stat}}, @w{time_t *@var{r_created}}) +The function @code{gpgme_get_sig_status} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return NULL; + + if (r_stat) + @{ + switch (gpg_err_code (sig->status)) + @{ + case GPG_ERR_NO_ERROR: + *r_stat = GPGME_SIG_STAT_GOOD; + break; + + case GPG_ERR_BAD_SIGNATURE: + *r_stat = GPGME_SIG_STAT_BAD; + break; + + case GPG_ERR_NO_PUBKEY: + *r_stat = GPGME_SIG_STAT_NOKEY; + break; + + case GPG_ERR_NO_DATA: + *r_stat = GPGME_SIG_STAT_NOSIG; + break; + + case GPG_ERR_SIG_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXP; + break; + + case GPG_ERR_KEY_EXPIRED: + *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; + break; + + default: + *r_stat = GPGME_SIG_STAT_ERROR; + break; + @} + @} + if (r_created) + *r_created = sig->timestamp; + return sig->fpr; +@end example +@end deftypefun + +@deftypefun {const char *} gpgme_get_sig_string_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{what}}, @w{int @var{whatidx}}) +The function @code{gpgme_get_sig_string_attr} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return NULL; + + switch (what) + @{ + case GPGME_ATTR_FPR: + return sig->fpr; + + case GPGME_ATTR_ERRTOK: + if (whatidx == 1) + return sig->wrong_key_usage ? "Wrong_Key_Usage" : ""; + else + return ""; + default: + break; + @} + + return NULL; +@end example +@end deftypefun + +@deftypefun {const char *} gpgme_get_sig_ulong_attr (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_attr_t @var{waht}}, @w{int @var{whatidx}}) +The function @code{gpgme_get_sig_ulong_attr} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return 0; + + switch (what) + @{ + case GPGME_ATTR_CREATED: + return sig->timestamp; + + case GPGME_ATTR_EXPIRE: + return sig->exp_timestamp; + + case GPGME_ATTR_VALIDITY: + return (unsigned long) sig->validity; + + case GPGME_ATTR_SIG_STATUS: + switch (sig->status) + @{ + case GPG_ERR_NO_ERROR: + return GPGME_SIG_STAT_GOOD; + + case GPG_ERR_BAD_SIGNATURE: + return GPGME_SIG_STAT_BAD; + + case GPG_ERR_NO_PUBKEY: + return GPGME_SIG_STAT_NOKEY; + + case GPG_ERR_NO_DATA: + return GPGME_SIG_STAT_NOSIG; + + case GPG_ERR_SIG_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXP; + + case GPG_ERR_KEY_EXPIRED: + return GPGME_SIG_STAT_GOOD_EXPKEY; + + default: + return GPGME_SIG_STAT_ERROR; + @} + + case GPGME_ATTR_SIG_SUMMARY: + return sig->summary; + + default: + break; + @} + return 0; +@end example +@end deftypefun + +@deftypefun {const char *} gpgme_get_sig_key (@w{gpgme_ctx_t @var{ctx}}, @w{int @var{idx}}, @w{gpgme_key_t *@var{r_key}}) +The function @code{gpgme_get_sig_key} is equivalent to: + +@example + gpgme_verify_result_t result; + gpgme_signature_t sig; + + result = gpgme_op_verify_result (ctx); + sig = result->signatures; + + while (sig && idx) + @{ + sig = sig->next; + idx--; + @} + if (!sig || idx) + return gpg_error (GPG_ERR_EOF); + + return gpgme_get_key (ctx, sig->fpr, r_key, 0); +@end example +@end deftypefun + + + + @include lesser.texi diff -Nru gpgme1.0-1.6.0/doc/gpl.texi gpgme1.0-1.8.0/doc/gpl.texi --- gpgme1.0-1.6.0/doc/gpl.texi 2014-12-15 10:53:19.000000000 +0000 +++ gpgme1.0-1.8.0/doc/gpl.texi 2016-11-16 12:18:38.000000000 +0000 @@ -6,7 +6,7 @@ @c This file is intended to be included in another file. @display -Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} +Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{https://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -696,7 +696,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see @url{http://www.gnu.org/licenses/}. +along with this program. If not, see @url{https://www.gnu.org/licenses/}. @end example @noindent @@ -722,11 +722,11 @@ You should also get your employer (if you work as a programmer) or school, if any, to sign a ``copyright disclaimer'' for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -@url{http://www.gnu.org/licenses/}. +@url{https://www.gnu.org/licenses/}. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But -first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. +first, please read @url{https://www.gnu.org/philosophy/why-not-lgpl.html}. diff -Nru gpgme1.0-1.6.0/doc/Makefile.am gpgme1.0-1.8.0/doc/Makefile.am --- gpgme1.0-1.6.0/doc/Makefile.am 2014-11-21 20:26:41.000000000 +0000 +++ gpgme1.0-1.8.0/doc/Makefile.am 2016-08-10 14:19:02.000000000 +0000 @@ -20,12 +20,38 @@ ## Process this file with automake to produce Makefile.in DISTCLEANFILES = gpgme.tmp +CLEANFILES = mkdefsinc defs.inc + +EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 \ + mkdefsinc.c defsincdate + +BUILT_SOURCES = defsincdate defs.inc -EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 info_TEXINFOS = gpgme.texi gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi +gpgme.texi : defs.inc + +mkdefsinc: mkdefsinc.c Makefile ../config.h + $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ + -o $@ $(srcdir)/mkdefsinc.c + +dist-hook: defsincdate + +defsincdate: $(gpgme_TEXINFOS) + : >defsincdate ; \ + if test -e $(top_srcdir)/.git; then \ + (cd $(srcdir) && git log -1 --format='%ct' -- \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) 2>/dev/null) >>defsincdate; \ + fi + +defs.inc: defsincdate Makefile mkdefsinc + incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \ + ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) >$@ + + online: gpgme.html gpgme.pdf set -e; \ echo "Uploading current manuals to www.gnupg.org ..."; \ diff -Nru gpgme1.0-1.6.0/doc/Makefile.in gpgme1.0-1.8.0/doc/Makefile.in --- gpgme1.0-1.6.0/doc/Makefile.in 2015-08-26 08:06:19.000000000 +0000 +++ gpgme1.0-1.8.0/doc/Makefile.in 2016-11-16 12:46:35.000000000 +0000 @@ -99,16 +99,18 @@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/build-aux/mkinstalldirs $(gpgme_TEXINFOS) \ - $(top_srcdir)/build-aux/mdate-sh $(srcdir)/version.texi \ - $(srcdir)/stamp-vti $(top_srcdir)/build-aux/texinfo.tex \ - mdate-sh texinfo.tex + $(top_srcdir)/build-aux/texinfo.tex mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -220,6 +222,7 @@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -231,12 +234,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -247,15 +252,23 @@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_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@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -266,10 +279,16 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -279,6 +298,8 @@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -295,16 +316,32 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MICRO = @VERSION_MICRO@ +VERSION_MINOR = @VERSION_MINOR@ VERSION_NUMBER = @VERSION_NUMBER@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -351,9 +388,13 @@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -363,10 +404,15 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCLEANFILES = gpgme.tmp -EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 +CLEANFILES = mkdefsinc defs.inc +EXTRA_DIST = module-overview.sk HACKING DCO ChangeLog-2011 \ + mkdefsinc.c defsincdate + +BUILT_SOURCES = defsincdate defs.inc info_TEXINFOS = gpgme.texi gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi @@ -450,29 +496,10 @@ else \ rm -rf $(@:.html=.htp); exit 1; \ fi -$(srcdir)/gpgme.info: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.dvi: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.pdf: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -gpgme.html: gpgme.texi $(srcdir)/version.texi $(gpgme_TEXINFOS) -$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti -$(srcdir)/stamp-vti: gpgme.texi $(top_srcdir)/configure - @(dir=.; test -f ./gpgme.texi || dir=$(srcdir); \ - set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/gpgme.texi`; \ - echo "@set UPDATED $$1 $$2 $$3"; \ - echo "@set UPDATED-MONTH $$2 $$3"; \ - echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > vti.tmp - @cmp -s vti.tmp $(srcdir)/version.texi \ - || (echo "Updating $(srcdir)/version.texi"; \ - cp vti.tmp $(srcdir)/version.texi) - -@rm -f vti.tmp - @cp $(srcdir)/version.texi $@ - -mostlyclean-vti: - -rm -f vti.tmp - -maintainer-clean-vti: -@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +$(srcdir)/gpgme.info: gpgme.texi $(gpgme_TEXINFOS) +gpgme.dvi: gpgme.texi $(gpgme_TEXINFOS) +gpgme.pdf: gpgme.texi $(gpgme_TEXINFOS) +gpgme.html: gpgme.texi $(gpgme_TEXINFOS) .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< @@ -605,15 +632,17 @@ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info + dist-info dist-hook check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -635,6 +664,7 @@ mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -644,6 +674,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am @@ -786,12 +817,12 @@ maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic maintainer-clean-vti + maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool mostlyclean-vti + mostlyclean-libtool pdf: pdf-am @@ -804,25 +835,44 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ - clean-libtool cscopelist-am ctags-am dist-info distclean \ - distclean-generic distclean-libtool distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-aminfo maintainer-clean-generic \ - maintainer-clean-vti mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + clean-libtool cscopelist-am ctags-am dist-hook dist-info \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am +gpgme.texi : defs.inc + +mkdefsinc: mkdefsinc.c Makefile ../config.h + $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ + -o $@ $(srcdir)/mkdefsinc.c + +dist-hook: defsincdate + +defsincdate: $(gpgme_TEXINFOS) + : >defsincdate ; \ + if test -e $(top_srcdir)/.git; then \ + (cd $(srcdir) && git log -1 --format='%ct' -- \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) 2>/dev/null) >>defsincdate; \ + fi + +defs.inc: defsincdate Makefile mkdefsinc + incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \ + ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \ + $(info_TEXINFOS) $(gpgme_TEXINFOS) >$@ + online: gpgme.html gpgme.pdf set -e; \ echo "Uploading current manuals to www.gnupg.org ..."; \ diff -Nru gpgme1.0-1.6.0/doc/mkdefsinc.c gpgme1.0-1.8.0/doc/mkdefsinc.c --- gpgme1.0-1.6.0/doc/mkdefsinc.c 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/doc/mkdefsinc.c 2016-08-10 14:05:00.000000000 +0000 @@ -0,0 +1,310 @@ +/* mkdefsinc.c - Tool to create defs.inc + * Copyright (C) 2015 g10 Code GmbH + * + * This file is free software; as a special exception the author gives + * unlimited permission to copy and/or distribute it, with or without + * modifications, as long as this notice is preserved. + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* This tool needs to be build with command line supplied -D options + for the various directory variables. It is easier to do this in + build file than to use fragile make rules and a template file. */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#define PGM "mkdefsinc" + +/* We include config.h after all include files because the config.h + values are not valid for the build platform but we need some values + nevertheless. */ +#include "config.h" + + +static int verbose; + + +/* The usual free wrapper. */ +static void +xfree (void *a) +{ + if (a) + free (a); +} + + +static char * +xmalloc (size_t n) +{ + char *p; + + p = malloc (n); + if (!p) + { + fputs (PGM ": out of core\n", stderr); + exit (1); + } + return p; +} + + +static char * +xstrdup (const char *string) +{ + char *p; + + p = xmalloc (strlen (string)+1); + strcpy (p, string); + return p; +} + + +/* Return a malloced string with the last modification date of the + FILES. Returns NULL on error. */ +static char * +get_date_from_files (char **files) +{ + const char *file; + const char *usedfile = NULL; + struct stat sb; + struct tm *tp; + int errors = 0; + time_t stamp = 0; + char *result; + + for (; (file = *files); files++) + { + if (!*file || !strcmp (file, ".") || !strcmp (file, "..")) + continue; + if (stat (file, &sb)) + { + fprintf (stderr, PGM ": stat failed for '%s': %s\n", + file, strerror (errno)); + errors = 1; + continue; + } + if (sb.st_mtime > stamp) + { + stamp = sb.st_mtime; + usedfile = file; + } + } + if (errors) + exit (1); + + if (usedfile) + fprintf (stderr, PGM ": taking date from '%s'\n", usedfile); + + tp = gmtime (&stamp); + if (!tp) + return NULL; + result = xmalloc (4+1+2+1+2+1); + snprintf (result, 4+1+2+1+2+1, "%04d-%02d-%02d", + tp->tm_year + 1900, tp->tm_mon+1, tp->tm_mday); + return result; +} + + +/* We need to escape file names for Texinfo. */ +static void +print_filename (const char *prefix, const char *name) +{ + const char *s; + + fputs (prefix, stdout); + for (s=name; *s; s++) + switch (*s) + { + case '@': fputs ("@atchar{}", stdout); break; + case '{': fputs ("@lbracechar{}", stdout); break; + case '}': fputs ("@rbracechar{}", stdout); break; + case ',': fputs ("@comma{}", stdout); break; + case '\\':fputs ("@backslashchar{}", stdout); break; + case '#': fputs ("@hashchar{}", stdout); break; + default: putchar (*s); break; + } + putchar('\n'); +} + + +int +main (int argc, char **argv) +{ + int last_argc = -1; + char *opt_date = NULL; + int monthoff; + char *p, *pend; + size_t n; + + /* Option parsing. */ + if (argc) + { + argc--; argv++; + } + while (argc && last_argc != argc ) + { + last_argc = argc; + if (!strcmp (*argv, "--")) + { + argc--; argv++; + break; + } + else if (!strcmp (*argv, "--help")) + { + fputs ("Usage: " PGM " [OPTION] [FILES]\n" + "Create defs.inc file.\nOptions:\n" + " -C DIR Change to DIR before doing anything\n" + " --date STRING Take publication date from STRING\n" + " --verbose Enable extra informational output\n" + " --help Display this help and exit\n" + , stdout); + exit (0); + } + else if (!strcmp (*argv, "--verbose")) + { + verbose = 1; + argc--; argv++; + } + else if (!strcmp (*argv, "-C")) + { + argc--; argv++; + if (argc) + { + if (chdir (*argv)) + { + fprintf (stderr, PGM ": chdir to '%s' failed: %s\n", + *argv, strerror (errno)); + exit (1); + } + argc--; argv++; + } + } + else if (!strcmp (*argv, "--date")) + { + argc--; argv++; + if (argc) + { + opt_date = xstrdup (*argv); + argc--; argv++; + } + } + else if (!strncmp (*argv, "--", 2)) + { + fprintf (stderr, PGM ": unknown option '%s'\n", *argv); + exit (1); + } + } + + if (opt_date && *opt_date) + { + time_t stamp; + struct tm *tp; + + if (*opt_date == '2' && strlen (opt_date) >= 10 + && opt_date[4] == '-' && opt_date[7] == '-') + { + opt_date[10] = 0; + } + else if ((stamp = strtoul (opt_date, NULL, 10)) > 0 + && (tp = gmtime (&stamp))) + { + p = xmalloc (4+1+2+1+2+1); + snprintf (p, 4+1+2+1+2+1, "%04d-%02d-%02d", + tp->tm_year + 1900, tp->tm_mon+1, tp->tm_mday); + xfree (opt_date); + opt_date = p; + } + else + { + fprintf (stderr, PGM ": bad date '%s'\n", opt_date); + exit (1); + } + } + else + { + xfree (opt_date); + opt_date = argc? get_date_from_files (argv) : NULL; + } + if (!opt_date) + { + opt_date = xstrdup ("unknown"); + monthoff = 0; + } + else + { + const char *month = "?"; + + switch (atoi (opt_date+5)) + { + case 1: month = "January"; break; + case 2: month = "February"; break; + case 3: month = "March"; break; + case 4: month = "April"; break; + case 5: month = "May"; break; + case 6: month = "June"; break; + case 7: month = "July"; break; + case 8: month = "August"; break; + case 9: month = "September"; break; + case 10: month = "October"; break; + case 11: month = "November"; break; + case 12: month = "December"; break; + } + n = strlen (opt_date) + strlen (month) + 2 + 1; + p = xmalloc (n); + snprintf (p, n, "%d %n%s %d", + atoi (opt_date+8), &monthoff, month, atoi (opt_date)); + xfree (opt_date); + opt_date = p; + } + + + fputs ("@c defs.inc -*- texinfo -*-\n" + "@c Common and build specific constants for the manuals.\n" + "@c This file has been created by " PGM ".\n\n", stdout); + + fputs ("@ifclear defsincincluded\n" + "@set defsincincluded 1\n\n", stdout); + + + fputs ("\n@c Flags\n\n", stdout); + + fputs ("\n@c Directories\n\n", stdout); + + /* print_filename ("@set BINDIR ", GNUPG_BINDIR ); */ + + fputs ("\n@c Version information a la version.texi\n\n", stdout); + + printf ("@set UPDATED %s\n", opt_date); + printf ("@set UPDATED-MONTH %s\n", opt_date + monthoff); + printf ("@set EDITION %s\n", PACKAGE_VERSION); + printf ("@set VERSION %s\n", PACKAGE_VERSION); + + fputs ("\n@c Macros\n\n", stdout); + + /* Trailer. */ + fputs ("\n" + "@end ifclear\n" + "\n" + "@c Loc" "al Variables:\n" + "@c buffer-read-only: t\n" + "@c End:\n", stdout); + + if (ferror (stdout)) + { + fprintf (stderr, PGM ": error writing to stdout: %s\n", strerror (errno)); + return 1; + } + + return 0; +} diff -Nru gpgme1.0-1.6.0/doc/stamp-vti gpgme1.0-1.8.0/doc/stamp-vti --- gpgme1.0-1.6.0/doc/stamp-vti 2015-08-26 08:06:53.000000000 +0000 +++ gpgme1.0-1.8.0/doc/stamp-vti 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -@set UPDATED 26 August 2015 -@set UPDATED-MONTH August 2015 -@set EDITION 1.6.0 -@set VERSION 1.6.0 diff -Nru gpgme1.0-1.6.0/doc/texinfo.tex gpgme1.0-1.8.0/doc/texinfo.tex --- gpgme1.0-1.6.0/doc/texinfo.tex 2013-03-15 19:27:33.000000000 +0000 +++ gpgme1.0-1.8.0/doc/texinfo.tex 2016-11-16 12:20:17.000000000 +0000 @@ -20,7 +20,7 @@ % General Public License for more details. % % You should have received a copy of the GNU General Public License -% along with this program. If not, see . +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -28,7 +28,7 @@ % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or +% https://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out @@ -54,7 +54,7 @@ % extent. You can get the existing language-specific files from the % full Texinfo distribution. % -% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. +% The GNU Texinfo home page is https://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} @@ -354,7 +354,7 @@ % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; - % it needs to be + % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. @@ -705,7 +705,7 @@ \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. -% +% \def\onword{on} \def\offword{off} % @@ -1260,7 +1260,7 @@ % that's what we do). % double active backslashes. -% +% {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @@ -1272,11 +1272,11 @@ % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. -% +% % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. -% +% \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% @@ -1542,7 +1542,7 @@ % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. - % + % \normalturnoffactive \def\@{@}% \let\/=\empty @@ -1941,7 +1941,7 @@ % Definitions for a main text size of 11pt. This is the default in % Texinfo. -% +% \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} @@ -2074,7 +2074,7 @@ % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. -% +% \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} @@ -2165,7 +2165,7 @@ \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} -\font\seci=cmmi12 +\font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} @@ -2209,7 +2209,7 @@ % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. -% +% \def\xword{10} \def\xiword{11} % @@ -2219,7 +2219,7 @@ % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. - % + % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -2505,7 +2505,7 @@ % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. -% +% \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} @@ -2636,7 +2636,7 @@ % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. -% +% \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% @@ -2648,7 +2648,7 @@ % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. -% +% \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% @@ -2667,43 +2667,43 @@ % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% +% % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. -% +% % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted -% +% % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. -% +% % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. -% -% +% +% \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. - % + % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. - % + % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. - % + % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % - \ifx\curfontstyle\bfstylename + \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else + \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi @@ -2756,7 +2756,7 @@ % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. -% +% \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi @@ -3105,7 +3105,7 @@ % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. - % + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -3901,7 +3901,7 @@ % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. - % + % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} @@ -3909,12 +3909,12 @@ % @end macro % ... % @funindex commtest - % + % % The above is not enough to reproduce the bug, but it gives the flavor. - % + % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} - % + % % So: \let\endinput = \empty % @@ -4170,11 +4170,11 @@ % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. - % + % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. - % + % \macrolist } @@ -4302,7 +4302,7 @@ % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % + % % @deffn deffn-whatever % @vindex index-whatever % Description. @@ -5368,11 +5368,11 @@ % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip - % + % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: - % + % % @section sec-whatever % @deffn def-whatever \penalty 10001 @@ -5430,7 +5430,7 @@ % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. -% +% \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active @@ -5480,7 +5480,7 @@ % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. -% +% \def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -6035,8 +6035,8 @@ % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the -% regular 0x27. -% +% regular 0x27. +% \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax @@ -6048,7 +6048,7 @@ % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. -% +% \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax @@ -6579,7 +6579,7 @@ % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). -% +% \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname @@ -7737,7 +7737,7 @@ % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. -% +% \def\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 @@ -7793,7 +7793,7 @@ \setnonasciicharscatcode\active \lattwochardefs % - \else \ifx \declaredencoding \latone + \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % @@ -7805,7 +7805,7 @@ \setnonasciicharscatcode\active \utfeightchardefs % - \else + \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight @@ -7817,7 +7817,7 @@ % A message to be logged when using a character that isn't available % the default font encoding (OT1). -% +% \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. @@ -7830,21 +7830,21 @@ % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{~} \gdef^^a1{\exclamdown} - \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} - \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\copyright} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} \gdef^^aa{\ordf} - \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} \gdef^^ac{$\lnot$} - \gdef^^ad{\-} - \gdef^^ae{\registeredsymbol} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} @@ -7871,7 +7871,7 @@ \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} - \gdef^^c5{\ringaccent A} + \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} @@ -8012,7 +8012,7 @@ \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} - \gdef^^d9{\ringaccent U} + \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} @@ -8056,11 +8056,11 @@ } % UTF-8 character definitions. -% +% % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. -% +% \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz @@ -8900,7 +8900,7 @@ % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. -% +% @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote diff -Nru gpgme1.0-1.6.0/doc/uiserver.texi gpgme1.0-1.8.0/doc/uiserver.texi --- gpgme1.0-1.6.0/doc/uiserver.texi 2014-11-19 10:52:18.000000000 +0000 +++ gpgme1.0-1.8.0/doc/uiserver.texi 2016-11-15 09:35:05.000000000 +0000 @@ -158,21 +158,21 @@ @smallexample @group - @clnt RESET - @srvr OK - @clnt RECIPIENT foo@@example.net - @srvr OK - @clnt RECIPIENT bar@@example.com - @srvr OK - @clnt PREP_ENCRYPT - @srvr S PROTOCOL OpenPGP - @srvr OK - @clnt INPUT FD=17 - @srvr OK - @clnt OUTPUT FD=18 - @srvr OK - @clnt ENCRYPT - @srvr OK + @clnt{RESET} + @srvr{OK} + @clnt{RECIPIENT foo@@example.net} + @srvr{OK} + @clnt{RECIPIENT bar@@example.com} + @srvr{OK} + @clnt{PREP_ENCRYPT} + @srvr{S PROTOCOL OpenPGP} + @srvr{OK} + @clnt{INPUT FD=17} + @srvr{OK} + @clnt{OUTPUT FD=18} + @srvr{OK} + @clnt{ENCRYPT} + @srvr{OK} @end group @end smallexample @@ -260,12 +260,14 @@ @noindent The decryption is started with the command: -@deffn Command DECRYPT -@w{}-protocol=@var{name} [-@w{}-no-verify] +@deffn Command DECRYPT -@w{}-protocol=@var{name} [-@w{}-no-verify] [-@w{}-export-session-key] @var{name} is the encryption protocol used for the message. For a description of the allowed protocols see the @code{ENCRYPT} command. -This argument is mandatory. If the option @option{--no-verify} is given, -the server should not try to verify a signature, in case the input data -is an OpenPGP combined message. +This argument is mandatory. If the option @option{--no-verify} is +given, the server should not try to verify a signature, in case the +input data is an OpenPGP combined message. If the option +@option{--export-session-key} is given and the underlying engine knows +how to export the session key, it will appear on a status line @end deffn diff -Nru gpgme1.0-1.6.0/doc/version.texi gpgme1.0-1.8.0/doc/version.texi --- gpgme1.0-1.6.0/doc/version.texi 2015-08-26 08:05:14.000000000 +0000 +++ gpgme1.0-1.8.0/doc/version.texi 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -@set UPDATED 26 August 2015 -@set UPDATED-MONTH August 2015 -@set EDITION 1.6.0 -@set VERSION 1.6.0 diff -Nru gpgme1.0-1.6.0/gpgme.spec gpgme1.0-1.8.0/gpgme.spec --- gpgme1.0-1.6.0/gpgme.spec 2015-08-26 08:06:53.000000000 +0000 +++ gpgme1.0-1.8.0/gpgme.spec 2016-11-16 12:47:28.000000000 +0000 @@ -1,9 +1,9 @@ # This is a template. The dist target uses it to create the real file. Summary: GPGME - GnuPG Made Easy Name: gpgme -Version: 1.6.0 +Version: 1.8.0 Release: 1 -URL: http://www.gnupg.org/gpgme.html +URL: https://gnupg.org/gpgme.html Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz Group: Development/Libraries Copyright: GPL diff -Nru gpgme1.0-1.6.0/gpgme.spec.in gpgme1.0-1.8.0/gpgme.spec.in --- gpgme1.0-1.6.0/gpgme.spec.in 2013-03-15 19:27:33.000000000 +0000 +++ gpgme1.0-1.8.0/gpgme.spec.in 2016-11-16 12:17:36.000000000 +0000 @@ -3,7 +3,7 @@ Name: gpgme Version: @pkg_version@ Release: 1 -URL: http://www.gnupg.org/gpgme.html +URL: https://gnupg.org/gpgme.html Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz Group: Development/Libraries Copyright: GPL diff -Nru gpgme1.0-1.6.0/lang/cl/gpgme.asd gpgme1.0-1.8.0/lang/cl/gpgme.asd --- gpgme1.0-1.6.0/lang/cl/gpgme.asd 2015-08-26 08:06:48.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cl/gpgme.asd 2016-11-16 12:47:17.000000000 +0000 @@ -27,7 +27,7 @@ (defsystem gpgme :description "GnuPG Made Easy." :author "g10 Code GmbH" - :version "1.6.0" + :version "1.8.0" :licence "GPL" :depends-on ("cffi" "gpg-error") :components ((:file "gpgme-package") diff -Nru gpgme1.0-1.6.0/lang/cl/Makefile.in gpgme1.0-1.8.0/lang/cl/Makefile.in --- gpgme1.0-1.6.0/lang/cl/Makefile.in 2015-08-26 08:06:19.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cl/Makefile.in 2016-11-16 12:46:35.000000000 +0000 @@ -103,12 +103,16 @@ $(top_srcdir)/build-aux/mkinstalldirs $(srcdir)/gpgme.asd.in \ $(dist_clfiles_DATA) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/glib-2.0.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnupg-ttyname.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -180,6 +184,7 @@ BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ @@ -191,12 +196,14 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ @@ -207,15 +214,23 @@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_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@ +GRAPHVIZ = @GRAPHVIZ@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -226,10 +241,16 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -239,6 +260,8 @@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -255,16 +278,32 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -QT4_CORE_CFLAGS = @QT4_CORE_CFLAGS@ -QT4_CORE_LIBS = @QT4_CORE_LIBS@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ SYSROOT = @SYSROOT@ VERSION = @VERSION@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MICRO = @VERSION_MICRO@ +VERSION_MINOR = @VERSION_MINOR@ VERSION_NUMBER = @VERSION_NUMBER@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -311,9 +350,13 @@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru gpgme1.0-1.6.0/lang/cpp/Makefile.am gpgme1.0-1.8.0/lang/cpp/Makefile.am --- gpgme1.0-1.6.0/lang/cpp/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/Makefile.am 2016-05-17 12:32:37.000000000 +0000 @@ -0,0 +1,23 @@ +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL 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 General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA + +SUBDIRS = src + +EXTRA_DIST = README diff -Nru gpgme1.0-1.6.0/lang/cpp/Makefile.in gpgme1.0-1.8.0/lang/cpp/Makefile.in --- gpgme1.0-1.6.0/lang/cpp/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/Makefile.in 2016-11-16 12:46:35.000000000 +0000 @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program 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. + +@SET_MAKE@ + +# Makefile.am for GPGMEPP. +# Copyright (C) 2016 Intevation GmbH +# +# This file is part of GPGMEPP. +# +# GPGME-CL is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# GPGME-CL 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 General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = lang/cpp +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/mkinstalldirs README +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4/ax_pkg_swig.m4 \ + $(top_srcdir)/m4/ax_python_devel.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnupg-ttyname.m4 \ + $(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libassuan.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/qt.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLED_LANGUAGES = @ENABLED_LANGUAGES@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GITLOG_TO_CHANGELOG = @GITLOG_TO_CHANGELOG@ +GLIBC21 = @GLIBC21@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GPGME_CONFIG_API_VERSION = @GPGME_CONFIG_API_VERSION@ +GPGME_CONFIG_AVAIL_LANG = @GPGME_CONFIG_AVAIL_LANG@ +GPGME_CONFIG_CFLAGS = @GPGME_CONFIG_CFLAGS@ +GPGME_CONFIG_HOST = @GPGME_CONFIG_HOST@ +GPGME_CONFIG_LIBS = @GPGME_CONFIG_LIBS@ +GPGME_QTTEST_CFLAGS = @GPGME_QTTEST_CFLAGS@ +GPGME_QTTEST_LIBS = @GPGME_QTTEST_LIBS@ +GPGME_QT_CFLAGS = @GPGME_QT_CFLAGS@ +GPGME_QT_LIBS = @GPGME_QT_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@ +GRAPHVIZ = @GRAPHVIZ@ +GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@ +LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@ +LIBASSUAN_LIBS = @LIBASSUAN_LIBS@ +LIBGPGMEPP_LT_AGE = @LIBGPGMEPP_LT_AGE@ +LIBGPGMEPP_LT_CURRENT = @LIBGPGMEPP_LT_CURRENT@ +LIBGPGMEPP_LT_REVISION = @LIBGPGMEPP_LT_REVISION@ +LIBGPGME_LT_AGE = @LIBGPGME_LT_AGE@ +LIBGPGME_LT_CURRENT = @LIBGPGME_LT_CURRENT@ +LIBGPGME_LT_REVISION = @LIBGPGME_LT_REVISION@ +LIBOBJS = @LIBOBJS@ +LIBQGPGME_LT_AGE = @LIBQGPGME_LT_AGE@ +LIBQGPGME_LT_CURRENT = @LIBQGPGME_LT_CURRENT@ +LIBQGPGME_LT_REVISION = @LIBQGPGME_LT_REVISION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MOC = @MOC@ +MOC2 = @MOC2@ +NEED__FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +PYTHONS = @PYTHONS@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_VERSIONS = @PYTHON_VERSIONS@ +QTCHOOSER = @QTCHOOSER@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_LIB = @SWIG_LIB@ +SYSROOT = @SYSROOT@ +VERSION = @VERSION@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MICRO = @VERSION_MICRO@ +VERSION_MINOR = @VERSION_MINOR@ +VERSION_NUMBER = @VERSION_NUMBER@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +emacs_local_vars_begin = @emacs_local_vars_begin@ +emacs_local_vars_end = @emacs_local_vars_end@ +emacs_local_vars_read_only = @emacs_local_vars_read_only@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src +EXTRA_DIST = README +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/cpp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu lang/cpp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gpgme1.0-1.6.0/lang/cpp/README gpgme1.0-1.8.0/lang/cpp/README --- gpgme1.0-1.6.0/lang/cpp/README 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/README 2016-09-20 08:48:12.000000000 +0000 @@ -0,0 +1,101 @@ +GpgMEpp - C++ bindings/wrapper for GPGME +---------------------------------------- +Based on KF5gpgmepp + +Overview +-------- + +GpgMEpp is a C++ wrapper (or C++ bindings) for the GnuPG project's +gpgme (GnuPG Made Easy) library, version 0.4.4 and later. + +It is fairly complete, with some minor things still missing (in +particular, the key edit interface). + +The design principles of this library are as follows: + +1. A value-based interface (most clases are implicitly shared) +2. Callbacks are replaced by C++ interfaces (classes with only + abstract methods). +3. No exceptions are thrown +4. There is (as yet) no explicit support for multi-threaded use + (other than what gpgme itself provides; most notably the + refcounting for implicit sharing is not thread-safe) +5. To avoid binary incompatible interface changes, we make + extensive use of the d-pointer pattern and avoid virtual + methods; any polymorphism present is already provided by gpgme + itself, anyway (see e.g. Data). A notable exception of the + no-virtuals rule is the use of abstract classes to cover + C-callbacks. +6. Use of STL containers for improved memory management and + dealing with lists. +7. Complete abstraction of the C-API so "gpgme.h" should not + be needed in your project using GpgME++. +8. Abstraction of GnuPG's edit-key interface by prepared + Editinteractor classes. + +GpgMEpp was originally developed as part of the KDEPIM community. + +Usage +----- + +The usage pattern of GpgMEpp closely follows GPGMEs core usage +pattern so the documentation for GPGME itself provides a good +way to start. + +The context structure in GPGME is mapped to a Context object in +GpgMEpp. Additional convienience code provides Data objects and +a Dataprovider interface that can be used to implement GPGME's +data with any subclass by implementing the right callbacks. + +EditInteractor subclasses provide ready to use classes for +common --edit-key tasks. You can implement your own editinteractor +classes by implementing the EditInteractor interface and using +your subclass as an interactor in the edit function. + +Example to set the ownertrust of a key: + + /* Create an edit interactor */ + EditInteractor *ei = new GpgSetOwnerTrustEditInteractor(Key::Ultimate); + /* Obtain a Context */ + Context *ctx = Context::createForProtocol(Protocol::OpenPGP); + /* Create an in memory data object */ + Data data; + /* Start the edit on some key previously obtained. */ + Error e = ctx->edit(key, std::unique_ptr(ei), data); + /* Errors provide boolean comparision */ + if (!e) + ... + /* Delete the context */ + delete ctx; + +Examples / Tests +---------------- + +GpgMEpp is tested through the Qt API. You can refer to the +tests in qt/tests for examples of usage or refer to +the actual QGpgME*Job.cpp implementations which rely +on GpgMEpp and should cover most use cases. + +Hacking +------- + +GpgMEpp follows KDE Coding styles. See: +https://techbase.kde.org/Policies/Frameworks_Coding_Style +for more info. + +License +------- +GPGMEpp is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +GPGMEpp 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 Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License +along with GPGME++; see the file COPYING.LIB. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. diff -Nru gpgme1.0-1.6.0/lang/cpp/src/callbacks.cpp gpgme1.0-1.8.0/lang/cpp/src/callbacks.cpp --- gpgme1.0-1.6.0/lang/cpp/src/callbacks.cpp 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/src/callbacks.cpp 2016-10-18 17:22:02.000000000 +0000 @@ -0,0 +1,153 @@ +/* + callbacks.cpp - callback targets for internal use: + Copyright (C) 2003,2004 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "callbacks.h" +#include "util.h" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +static inline gpgme_error_t make_err_from_syserror() +{ + return gpgme_error_from_syserror(); +} + +using GpgME::ProgressProvider; +using GpgME::PassphraseProvider; +using GpgME::DataProvider; + +void progress_callback(void *opaque, const char *what, + int type, int current, int total) +{ + ProgressProvider *provider = static_cast(opaque); + if (provider) { + provider->showProgress(what, type, current, total); + } +} + +/* To avoid that a compiler optimizes certain memset calls away, these + macros may be used instead. */ +#define wipememory2(_ptr,_set,_len) do { \ + volatile char *_vptr=(volatile char *)(_ptr); \ + size_t _vlen=(_len); \ + while(_vlen) { *_vptr=(_set); _vptr++; _vlen--; } \ + } while(0) +#define wipememory(_ptr,_len) wipememory2(_ptr,0,_len) + +gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, const char *desc, + int prev_was_bad, int fd) +{ + PassphraseProvider *provider = static_cast(opaque); + bool canceled = false; + gpgme_error_t err = GPG_ERR_NO_ERROR; + char *passphrase = provider ? provider->getPassphrase(uid_hint, desc, prev_was_bad, canceled) : 0 ; + if (canceled) { + err = make_error(GPG_ERR_CANCELED); + } else { + if (passphrase && *passphrase) { + size_t passphrase_length = std::strlen(passphrase); + size_t written = 0; + do { + ssize_t now_written = gpgme_io_write(fd, passphrase + written, passphrase_length - written); + if (now_written < 0) { + err = make_err_from_syserror(); + break; + } + written += now_written; + } while (written < passphrase_length); + } + } + + if (passphrase && *passphrase) { + wipememory(passphrase, std::strlen(passphrase)); + } + free(passphrase); + gpgme_io_write(fd, "\n", 1); + return err; +} + +static gpgme_ssize_t +data_read_callback(void *opaque, void *buf, size_t buflen) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return (gpgme_ssize_t)provider->read(buf, buflen); +} + +static gpgme_ssize_t +data_write_callback(void *opaque, const void *buf, size_t buflen) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return (gpgme_ssize_t)provider->write(buf, buflen); +} + +static gpgme_off_t +data_seek_callback(void *opaque, gpgme_off_t offset, int whence) +{ + DataProvider *provider = static_cast(opaque); + if (!provider) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END) { + gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); + return -1; + } + return provider->seek((off_t)offset, whence); +} + +static void data_release_callback(void *opaque) +{ + DataProvider *provider = static_cast(opaque); + if (provider) { + provider->release(); + } +} + +const gpgme_data_cbs GpgME::data_provider_callbacks = { + &data_read_callback, + &data_write_callback, + &data_seek_callback, + &data_release_callback +}; diff -Nru gpgme1.0-1.6.0/lang/cpp/src/callbacks.h gpgme1.0-1.8.0/lang/cpp/src/callbacks.h --- gpgme1.0-1.6.0/lang/cpp/src/callbacks.h 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/src/callbacks.h 2016-05-17 12:32:37.000000000 +0000 @@ -0,0 +1,45 @@ +/* + callbacks.h - callback targets for internal use: + Copyright (C) 2003 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + This is an internal header file, subject to change without + notice. DO NOT USE. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __GPGMEPP_CALLBACKS_H__ +#define __GPGMEPP_CALLBACKS_H__ + +#include + +extern "C" { + + void progress_callback(void *opaque, const char *what, + int type, int current, int total); + gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, + const char *desc, int prev_was_bad, int fd); +} + +namespace GpgME +{ +extern const gpgme_data_cbs data_provider_callbacks; +extern const gpgme_edit_cb_t edit_interactor_callback; +} + +#endif // __GPGME_CALLBACKS_H__ diff -Nru gpgme1.0-1.6.0/lang/cpp/src/configuration.cpp gpgme1.0-1.8.0/lang/cpp/src/configuration.cpp --- gpgme1.0-1.6.0/lang/cpp/src/configuration.cpp 1970-01-01 00:00:00.000000000 +0000 +++ gpgme1.0-1.8.0/lang/cpp/src/configuration.cpp 2016-10-18 17:22:02.000000000 +0000 @@ -0,0 +1,938 @@ +/* + configuration.cpp - wraps gpgme configuration components + Copyright (C) 2010 Klarälvdalens Datakonsult AB + + This file is part of GPGME++. + + GPGME++ is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with GPGME++; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "configuration.h" +#include "error.h" +#include "util.h" + +#include + +#include +#include +#include +#include +#include + +using namespace GpgME; +using namespace GpgME::Configuration; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_opt_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_opt_t; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_arg_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_arg_t; + +typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_ctx_t; +typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_ctx_t; + +namespace +{ +struct nodelete { + template void operator()(T *) {} +}; +} + +// static +std::vector Component::load(Error &returnedError) +{ + + // + // 1. get a context: + // + gpgme_ctx_t ctx_native = 0; + if (const gpgme_error_t err = gpgme_new(&ctx_native)) { + returnedError = Error(err); + return std::vector(); + } + const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); + + // + // 2. load the config: + // + gpgme_conf_comp_t conf_list_native = 0; + if (const gpgme_error_t err = gpgme_op_conf_load(ctx_native, &conf_list_native)) { + returnedError = Error(err); + return std::vector(); + } + shared_gpgme_conf_comp_t head(conf_list_native, &gpgme_conf_release); + + // + // 3. convert to vector: + // + std::vector result; + + while (head) { + // secure 'head->next' (if any) against memleaks: + shared_gpgme_conf_comp_t next; + if (head->next) { + next.reset(head->next, &gpgme_conf_release); + } + + // now prevent double-free of next.get() and following: + head->next = 0; + + // now add a new Component to 'result' (may throw): + result.resize(result.size() + 1); + result.back().comp.swap(head); // .comp = std::move( head ); + head.swap(next); // head = std::move( next ); + } + + return result; +} + +Error Component::save() const +{ + + if (isNull()) { + return Error(make_error(GPG_ERR_INV_ARG)); + } + + // + // 1. get a context: + // + gpgme_ctx_t ctx_native = 0; + if (const gpgme_error_t err = gpgme_new(&ctx_native)) { + return Error(err); + } + const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); + + // + // 2. save the config: + // + return Error(gpgme_op_conf_save(ctx.get(), comp.get())); +} + +const char *Component::name() const +{ + return comp ? comp->name : 0 ; +} + +const char *Component::description() const +{ + return comp ? comp->description : 0 ; +} + +const char *Component::programName() const +{ + return comp ? comp->program_name : 0 ; +} + +Option Component::option(unsigned int idx) const +{ + gpgme_conf_opt_t opt = 0; + if (comp) { + opt = comp->options; + } + while (opt && idx) { + opt = opt->next; + --idx; + } + if (opt) { + return Option(comp, opt); + } + return Option(); +} + +Option Component::option(const char *name) const +{ + gpgme_conf_opt_t opt = 0; + if (comp) { + opt = comp->options; + } + using namespace std; // for strcmp + while (opt && strcmp(name, opt->name) != 0) { + opt = opt->next; + } + if (opt) { + return Option(comp, opt); + } + return Option(); +} + +unsigned int Component::numOptions() const +{ + unsigned int result = 0; + for (gpgme_conf_opt_t opt = comp ? comp->options : 0 ; opt ; opt = opt->next) { + ++result; + } + return result; +} + +std::vector