gpgme.git
19 months agoRelease 1.7.0 gpgme-1.7.0
Werner Koch [Wed, 21 Sep 2016 06:57:07 +0000 (08:57 +0200)]
Release 1.7.0

* configure.ac: Bump LT vesion to C26/A15/R0.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Create install dir.
Werner Koch [Wed, 21 Sep 2016 07:17:23 +0000 (09:17 +0200)]
python: Create install dir.

* lang/python/Makefile.am (install-exec-local): Create dir.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Make "make -j distcheck" work in Python.
Werner Koch [Tue, 20 Sep 2016 17:58:00 +0000 (19:58 +0200)]
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.

--

This addresses the problem that two rules might run the private keys
copy rule and due to the files being chmod -w during make discheck the
second process running that rule's cp would get a permission error.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Use --batch for gpg import.
Werner Koch [Tue, 20 Sep 2016 17:51:02 +0000 (19:51 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Improve portability.
Werner Koch [Tue, 20 Sep 2016 17:46:04 +0000 (19:46 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agobuild: Create swdb file.
Werner Koch [Tue, 20 Sep 2016 17:43:49 +0000 (19:43 +0200)]
build: Create swdb file.

* Makefile.am (distcheck-hook): New.
(dist-hook): s/VERSION/PACKAGE_VERSION/ for future compatibility.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Fix detection of Python available versions.
Justus Winter [Tue, 20 Sep 2016 09:10:10 +0000 (11:10 +0200)]
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
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agocore: Remove moc artifact
Andre Heinecke [Mon, 19 Sep 2016 12:29:03 +0000 (14:29 +0200)]
core: Remove moc artifact

* src/moc_kdpipeiodevice.cpp: Removed.
* src/Makefile.am (EXTRA_DIST): Remove moc_kdpipeiodevice.cpp.

--
This file was overlooked in 58ed9c17 which removed the unused
and obsolete w32-qt code. See lang/qt QIODeviceDataProvider which
replaced kdpipeiodevice.

19 months agoAdd NEWS entry for qt/cpp
Andre Heinecke [Mon, 19 Sep 2016 12:21:45 +0000 (14:21 +0200)]
Add NEWS entry for qt/cpp

--

19 months agoqt: Improve README
Andre Heinecke [Mon, 19 Sep 2016 12:09:44 +0000 (14:09 +0200)]
qt: Improve README

* lang/qt/README: Add more content. Clearly note license difference.

19 months agocpp: Improve README
Andre Heinecke [Mon, 19 Sep 2016 12:09:19 +0000 (14:09 +0200)]
cpp: Improve README

* lang/cpp/README: Add more content, move license to bottom.

19 months agopython: Improve metadata and READMEs.
Justus Winter [Mon, 19 Sep 2016 10:49:14 +0000 (12:49 +0200)]
python: Improve metadata and READMEs.

--
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agoqt: Add debug output for testTofuPolicy
Andre Heinecke [Mon, 19 Sep 2016 08:01:19 +0000 (10:01 +0200)]
qt: Add debug output for testTofuPolicy

* lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add
debug output.

--
The debug output is only emitted before a failure of the
test in case a keylisting of bravo@example.net fails which
it should never do.

19 months agodoc: Mention language bindings in the manual.
Werner Koch [Mon, 19 Sep 2016 07:06:24 +0000 (09:06 +0200)]
doc: Mention language bindings in the manual.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Check for GPG_TTY as well as DISPLAY.
Ben Kibbey [Sat, 3 Sep 2016 23:06:36 +0000 (19:06 -0400)]
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.

--
Useful when no DISPLAY is set and there is no attached terminal to the
current process.

Signed-off-by: Ben Kibbey <bjk@luxsci.net>
19 months agoqt: Add test for setting tofu policy
Andre Heinecke [Fri, 16 Sep 2016 14:58:00 +0000 (16:58 +0200)]
qt: Add test for setting tofu policy

* lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New.

19 months agoqt: Add job for tofupolicy
Andre Heinecke [Fri, 16 Sep 2016 14:55:25 +0000 (16:55 +0200)]
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.

19 months agocpp: Add support for gpgme_op_tofu_policy
Andre Heinecke [Fri, 16 Sep 2016 14:54:07 +0000 (16:54 +0200)]
cpp: Add support for gpgme_op_tofu_policy

* src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart):
New.

19 months agocpp: Declare sizes of tofu-info enums
Andre Heinecke [Fri, 16 Sep 2016 14:52:03 +0000 (16:52 +0200)]
cpp: Declare sizes of tofu-info enums

* lang/cpp/src/tofuinfo.h (Policy, Validity): Declare sizes.

--
This is a quick ABI break before the release so that we can
easier extend them in the future. All new enums in public API
should be declared with a size from now on.

19 months agocpp: Silence use of deprecated function warning.
Werner Koch [Fri, 16 Sep 2016 13:59:54 +0000 (15:59 +0200)]
cpp: Silence use of deprecated function warning.

* lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Document the version a function has been deprecated.
Werner Koch [Fri, 16 Sep 2016 13:59:07 +0000 (15:59 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Map GPGME_STATUS_EOF to the empty string.
Werner Koch [Fri, 16 Sep 2016 13:06:26 +0000 (15:06 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Release the GIL during calls into GPGME.
Justus Winter [Fri, 16 Sep 2016 10:32:24 +0000 (12:32 +0200)]
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.

Co-authored-by: Kai Michaelis <kai@gnupg.org>
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Adapt to 'gpgme_op_interact'.
Justus Winter [Fri, 16 Sep 2016 12:56:29 +0000 (14:56 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agocore: Fix typos.
Justus Winter [Fri, 16 Sep 2016 11:02:55 +0000 (13:02 +0200)]
core: Fix typos.

--
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agodoc: Move description of most deprecated functions to a new appendix.
Werner Koch [Fri, 16 Sep 2016 10:20:33 +0000 (12:20 +0200)]
doc: Move description of most deprecated functions to a new appendix.

--
Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agodoc: Document the recently added --quick-foo related functions.
Werner Koch [Fri, 16 Sep 2016 09:48:29 +0000 (11:48 +0200)]
doc: Document the recently added --quick-foo related functions.

--

19 months agocore: Remove stub to try implementing gpg < 2.1 support for createkey.
Werner Koch [Fri, 16 Sep 2016 09:45:07 +0000 (11:45 +0200)]
core: Remove stub to try implementing gpg < 2.1 support for createkey.

* src/engine-gpg.c (gpg_createkey_legacy): Remove.
(gpg_genkey): Remove call.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Fix setting og the verification result.
Werner Koch [Fri, 16 Sep 2016 09:43:32 +0000 (11:43 +0200)]
core: Fix setting og the verification result.

* src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG
status.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: New function gpgme_op_interact, deprecate gpgme_op_edit.
Werner Koch [Thu, 15 Sep 2016 08:45:04 +0000 (10:45 +0200)]
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/.
--

This change will eventually allow us to remove all those status codes
from gpgme.h.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Minor change of the gpgme_op_edit semantics.
Werner Koch [Thu, 15 Sep 2016 07:24:29 +0000 (09:24 +0200)]
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.
--

An edit callback may now simply return GPG_ERR_FALSE to indicate that
it did not handled the status code.  GPGME will the do the appropriate
action, which is to send an empty line.

Note that it is highly unlikely that GPG_ERR_FALSE has ever been used
by an application as return value from an edit interactor.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: New function gpgme_op_tofu_policy
Werner Koch [Wed, 14 Sep 2016 18:21:19 +0000 (20:21 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Defer implementation of gpgme_op_createkey with gpg < 2.1
Werner Koch [Wed, 14 Sep 2016 17:02:40 +0000 (19:02 +0200)]
core: Defer implementation of gpgme_op_createkey with gpg < 2.1

* src/engine-gpg.c (gpg_createkey_legacy): Mark unused variables.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: New function gpgme_op_keysign.
Werner Koch [Wed, 14 Sep 2016 16:44:33 +0000 (18:44 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Clarify that we support Python 2.7 too.
Justus Winter [Wed, 14 Sep 2016 12:36:29 +0000 (14:36 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Trim imports.
Justus Winter [Wed, 14 Sep 2016 12:35:00 +0000 (14:35 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Improve error handling.
Justus Winter [Wed, 14 Sep 2016 12:34:14 +0000 (14:34 +0200)]
python: Improve error handling.

* lang/python/gpgme.i (gpgme_engine_info_t): Improve error handling.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Adapt to TOFU changes.
Justus Winter [Wed, 14 Sep 2016 12:32:48 +0000 (14:32 +0200)]
python: Adapt to TOFU changes.

* lang/python/pyme/results.py (TofuInfo): Drop.
(Signature): The TOFU information moved to the key.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Improve build system integration.
Justus Winter [Wed, 14 Sep 2016 11:00:20 +0000 (13:00 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agocore: New function gpgme_op_revuid.
Werner Koch [Wed, 14 Sep 2016 10:41:16 +0000 (12:41 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Change a parameter for the engine's genkey function.
Werner Koch [Wed, 14 Sep 2016 10:15:35 +0000 (12:15 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Build for both Python2 and Python3.
Justus Winter [Wed, 14 Sep 2016 08:22:07 +0000 (10:22 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Import from __future__ to align behavior of Python 2.7.
Justus Winter [Wed, 14 Sep 2016 09:39:00 +0000 (11:39 +0200)]
python: Import from __future__ to align behavior of Python 2.7.

--
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Use more generic shebang.
Justus Winter [Wed, 14 Sep 2016 08:51:49 +0000 (10:51 +0200)]
python: Use more generic shebang.

--
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agocore: New function gpgme_op_adduid.
Werner Koch [Wed, 14 Sep 2016 09:40:34 +0000 (11:40 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: New function gpgme_op_createsubkey.
Werner Koch [Wed, 14 Sep 2016 07:51:16 +0000 (09:51 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Use const char * where appropriate.
Werner Koch [Tue, 13 Sep 2016 18:59:07 +0000 (20:59 +0200)]
core: Use const char * where appropriate.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Cast away the common const problem with spawn and argv.
Werner Koch [Tue, 13 Sep 2016 18:57:15 +0000 (20:57 +0200)]
core: Cast away the common const problem with spawn and argv.

* src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Fix condition-always-true warning in trace macro.
Werner Koch [Tue, 13 Sep 2016 18:54:55 +0000 (20:54 +0200)]
core: Fix condition-always-true warning in trace macro.

* src/data-compat.c (old_user_read): Cast AMT.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Mark unused function args.
Werner Koch [Tue, 13 Sep 2016 18:53:14 +0000 (20:53 +0200)]
core: Mark unused function args.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Mark lots of unused vars and fix const mismatches.
Werner Koch [Tue, 13 Sep 2016 18:48:06 +0000 (20:48 +0200)]
tests: Mark lots of unused vars and fix const mismatches.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Use gpgme_io_write in passhrase callbacks.
Werner Koch [Tue, 13 Sep 2016 18:46:41 +0000 (20:46 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: Do not pass const char* to functions taking a char*.
Werner Koch [Tue, 13 Sep 2016 18:44:59 +0000 (20:44 +0200)]
core: Do not pass const char* to functions taking a char*.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agobuild: Use more compiler warnings
Werner Koch [Tue, 13 Sep 2016 18:41:16 +0000 (20:41 +0200)]
build: Use more compiler warnings

* configure.ac: Add useful compiler warnings.
--

It is strange that this seems to be the only GnuPG package which does
not use modern warning.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agocore: New function gpgme_op_create_key.
Werner Koch [Tue, 13 Sep 2016 16:57:38 +0000 (18:57 +0200)]
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.
--

This function uses the new --quick-gen-key API of gpg.  A limited
compatibility mode to use older gpg versions and gpgsm will eventually
be provided.  Not all flags are currently implemented.

 ./run-genkey --unprotected --force test@example.com

Create a new standard key with the given user id.  --force is used to
allow creating more than one key with that user id in the keyring.

 ./run-genkey --unprotected --force \
      test@example.com default default 2145826800

Creates a new standard key with an expiration date of 2037-12-31.

 ./run-genkey --unprotected --force \
      test@example.com future-default default 2145826800

Create a standard key using the fugure default algorithms.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agopython: Handle slight differences between Python 2 and 3.
Justus Winter [Tue, 13 Sep 2016 08:44:14 +0000 (10:44 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Fix types and error handling.
Justus Winter [Tue, 13 Sep 2016 11:25:15 +0000 (13:25 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Avoid Python3-only form of super().
Justus Winter [Mon, 12 Sep 2016 15:21:34 +0000 (17:21 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Make type translation compatible with Python 2.7.
Justus Winter [Mon, 12 Sep 2016 15:11:19 +0000 (17:11 +0200)]
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.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Avoid hardcoding the interpreter.
Justus Winter [Mon, 12 Sep 2016 14:19:07 +0000 (16:19 +0200)]
python: Avoid hardcoding the interpreter.

* lang/python/setup.py.in: Avoid hardcoding the interpreter.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agopython: Do not rely on subprocess.DEVNULL.
Justus Winter [Mon, 12 Sep 2016 14:18:31 +0000 (16:18 +0200)]
python: Do not rely on subprocess.DEVNULL.

* lang/python/setup.py.in: Do not rely on subprocess.DEVNULL.

Signed-off-by: Justus Winter <justus@g10code.com>
19 months agotests: Fix version comparison.
Justus Winter [Mon, 12 Sep 2016 13:42:07 +0000 (15:42 +0200)]
tests: Fix version comparison.

* tests/gpg/t-sig-notation.c: Fix version comparison.

Fixes-commit: a0263ad2
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agotests: Make signature notation test compatible with older GnuPGs.
Justus Winter [Mon, 12 Sep 2016 12:53:08 +0000 (14:53 +0200)]
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
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agoqt: Fix some includes
Andre Heinecke [Mon, 12 Sep 2016 08:52:10 +0000 (10:52 +0200)]
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.

--
This fixes build against Qt versions where the includes are less
implicit.

19 months agoqt: Fix tofu test.
Justus Winter [Mon, 12 Sep 2016 08:11:44 +0000 (10:11 +0200)]
qt: Fix tofu test.

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

Fixes-commit: 120b1478
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agocore,cpp: Extend the TOFU information.
Werner Koch [Wed, 7 Sep 2016 07:26:11 +0000 (09:26 +0200)]
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.
--

The latest GnuPG commits have the needed changes but we also allow the
use of currently released GnuPG version.

Signed-off-by: Werner Koch <wk@gnupg.org>
19 months agotests: Set passphrase cb in t-encrypt-mixed
Andre Heinecke [Tue, 6 Sep 2016 14:32:01 +0000 (16:32 +0200)]
tests: Set passphrase cb in t-encrypt-mixed

* tests/gpg/t-encrypt-mixed.c (main): Set passphrase cb.

--
This fixes the test when run without an agent and our
faked pinentry program.

19 months agocore: Check for gpg version for loopback mode
Andre Heinecke [Tue, 6 Sep 2016 14:30:24 +0000 (16:30 +0200)]
core: Check for gpg version for loopback mode

* src/engine-gpg.c (build_argv): Check for version 2.1.0
before adding pinentry-mode.

--
This is a compatibility fix for older versions that don't support
this flag which would otherwise result in an invalid argument
error.

19 months agocore: Fix passphrase cb for mixed sym encrypt
Andre Heinecke [Tue, 6 Sep 2016 14:28:45 +0000 (16:28 +0200)]
core: Fix passphrase cb for mixed sym encrypt

* src/encrypt.c (encrypt_start): Handle SYMMETRIC flag.
* src/encrypt-sign.c (encrypt_sign_start): Ditto.

--
This causes the passphrace command handler to be properly
registered which in turn will result in the passphrase
callback beeing called.

19 months agoqt: Clarify comment and strings in tofuinfo test
Andre Heinecke [Mon, 5 Sep 2016 14:54:50 +0000 (16:54 +0200)]
qt: Clarify comment and strings in tofuinfo test

* lang/qt/tests/t-tofuinfo.cpp (testTofuSignCount)
(testTofuKeyList): Ensure distinct messages. Clarify comment.

19 months agoqt: Enable signcount checks in tofuinfo test
Andre Heinecke [Mon, 5 Sep 2016 10:58:35 +0000 (12:58 +0200)]
qt: Enable signcount checks in tofuinfo test

* lang/qt/tests/t-tofuinfo.cpp: Enable checks for signcount.

--
Signcount for userIDs works now as expected with gnupg 2.1.16.

19 months agocpp: Add convenience update function to a key
Andre Heinecke [Mon, 5 Sep 2016 10:53:02 +0000 (12:53 +0200)]
cpp: Add convenience update function to a key

* lang/cpp/src/key.cpp (Key::update): New.
* lang/cpp/src/key.h: Update accordingly.

--
This function helps if you have an incomplete key or want
to make sure all info in a key is complete (e.g. validity / tofuinfo)

19 months agocpp: Add ostream operators for key and uid
Andre Heinecke [Mon, 5 Sep 2016 09:57:09 +0000 (11:57 +0200)]
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.

--
This is helpful debugging / showing the state of a key / uid and
tofuinfo.

19 months agoqt: Add missing header redirection
Andre Heinecke [Mon, 5 Sep 2016 08:44:41 +0000 (10:44 +0200)]
qt: Add missing header redirection

* lang/qt/src/keyformailboxjob.h,
lang/qt/src/qgpgmekeyformailboxjob.h: Fix includes.

--
This ensures that when building qgpgme you do not need an installed
gpgme++.

19 months agoqt: Include cpp before core directory
Andre Heinecke [Mon, 5 Sep 2016 08:42:02 +0000 (10:42 +0200)]
qt: Include cpp before core directory

* lang/qt/src/Makefile.am (AM_CPPFLAGS): Include cpp before core.

--
Both core and cpp have headers that have the same names, this
can lead to the wrong headers beeing included when qt bindings
are built.

19 months agoqt: Fix 2.1 t-support copy
Andre Heinecke [Thu, 25 Aug 2016 15:16:25 +0000 (17:16 +0200)]
qt: Fix 2.1 t-support copy

* lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy.

19 months agoqt: Fix and extend TofuInfo test.
Andre Heinecke [Thu, 25 Aug 2016 14:25:49 +0000 (16:25 +0200)]
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.

19 months agoqt: Fix keyring copy in tests
Andre Heinecke [Thu, 25 Aug 2016 14:23:58 +0000 (16:23 +0200)]
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.

19 months agoqt: Add generic flag support for keylistjobs
Andre Heinecke [Thu, 25 Aug 2016 14:22:12 +0000 (16:22 +0200)]
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.

--
Instead of new API for each new thing lets be a bit more
generic / open.

19 months agoqt: Ensure that current src dir is included first
Andre Heinecke [Thu, 25 Aug 2016 14:19:39 +0000 (16:19 +0200)]
qt: Ensure that current src dir is included first

* lang/qt/src/Makefile.am: Reorder include directives.

--
This fixes the problem that QGpgME would pick up gpgme or
gpgme++ headers from an installed version.

19 months agocpp: Add WithTofu Keylist Mode
Andre Heinecke [Thu, 25 Aug 2016 14:17:46 +0000 (16:17 +0200)]
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.

19 months agoqt: Fix tofuinfo test when gpg is gpg2
Andre Heinecke [Thu, 25 Aug 2016 13:20:02 +0000 (15:20 +0200)]
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.

--
New helper takes care of copying the correct files for either
keybox or keyring.

19 months agoqt: Remove unused variable in test
Andre Heinecke [Thu, 25 Aug 2016 13:00:46 +0000 (15:00 +0200)]
qt: Remove unused variable in test

* t-wkspublish.cpp (testWKSPublishCreate): Remove context.

19 months agoqt: Add test for wkspublishjob
Andre Heinecke [Thu, 25 Aug 2016 12:35:09 +0000 (14:35 +0200)]
qt: Add test for wkspublishjob

* lang/qt/tests/t-wkspublish.cpp: New.
* lang/qt/tests/Makefile.am: Update accordingly.

--
Most tests are disabled by default as tey require
an online connection.
Define DO_ONLINE_TESTS to enable the tests.

19 months agoqt: Add WKSPublishJob
Andre Heinecke [Thu, 25 Aug 2016 12:29:41 +0000 (14:29 +0200)]
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.

--
The Job was originally intended to be used with a SpawnEngine
Context but QProcess was a better fit for the job.

Usage is similar to the client tool. check, create, recieve.

19 months agoCpp: Change firstSeen / lastSeen return values
Andre Heinecke [Thu, 25 Aug 2016 08:46:17 +0000 (10:46 +0200)]
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.

19 months agoCpp: Add wrapper for gpgme_get_dirinfo
Andre Heinecke [Thu, 25 Aug 2016 08:45:24 +0000 (10:45 +0200)]
Cpp: Add wrapper for gpgme_get_dirinfo

* lang/cpp/src/context.cpp (dirInfo): New.
* lang/cpp/src/global.h (dirInfo): New.

19 months agoCpp: Add support for spawn engine
Andre Heinecke [Thu, 25 Aug 2016 08:42:49 +0000 (10:42 +0200)]
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.

19 months agocore: Add GPGME_KEYLIST_MODE_WITH_TOFU.
Werner Koch [Thu, 25 Aug 2016 09:38:03 +0000 (11:38 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocore: Adjust for TOFU_STATS change in gnupg 2.1.16.
Werner Koch [Wed, 24 Aug 2016 18:10:36 +0000 (20:10 +0200)]
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.
--

Using an unsigned long here is okay: We will never get an error and
even on machines where unsigned long is 32 bit (e.g. Windows64) this
allows us to operate until 2106.  By then Windows will be a footnote
in history or Windows128 has changed that type to something larger
than 32 bit ;-)

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocore: Set the 'encrcount' field in gpgme_tofu_info_t.
Werner Koch [Wed, 24 Aug 2016 14:04:54 +0000 (16:04 +0200)]
core: Set the 'encrcount' field in gpgme_tofu_info_t.

* src/verify.c (parse_tofu_stats): Set ENCRCOUNT field.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocpp: Get rid of AssuanResult due to its deprecation.
Werner Koch [Tue, 23 Aug 2016 17:50:01 +0000 (19:50 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agoQt: Adapt (disabled) tofuinfo test to new API
Andre Heinecke [Wed, 24 Aug 2016 12:00:41 +0000 (14:00 +0200)]
Qt: Adapt (disabled) tofuinfo test to new API

* lang/qt/tests/t-tofuinfo.cpp: Switch to UID based API.

--
Test is still disabled as GnuPG still returns unexpected
results.

20 months agoCpp: Add Key to signature
Andre Heinecke [Wed, 24 Aug 2016 11:59:37 +0000 (13:59 +0200)]
Cpp: Add Key to signature

* lang/cpp/src/verificationresult.cpp,
lang/cpp/src/verificationresult.h (Signature::key): New.

20 months agoCpp: Use fpr field for primaryFingerprint
Andre Heinecke [Wed, 24 Aug 2016 11:57:49 +0000 (13:57 +0200)]
Cpp: Use fpr field for primaryFingerprint

* lang/cpp/src/key.cpp (Key::primaryFingerprint): Return
fpr value if available.

--
Should not be necessary but we might have an incomplete
key without subkeys but the fingerprint already set in
gpgme's data type.

20 months agoCpp: Move tofuinfo from signature to userid
Andre Heinecke [Tue, 23 Aug 2016 14:40:21 +0000 (16:40 +0200)]
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.

--
With be4ff75d7 Tofu info now lives with a UserID
Object. While this breaks API it was not yet released.

20 months agocore: Put the protocol into a TOFU created key object.
Werner Koch [Tue, 23 Aug 2016 13:55:55 +0000 (15:55 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocore: Change the way TOFU information are represented.
Werner Koch [Tue, 23 Aug 2016 13:22:28 +0000 (15:22 +0200)]
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.
--

TOFU information are now associated with the user ID and not with a
separate object.

Note that this breaks code relying on the former non-released TOFU
feature.  The C++ bindings won't work right now.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocore: Extend gpgme_user_id_t with 'address'.
Werner Koch [Tue, 23 Aug 2016 04:48:50 +0000 (06:48 +0200)]
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.

Signed-off-by: Werner Koch <wk@gnupg.org>
20 months agocore: New code for parsing mail addresses.
Werner Koch [Mon, 22 Aug 2016 18:50:37 +0000 (20:50 +0200)]
core: New code for parsing mail addresses.

* src/mbox-util.c: New.
* src/mbox-util.h: New.
--

The files haven been copied verbatim from
GnuPG 2.1.15 commit 54245979e691129ed9d3a6c642087fb8d3227449
after the license has been changed in GnuPG.

We need this file too match GnuPG's idea of a mail address.

Signed-off-by: Werner Koch <wk@gnupg.org>