2016-10-18  Werner Koch  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <aheinecke@intevation.de>

	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  <justus@g10code.com>

	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  <aheinecke@intevation.de>

	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  <dvratil@kde.org>

	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  <aheinecke@intevation.de>

	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  <aheinecke@intevation.de>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>

	Add missing includes.
	* lang/cpp/src/key.cpp: Include <strings.h> for 'strcasecmp'.
	* tests/gpg/t-cancel.c: Include <sys/select.h> for 'fd_set' and
	friends.

2016-10-05  Andre Heinecke  <aheinecke@intevation.de>

	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  <alon.barlev@gmail.com>

	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  <aheinecke@intevation.de>

	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  <dkg@fifthhorseman.net>

	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  <justus@g10code.com>

	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  <justus@g10code.com>

	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  <dkg@fifthhorseman.net>

	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  <aheinecke@intevation.de>

	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  <wk@gnupg.org>

	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  <ueno@gnu.org>

	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  <astieger@suse.com>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>

	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  <aheinecke@intevation.de>

	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  <bjk@luxsci.net>

	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  <aheinecke@intevation.de>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>
	    Kai Michaelis  <kai@gnupg.org>

	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  <justus@g10code.com>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <justus@g10code.com>

	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  <justus@g10code.com>

	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  <aheinecke@intevation.de>

	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  <justus@g10code.com>

	qt: Fix tofu test.
	* lang/qt/tests/t-tofuinfo.cpp: Adjust member names.

	Fixes-commit: 120b1478

2016-09-07  Werner Koch  <wk@gnupg.org>

	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  <aheinecke@intevation.de>

	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  <aheinecke@intevation.de>

	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  <aheinecke@intevation.de>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <aheinecke@intevation.de>

	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  <aheinecke@intevation.de>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	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  <wk@gnupg.org>

	core: New commands --lang and --have-lang for gpgme-config.
