aboutsummaryrefslogtreecommitdiffstats
path: root/lang (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-09-21cpp: Avoid missing returns in non-void functionsAndreas Stieger3-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]>
2016-09-21python: Create install dir.Werner Koch1-0/+1
* lang/python/Makefile.am (install-exec-local): Create dir. Signed-off-by: Werner Koch <[email protected]>
2016-09-20tests: Make "make -j distcheck" work in Python.Werner Koch2-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]>
2016-09-20tests: Use --batch for gpg import.Werner Koch1-3/+3
* 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]>
2016-09-20tests: Improve portability.Werner Koch2-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]>
2016-09-19qt: Improve READMEAndre Heinecke1-15/+105
* lang/qt/README: Add more content. Clearly note license difference.
2016-09-19cpp: Improve READMEAndre Heinecke1-22/+63
* lang/cpp/README: Add more content, move license to bottom.
2016-09-19python: Improve metadata and READMEs.Justus Winter3-21/+24
-- Signed-off-by: Justus Winter <[email protected]>
2016-09-19qt: Add debug output for testTofuPolicyAndre Heinecke1-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.
2016-09-16qt: Add test for setting tofu policyAndre Heinecke1-0/+36
* lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): New.
2016-09-16qt: Add job for tofupolicyAndre Heinecke7-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.
2016-09-16cpp: Add support for gpgme_op_tofu_policyAndre Heinecke2-0/+35
* src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): New.
2016-09-16cpp: Declare sizes of tofu-info enumsAndre Heinecke1-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.
2016-09-16cpp: Silence use of deprecated function warning.Werner Koch1-0/+9
* lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning. Signed-off-by: Werner Koch <[email protected]>
2016-09-16core: Document the version a function has been deprecated.Werner Koch1-1/+1
* 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]>
2016-09-16python: Release the GIL during calls into GPGME.Justus Winter2-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]>
2016-09-16python: Adapt to 'gpgme_op_interact'.Justus Winter8-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]>
2016-09-14python: Clarify that we support Python 2.7 too.Justus Winter3-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]>
2016-09-14python: Trim imports.Justus Winter4-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]>
2016-09-14python: Improve error handling.Justus Winter1-2/+12
* lang/python/gpgme.i (gpgme_engine_info_t): Improve error handling. Signed-off-by: Justus Winter <[email protected]>
2016-09-14python: Adapt to TOFU changes.Justus Winter1-4/+1
* lang/python/pyme/results.py (TofuInfo): Drop. (Signature): The TOFU information moved to the key. Signed-off-by: Justus Winter <[email protected]>
2016-09-14python: Build for both Python2 and Python3.Justus Winter3-9/+122
* 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]>
2016-09-14python: Import from __future__ to align behavior of Python 2.7.Justus Winter59-0/+177
-- Signed-off-by: Justus Winter <[email protected]>
2016-09-14python: Use more generic shebang.Justus Winter38-38/+38
-- Signed-off-by: Justus Winter <[email protected]>
2016-09-13python: Handle slight differences between Python 2 and 3.Justus Winter6-32/+61
* 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 <[email protected]>
2016-09-13python: Fix types and error handling.Justus Winter1-11/+26
* lang/python/helpers.c (_pyme_edit_cb): Drop the const. (_pyme_assuan_{data,inquire,status}_cb): Fix error handling. Signed-off-by: Justus Winter <[email protected]>
2016-09-12python: Avoid Python3-only form of super().Justus Winter1-4/+5
* 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 <[email protected]>
2016-09-12python: Make type translation compatible with Python 2.7.Justus Winter2-13/+78
* lang/python/gpgme.i: Avoid functions not available in Python 2.7. * lang/python/helpers.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
2016-09-12python: Avoid hardcoding the interpreter.Justus Winter1-2/+2
* lang/python/setup.py.in: Avoid hardcoding the interpreter. Signed-off-by: Justus Winter <[email protected]>
2016-09-12python: Do not rely on subprocess.DEVNULL.Justus Winter1-2/+7
* lang/python/setup.py.in: Do not rely on subprocess.DEVNULL. Signed-off-by: Justus Winter <[email protected]>
2016-09-12tests: Make signature notation test compatible with older GnuPGs.Justus Winter1-1/+10
* 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 <[email protected]>
2016-09-12qt: Fix some includesAndre Heinecke3-3/+7
* 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.
2016-09-12qt: Fix tofu test.Justus Winter1-6/+6
* lang/qt/tests/t-tofuinfo.cpp: Adjust member names. Fixes-commit: 120b1478 Signed-off-by: Justus Winter <[email protected]>
2016-09-07core,cpp: Extend the TOFU information.Werner Koch2-8/+35
* 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 <[email protected]>
2016-09-05qt: Clarify comment and strings in tofuinfo testAndre Heinecke1-4/+8
* lang/qt/tests/t-tofuinfo.cpp (testTofuSignCount) (testTofuKeyList): Ensure distinct messages. Clarify comment.
2016-09-05qt: Enable signcount checks in tofuinfo testAndre Heinecke1-12/+27
* lang/qt/tests/t-tofuinfo.cpp: Enable checks for signcount. -- Signcount for userIDs works now as expected with gnupg 2.1.16.
2016-09-05cpp: Add convenience update function to a keyAndre Heinecke2-0/+28
* 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)
2016-09-05cpp: Add ostream operators for key and uidAndre Heinecke2-0/+42
* 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.
2016-09-05qt: Add missing header redirectionAndre Heinecke2-3/+13
* 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++.
2016-09-05qt: Include cpp before core directoryAndre Heinecke1-1/+1
* 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.
2016-08-25qt: Fix 2.1 t-support copyAndre Heinecke1-1/+3
* lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy.
2016-08-25qt: Fix and extend TofuInfo test.Andre Heinecke1-10/+51
* lang/qt/tests/t-tofuinfo.cpp: Delete executed jobs. (testTofuKeyList): New. (testSupported): Activate for 2.1.16 (signAndVerify): Disable sigcount tests.
2016-08-25qt: Fix keyring copy in testsAndre Heinecke3-3/+3
* 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.
2016-08-25qt: Add generic flag support for keylistjobsAndre Heinecke3-1/+10
* 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.
2016-08-25qt: Ensure that current src dir is included firstAndre Heinecke1-2/+3
* 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.
2016-08-25cpp: Add WithTofu Keylist ModeAndre Heinecke3-1/+6
* 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.
2016-08-25qt: Fix tofuinfo test when gpg is gpg2Andre Heinecke4-10/+30
* 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.
2016-08-25qt: Remove unused variable in testAndre Heinecke1-2/+0
* t-wkspublish.cpp (testWKSPublishCreate): Remove context.
2016-08-25qt: Add test for wkspublishjobAndre Heinecke2-3/+284
* 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.
2016-08-25qt: Add WKSPublishJobAndre Heinecke7-3/+388
* 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.