aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* python: Move edit callback function.Justus Winter2016-05-233-45/+48
| | | | | | | | * lang/python/gpgme.i (pyEditCb): Move... * lang/python/helpers.c: ... here. * lang/python/helpers.h (pyEditCb): New prototype. Signed-off-by: Justus Winter <[email protected]>
* python: Port more tests.Justus Winter2016-05-235-2/+188
| | | | | | | | | | | | * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Set LD_LIBRARY_PATH. (pytests): Add new tests. * lang/python/tests/t-callbacks.py: Trim imports. * lang/python/tests/t-encrypt-sign.py: New file. * lang/python/tests/t-export.py: Likewise. * lang/python/tests/t-signers.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Translate list of strings.Justus Winter2016-05-231-0/+34
| | | | | | * lang/python/gpgme.i: Add typemap translating list of strings. Signed-off-by: Justus Winter <[email protected]>
* api: Return Tofu info for signatures.Werner Koch2016-05-215-2/+306
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_tofu_policy_t): New. (gpgme_status_code_t): Add status codes for TOFU. (struct _gpgme_tofu_info, gpgme_tofu_info_t): New. (struct _gpgme_signature): Add field 'tofu'. * src/status-table.c (status_table): Add new codes. * src/verify.c: Include limits.h. (release_tofu_info): New. (release_op_data): Call that. (parse_tofu_user): New. (parse_tofu_stats): New. (parse_tofu_stats_long): New. (_gpgme_verify_status_handler): Handle TOFU status lines. * tests/run-verify.c (print_description): New. (print_result): print tofu info. Signed-off-by: Werner Koch <[email protected]>
* api: Add new context flag "raw-description".Werner Koch2016-05-213-2/+22
| | | | | | | * src/context.h (struct gpgme_context): Add field raw_description. * src/gpgme.c (gpgme_set_ctx_flag): New flag. Signed-off-by: Werner Koch <[email protected]>
* core: New functions to help parsing of status lines.Werner Koch2016-05-212-0/+56
| | | | | | | | * src/conversion.c (_gpgme_split_fields): New. (_gpgme_strtoul_field): New. -- Signed-off-by: Werner Koch <[email protected]>
* Qt: Add test for changeownertrustAndre Heinecke2016-05-202-3/+109
| | | | | | | | | * lang/qt/tests/t-ownertrust.cpp: New test. * lang/qt/tests/Makefile.am: Add test. -- This test would have catched the issue created by not handling GPGME_STATUS_KEY_CONSIDERED.
* Cpp: Ignore STATUS_KEY_CONSIDERED when editingAndre Heinecke2016-05-201-0/+1
| | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): Handle GPGME_STATUS_KEY_CONSIDERED.
* api: Add new function gpgme_set_ctx_flag.Werner Koch2016-05-1923-54/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_set_ctx_flag): New prototype. * src/gpgme.c (gpgme_set_ctx_flag): New. * src/gpgme.def, src/libgpgme.vers: Add new function. * src/context.h (struct gpgme_context): Add FULL_STATUS. * src/decrypt.c (_gpgme_decrypt_status_handler): Do not call the status callback if FULL_STATUS is set. * src/genkey.c (genkey_status_handler): Ditto. * src/passphrase.c (_gpgme_passphrase_status_handler): Ditto. * src/sign.c (_gpgme_sign_status_handler): Ditto. * src/engine-backend.h (struct engine_ops): Add SET_STATUS_CB and add adjust all definitions of that variable. * src/engine.c (_gpgme_engine_set_status_cb): New. * src/op-support.c (_gpgme_op_reset): Call this function. * src/engine-gpg.c (struct engine_gpg): Add fields MON_CB and MON_CB_VALUE. (gpg_set_status_cb): New. (_gpgme_engine_ops_gpg): Register that function. (read_status): Call the monitor callback. * src/engine-gpgsm.c (struct engine_gpgsm): Add fields MON_CB and MON_CB_VALUE. (_gpgme_engine_ops_gpgsm): Register that function. (gpgsm_assuan_simple_command): Change first arg to be an engine context and adjust call callers. Call the monitor callback. * src/engine-uiserver.c (struct engine_uiserver): Add fields MON_CB and MON_CB_VALUE. (_gpgme_engine_ops_uiserver): Register that function. (uiserver_assuan_simple_command): Change first arg to be an engine context and adjust call callers. Call the monitor callback. * tests/run-verify.c (status_cb): New. (print_result): Print algo names. (main): Add option --status. -- This new feature is mainly intended for bug tracking. Having access to the raw status lines might also be useful for applications, though. Signed-off-by: Werner Koch <[email protected]>
* api: Remove arbitrary restriction from gpgme_op_verify.Werner Koch2016-05-191-2/+0
| | | | | | | | | | | | | * src/verify.c (verify_start): Do not return GPG_ERR_INV_VALUES when when SIGNED_TEXT is not given. -- The original idea behind this restriction probably was that it is useless to verify a non-detached signatures without also returning the signed text. However, it is sometimes useful to just check the signature, for example to see who signed it. Signed-off-by: Werner Koch <[email protected]>
* python: Improve progress callbacks.Justus Winter2016-05-193-6/+54
| | | | | | | | | * lang/python/helpers.c (pyProgressCb): Stash python errors, convert 'what' to Unicode object. * lang/python/pyme/core.py (Context.set_progress_cb): Hand in 'self'. * lang/python/tests/t-callbacks.py: Test progress callbacks. Signed-off-by: Justus Winter <[email protected]>
* python: Robust exception handling in callbacks.Justus Winter2016-05-196-13/+187
| | | | | | | | | | | | | | | | | | * lang/python/helpers.c (pygpgme_stash_callback_exception): New function. (pygpgme_raise_callback_exception): Likewise. (pyPassphraseCb): Stash python errors. * lang/python/helpers.h (pygpgme_raise_callback_exception): New prototype. * lang/python/pyme/core.py ({Context,Data}.__init__): Move common initialization to superclass. (Context.set_progress_cb): Hand in 'self'. * lang/python/pyme/util.py (GpgmeWrapper.__init__): New function. (GpgmeWrapper.__getattr__): Raise stashed exceptions. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/t-callbacks.py: New file. Signed-off-by: Justus Winter <[email protected]>
* Qt: Check for graphviz and set HAVE_DOT correctlyAndre Heinecke2016-05-192-1/+11
| | | | | * configure.ac: Check for graphviz and define HAVE_DOT. * lang/qt/doc/Doxyfile.in (HAVE_DOT): Use variable.
* python: Add more tests.Justus Winter2016-05-196-8/+157
| | | | | | | | | | | * lang/python/tests/Makefile.am (py_tests): Add new tests. * lang/python/tests/support.py (print_data): New function. * lang/python/tests/t-decrypt.py: Use new function. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-sign.py: New file. * lang/python/tests/t-encrypt-sym.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: More type conversion fixes.Justus Winter2016-05-191-2/+24
| | | | | | | | * lang/python/helpers.c (pyPassphraseCb): Cope with 'uid_hint' being NULL, convert it to an Unicode object, and cope with the callback returning both Unicode and bytes objects. Signed-off-by: Justus Winter <[email protected]>
* python: Fix import.Justus Winter2016-05-191-1/+4
| | | | | | | * lang/python/helpers.c (pygpgme_exception_init): Make module import relative. Signed-off-by: Justus Winter <[email protected]>
* Qt: Fix compilation of unit testsAndre Heinecke2016-05-191-1/+1
| | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME. -- Without building QGpgME the headers of gpgme++ are not included corretly and taken from an already installed gpgme++.
* python: Various fixes.Justus Winter2016-05-182-5/+4
| | | | | | | * configure.ac: Fix SWIG detection, bump required Python version. * lang/python/Makefile.am: Portability fix. Signed-off-by: Justus Winter <[email protected]>
* Fix typo in compatibility declarationAndre Heinecke2016-05-181-1/+1
| | | | | | | | * src/op-support.c (GPG_ERR_SUBKEYS_EXP_REV): Change to GPG_ERR_SUBKEYS_EXP_OR_REV. -- This fixes the build with libgpg-error < 1.23
* tests: New maintenance helper run-encrypt.Werner Koch2016-05-173-2/+220
| | | | | | * tests/run-encrypt.c: New. Signed-off-by: Werner Koch <[email protected]>
* Return dedicated error code for all subkeys expired or revoked.Werner Koch2016-05-176-15/+123
| | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_KEY_CONSIDERED): New. (GPGME_SIGSUM_TOFU_CONFLICT): New. * src/status-table.c (KEY_CONSIDERED): New. * src/op-support.c (_gpgme_parse_inv_recp): Add argc KC_FPR and KC_FLAGS. Use calloc. Detect all expired or revoked subkeys. (_gpgme_parse_key_considered): New. * src/sign.c (op_data_t): Add fields KC_FPR and KC_FLAGS. (release_op_data): Free KC_FPR. (_gpgme_sign_status_handler): Handle STATUS_KEY_CONSIDERED. * src/encrypt.c (op_data_t): Add fields KC_FPR and KC_FLAGS. (release_op_data): Free KC_FPR. (_gpgme_encrypt_status_handler): Handle STATUS_KEY_CONSIDERED. Signed-off-by: Werner Koch <[email protected]>
* Qt / Cpp: Port auto_ptr to unique_ptrAndre Heinecke2016-05-178-54/+48
| | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_p.h (Context::createForEngine), (Context::edit, Context::startEditing), (Context::takeLastEditInteractor, Context::cardEdit), (Context::startCardEditing, Context::takeLastCardEditInteractor), (Context::assuanTransact, Context::startAssuanTransaction), (Context::takeLastAssuanTransaction): Port to unique_ptr. * lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. -- This is another API break but as we already broke API with GpgME++ and QGpgME from KDE Frameworks this is a good time to do this to avoid using a deprected C++ class in the API.
* python: Delete duplicated license texts/Werner Koch2016-05-172-848/+0
| | | | --
* build: Add python autoconf macro.Justus Winter2016-05-171-0/+324
| | | | | | * m4/ax_python_devel.m4: New file. Signed-off-by: Justus Winter <[email protected]>
* Merge branch 'master' of git+ssh://playfair.gnupg.org/git/gpgmeJustus Winter2016-05-172-26/+25
|\
| * Trailing white space cleanup for 2 files in tests/.Werner Koch2016-05-172-26/+25
| | | | | | | | --
* | Merge branch 'justus/pyme3'Justus Winter2016-05-1757-5/+6360
|\ \ | |/ |/|
| * python: Clean up examples.Justus Winter2016-05-1710-43/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/delkey.py: Clean up example. * lang/python/examples/encrypt-to-all.py: Likewise. * lang/python/examples/genkey.py: Likewise. * lang/python/examples/inter-edit.py: Likewise. * lang/python/examples/sign.py: Likewise. * lang/python/examples/signverify.py: Likewise. * lang/python/examples/simple.py: Likewise. * lang/python/examples/t-edit.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. * lang/python/pyme/__init__.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Import GPGMEError.Justus Winter2016-05-171-1/+1
| | | | | | | | | | | | | | | | * pyme/core.py: Import GPGMEError. Fixes c5d118b2. Signed-off-by: Justus Winter <[email protected]>
| * python: Port more tests.Justus Winter2016-05-174-1/+166
| | | | | | | | | | | | | | | | | | * lang/python/Makefile.am: Add bits from the c test suite. * lang/python/support.py: New file. * lang/python/t-decrypt.py: Likewise. * lang/python/t-encrypt.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Share generated methods between objects.justus/pyme3Justus Winter2016-05-122-10/+18
| | | | | | | | | | | | | | | | * lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch the class. * lang/python/tests/t-wrapper.py: Demonstrate the sharing. Signed-off-by: Justus Winter <[email protected]>
| * python: Raise exceptions on write errors.Justus Winter2016-05-122-1/+8
| | | | | | | | | | | | | | * lang/python/pyme/core.py (Data.write): Handle errors. * lang/python/pyme/errors.py (GPGMEError.fromSyserror): New function. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix writing to data buffers.Justus Winter2016-05-124-3/+71
| | | | | | | | | | | | | | | | | | * lang/python/gpgme.i: Add typemap for buffers. * lang/python/pyme/core.py (Data.write): Fix function. * lang/python/tests/Makefile.am: Add new test. * lang/python/tests/t-data.py: New file. Signed-off-by: Justus Winter <[email protected]>
| * python: Add a test suite.Justus Winter2016-05-124-1/+47
| | | | | | | | | | | | | | | | | | * configure.ac: Add new Makefile. * lang/python/Makefile.am: Add subdirectory. * lang/python/tests/Makefile.am: New file. * lang/python/tests/t-wrapper.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Cache generated wrapper functions.Justus Winter2016-05-121-3/+6
| | | | | | | | | | | | | | * lang/python/util.py (GpgmeWrap.__getattr__): Cache generated wrapper functions. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix function invocation.Justus Winter2016-05-121-1/+1
| | | | | | | | | | | | | | * lang/python/pyme/core.py (Data.new_from_fd): Fix function invocation. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix name of exception, make slot methods explicit.Justus Winter2016-05-121-1/+18
| | | | | | | | | | | | | | | | | | * lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception, add docstring. (GpgmeWrapper._getnameprepend): New function. (GpgmeWrapper._errorcheck): Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Handle interpreter shutdown.Justus Winter2016-05-121-8/+22
| | | | | | | | | | | | | | | | | | * lang/python/pyme/core.py: Avoid races at interpreter shutdown. This silences the most annoying occurrences, however this problem also affects the SWIG generated code, which might indicate that the real problem is somewhere else. If so, this change can be easily reverted. Signed-off-by: Justus Winter <[email protected]>
| * python: Make test case more robust.Justus Winter2016-05-121-0/+4
| | | | | | | | | | | | * lang/python/examples/t-edit.py: Check if key is found. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix type translation.Justus Winter2016-05-123-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | * lang/python/gpgme.i: Adjust to Python3's string type being 'Unicode', not 'bytes'. Fix type checking. * lang/python/core.py (Data.write): Add docstring mentioning the expected type of parameter 'buffer'. (Data.read): Adjust read loop. Also, use a saner chunk size, and join all chunks at the end instead of adding them. * lang/python/examples/simple.py: Adjust example. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix simple example.Justus Winter2016-05-111-1/+2
| | | | | | | | | | | | | | * lang/python/examples/simple.py: Flush stdout, encode name as UTF-8 before passing it to GPGME. Signed-off-by: Justus Winter <[email protected]>
| * python: Integrate into the build system.Justus Winter2016-05-115-31/+294
| | | | | | | | | | | | | | | | | | | | * configure.ac: Make Python bindings configurable, add new Makefile. * lang/python/Makefile.am: New file. * lang/python/setup.py: Integrate into the build system. * m4/ax_pkg_swig.m4: New file from the autoconf archive. * m4/m4_ax_swig_python.m4: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: PEP8 fixes.Justus Winter2016-05-104-33/+38
| | | | | | | | | | | | Cherry picked from 0267c151. Signed-off-by: Justus Winter <[email protected]>
| * python: Delete trailing whitespace.Justus Winter2016-05-1014-78/+74
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * python: Drop Debian packaging.Justus Winter2016-05-107-261/+0
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * python: Rename bindings.Justus Winter2016-05-1054-1/+1
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * Merge branch 'master' into justus/pyme3Justus Winter2016-05-1064-979/+3293
| |\
| * | More GTK2 removalpyme3Ben McGinnes2015-08-022-7003/+0
| | | | | | | | | | | | | | | * Missed a couple of files, these 2 go for the same reason as the previous 3.
| * | Removed GUI examplesBen McGinnes2015-08-023-2065/+0
| | | | | | | | | | | | | | | | | | | | | * GUI examples written with pygtk, which has not been ported to Python 3 and won't be as it is for GTK2 and GNOME is moving to GTK3. * New GUI examples may be required in future using any of several GUI frameworks (e.g. wxPython, PyQt, PySide, PyGObject, etc.).
| * | Python 3 port of PyMEBen McGinnes2015-05-162-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Port of PyME 0.9.0 for Python 2 to Python 3 along with most of the example scripts. * Intended to be developed in parallel with the original Python 2 version until such time as a rewrite of GPGME leads to developing an IO API in Python 3 from scratch. * Python 3 PyME and API maintainer has entered, stage left with current GPG key ID 0x321E4E2373590E5D, primary fingerprint is "DB47 24E6 FA42 86C9 2B4E 55C4 321E 4E23 7359 0E5D" and signing subkey fingerprint is "B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C" for future reference with git commit signatures.