aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* w32: Silence some warnings about unused parameters.Werner Koch2016-09-221-0/+14
| | | | | | | * src/assuan-support.c (my_recvmsg, my_sendmsg, my_waitpid) (my_socketpair) [W32]: Mark unused parameters. Signed-off-by: Werner Koch <[email protected]>
* core: Fix error checking in _gpgme_mkstemp.Werner Koch2016-09-221-1/+3
| | | | | | | * src/w32-util.c (_gpgme_mkstemp): Fix error checking. (dlopen): Mark FLAGS as unused. Signed-off-by: Werner Koch <[email protected]>
* core: New helper function _gpgme_strconcat.Werner Koch2016-09-223-24/+77
| | | | | | | | | | | | | | | | | | | | | | * 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. -- The function has been taken from gnupg/common/stringhelp.c and license changed to LPGLv2.1+. I am the original author of that code. Signed-off-by: Werner Koch <[email protected]>
* tests: Add test for cancellationDaiki Ueno2016-09-223-2/+276
| | | | | | | | | | * 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. Signed-off-by: Daiki Ueno <[email protected]>
* gpg: Add option --exit-on-status-write-errorDaiki Ueno2016-09-221-0/+2
| | | | | | | | | | | | | | * 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. -- GnuPG-bug-id: 1415 Signed-off-by: Daiki Ueno <[email protected]> Changed the version test from the patch to use the newer have_gpg_version. Signed-off-by: Werner Koch <[email protected]>
* tests: Fix select usage in t-eventloopDaiki Ueno2016-09-221-1/+5
| | | | | | * tests/gpg/t-eventloop.c (do_select): Supply timeout value to select. Signed-off-by: Daiki Ueno <[email protected]>
* doc: Fix minor errors in I/O callback exampleDaiki Ueno2016-09-221-5/+17
| | | | | | | * gpgme.texi (I/O Callback Example): Fix typos, add timeout to select, and initialize mutex as recursive. Signed-off-by: Daiki Ueno <[email protected]>
* 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]>