aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cpp: Avoid missing returns in non-void functionsAndreas Stieger2016-09-213-0/+4
| | | | | | | | | | | | | * 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 Signed-off-by: Andreas Stieger <[email protected]> Signed-off-by: Andre Heinecke <[email protected]>
* Post release updatesWerner Koch2016-09-212-1/+4
| | | | --
* Release 1.7.0gpgme-1.7.0Werner Koch2016-09-216-29/+73
| | | | | | * configure.ac: Bump LT vesion to C26/A15/R0. Signed-off-by: Werner Koch <[email protected]>
* python: Create install dir.Werner Koch2016-09-211-0/+1
| | | | | | * lang/python/Makefile.am (install-exec-local): Create dir. Signed-off-by: Werner Koch <[email protected]>
* tests: Make "make -j distcheck" work in Python.Werner Koch2016-09-202-11/+9
| | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* tests: Use --batch for gpg import.Werner Koch2016-09-202-6/+6
| | | | | | | | | * 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 <[email protected]>
* tests: Improve portability.Werner Koch2016-09-202-3/+3
| | | | | | | | * 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 <[email protected]>
* build: Create swdb file.Werner Koch2016-09-201-2/+16
| | | | | | | * Makefile.am (distcheck-hook): New. (dist-hook): s/VERSION/PACKAGE_VERSION/ for future compatibility. Signed-off-by: Werner Koch <[email protected]>
* python: Fix detection of Python available versions.Justus Winter2016-09-201-2/+2
| | | | | | | | * configure.ac: Test for 'PYTHON_VERSION' as 'AX_PYTHON_DEVEL' sets 'PYTHON' but clears the former. Fixes-commit: 99db3512 Signed-off-by: Justus Winter <[email protected]>
* core: Remove moc artifactAndre Heinecke2016-09-192-62/+1
| | | | | | | | | | * 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.
* Add NEWS entry for qt/cppAndre Heinecke2016-09-191-0/+2
| | | | --
* qt: Improve READMEAndre Heinecke2016-09-191-15/+105
| | | | * lang/qt/README: Add more content. Clearly note license difference.
* cpp: Improve READMEAndre Heinecke2016-09-191-22/+63
| | | | * lang/cpp/README: Add more content, move license to bottom.
* python: Improve metadata and READMEs.Justus Winter2016-09-193-21/+24
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* qt: Add debug output for testTofuPolicyAndre Heinecke2016-09-191-0/+20
| | | | | | | | | | * 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 [email protected] fails which it should never do.
* doc: Mention language bindings in the manual.Werner Koch2016-09-191-1/+11
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* core: Check for GPG_TTY as well as DISPLAY.Ben Kibbey2016-09-195-15/+67
| | | | | | | | | | | | | | * 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 <[email protected]>
* qt: Add test for setting tofu policyAndre Heinecke2016-09-161-0/+36
| | | | * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New.
* qt: Add job for tofupolicyAndre Heinecke2016-09-167-1/+237
| | | | | | | | | * 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_policyAndre Heinecke2016-09-162-0/+35
| | | | | * src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): New.
* cpp: Declare sizes of tofu-info enumsAndre Heinecke2016-09-161-2/+2
| | | | | | | | | * 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.
* cpp: Silence use of deprecated function warning.Werner Koch2016-09-161-0/+9
| | | | | | * lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning. Signed-off-by: Werner Koch <[email protected]>
* core: Document the version a function has been deprecated.Werner Koch2016-09-162-73/+77
| | | | | | | | | * 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 <[email protected]>
* core: Map GPGME_STATUS_EOF to the empty string.Werner Koch2016-09-163-9/+9
| | | | | | | | * 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 <[email protected]>
* python: Release the GIL during calls into GPGME.Justus Winter2016-09-162-7/+45
| | | | | | | | | | | | | | | * 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 <[email protected]> Signed-off-by: Justus Winter <[email protected]>
* python: Adapt to 'gpgme_op_interact'.Justus Winter2016-09-168-38/+296
| | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* core: Fix typos.Justus Winter2016-09-161-2/+2
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* doc: Move description of most deprecated functions to a new appendix.Werner Koch2016-09-161-703/+679
| | | | | -- Signed-off-by: Werner Koch <[email protected]>
* doc: Document the recently added --quick-foo related functions.Werner Koch2016-09-161-153/+655
| | | | --
* core: Remove stub to try implementing gpg < 2.1 support for createkey.Werner Koch2016-09-161-27/+2
| | | | | | | * src/engine-gpg.c (gpg_createkey_legacy): Remove. (gpg_genkey): Remove call. Signed-off-by: Werner Koch <[email protected]>
* core: Fix setting og the verification result.Werner Koch2016-09-161-17/+2
| | | | | | | * src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG status. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_interact, deprecate gpgme_op_edit.Werner Koch2016-09-159-23/+251
| | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* core: Minor change of the gpgme_op_edit semantics.Werner Koch2016-09-156-10/+34
| | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* core: New function gpgme_op_tofu_policyWerner Koch2016-09-1419-3/+448
| | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* core: Defer implementation of gpgme_op_createkey with gpg < 2.1Werner Koch2016-09-141-0/+6
| | | | | | * src/engine-gpg.c (gpg_createkey_legacy): Mark unused variables. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_keysign.Werner Koch2016-09-1419-13/+638
| | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* python: Clarify that we support Python 2.7 too.Justus Winter2016-09-143-3/+3
| | | | | | | | * 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 <[email protected]>
* python: Trim imports.Justus Winter2016-09-144-4/+0
| | | | | | | | | * 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 <[email protected]>
* python: Improve error handling.Justus Winter2016-09-141-2/+12
| | | | | | * lang/python/gpgme.i (gpgme_engine_info_t): Improve error handling. Signed-off-by: Justus Winter <[email protected]>
* python: Adapt to TOFU changes.Justus Winter2016-09-141-4/+1
| | | | | | | * lang/python/pyme/results.py (TofuInfo): Drop. (Signature): The TOFU information moved to the key. Signed-off-by: Justus Winter <[email protected]>
* python: Improve build system integration.Justus Winter2016-09-142-64/+12
| | | | | | | * 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 <[email protected]>
* core: New function gpgme_op_revuid.Werner Koch2016-09-148-15/+94
| | | | | | | | | | | | | * 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 <[email protected]>
* core: Change a parameter for the engine's genkey function.Werner Koch2016-09-146-23/+37
| | | | | | | | | | | | | | | * 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 <[email protected]>
* python: Build for both Python2 and Python3.Justus Winter2016-09-145-18/+177
| | | | | | | | | | * 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 <[email protected]>
* python: Import from __future__ to align behavior of Python 2.7.Justus Winter2016-09-1459-0/+177
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Use more generic shebang.Justus Winter2016-09-1438-38/+38
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* core: New function gpgme_op_adduid.Werner Koch2016-09-147-33/+192
| | | | | | | | | | | | | * 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 <[email protected]>
* core: New function gpgme_op_createsubkey.Werner Koch2016-09-147-33/+196
| | | | | | | | | | | | * 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 <[email protected]>
* core: Use const char * where appropriate.Werner Koch2016-09-138-25/+35
| | | | Signed-off-by: Werner Koch <[email protected]>
* core: Cast away the common const problem with spawn and argv.Werner Koch2016-09-132-5/+5
| | | | | | * src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV. Signed-off-by: Werner Koch <[email protected]>