aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* python: Add an idiomatic interface.Justus Winter2016-07-1520-132/+774
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Bump required Python version. * lang/python/pyme/__init__.py: Update docstring. Import Context and Data. * lang/python/pyme/core.py (Context.encrypt): New function. (Context.decrypt): Likewise. (Context.sign): Likewise. (Context.verify): Likewise. * lang/python/pyme/errors.py: Add new errors. * lang/python/pyme/util.py (process_constants): Rework and return the inserted keys. * lang/python/tests/Makefile.am (EXTRA_DIST): Add new keys. * lang/python/tests/encrypt-only.asc: New file. * lang/python/tests/sign-only.asc: Likewise. * lang/python/tests/initial.py: Mark key 'Alpha' as trusted, import new keys. * lang/python/tests/support.py: Add fingerprints of known keys. (in_srcdir): New function. (print_data): Handle bytes too. (mark_key_trusted): New function. * lang/python/tests/t-decrypt-verify.py: Adjust test. Test idiomatic interface. * lang/python/tests/t-decrypt.py: Test idiomatic interface. * lang/python/tests/t-encrypt-sign.py: Likewise. * lang/python/tests/t-encrypt-sym.py: Likewise. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-idiomatic.py: Simplify. * lang/python/tests/t-keylist.py: Adjust to newly trusted key. * lang/python/tests/t-sign.py: Likewise. Test idiomatic interface. * lang/python/tests/t-signers.py: Likewise. * lang/python/tests/t-verify.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* Qt: Disable keylocate test for gnupg < 2.0.10Andre Heinecke2016-07-141-0/+4
| | | | * lang/qt/tests/t-keylocate.cpp: Disable test for gnupg < 2.0.10
* Cpp: Add EngineInfo::Version classAndre Heinecke2016-07-142-0/+61
| | | | | | * lang/cpp/src/engineinfo.cpp (EngineInfo::engineVersion): New. * lang/cpp/src/engineinfo.h (EngineInfo::engineVersion): Declare. (EngineInfo::Version): Small helper to work with versions.
* Qt: Fix usage of ignore-invalid-option in testsAndre Heinecke2016-07-141-4/+4
| | | | * Makefile.am (pubring-stamp): Fix config.
* Qt: Fix tests if gpg2 is gpgAndre Heinecke2016-07-141-1/+7
| | | | | * lang/qt/tests/Makefile.am (pubring-stamp): Loopback and provide passphrase on command line when importing.
* python: Fix test.Justus Winter2016-07-141-13/+5
| | | | | | | * lang/python/tests/t-keylist.py: Do not assume key alpha is trusted yet. Signed-off-by: Justus Winter <[email protected]>
* python: Drop bad category.Justus Winter2016-07-141-1/+0
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* build: Update config.{guess,sub} to {2016-05-15,2016-06-20}.Werner Koch2016-07-132-77/+128
| | | | | | | * build-aux/config.guess: Update. * build-aux/config.sub: Update. Signed-off-by: Werner Koch <[email protected]>
* core: New GPGME_DATA_ENCODING_MIME.Werner Koch2016-07-138-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_DATA_ENCODING_MIME): New. * src/data.c (gpgme_data_set_encoding): Adjust check. * src/engine-gpg.c (have_gpg_version): New. (gpg_encrypt, gpg_encrypt_sign): Pass flag '--mimemode'. (gpg_sign): Ditto. * lang/cpp/src/data.h (GpgME): Add MimeEncoding. * lang/cpp/src/data.cpp (encoding, setEncoding): Support MimeEncoding. * src/gpgme-tool.c (server_data_encoding): Add flag --mime. -- This feature allows an application to declare that the encrypted or signed data is a valid MIME part. What is missing is a way to return that information to the application after decryption/verification. This can be done by setting the encoding of the output data object; however this requires some internal additions to our processing model. Signed-off-by: Werner Koch <[email protected]>
* core: Pass the engine's version string to the engine's new function.Werner Koch2016-07-139-9/+42
| | | | | | | | | | | | | | | | | * src/engine-backend.h (engine_ops): Add arg 'version' to NEW. * src/engine-assuan.c (llass_new): Add dummy arg 'version'. * src/engine-g13.c (g13_new): Ditto. * src/engine-gpgconf.c (gpgconf_new): Ditto. * src/engine-gpgsm.c (gpgsm_new): Ditto. * src/engine-spawn.c (engspawn_new): Ditto. * src/engine-uiserver.c (uiserver_new): Ditto. * src/engine.c (_gpgme_engine_new): Pass version string to the new function. * src/engine-gpg.c (struct engine_gpg): Add field 'version'. (gpg_new): Add arg 'version'. (gpg_release): Free VERSION. Signed-off-by: Werner Koch <[email protected]>
* Cpp: Add feature enum for new identifyAndre Heinecke2016-07-132-0/+3
| | | | | | | | | | | * lang/cpp/src/context.cpp (supported_features2): Add BinaryAndFineGrainedIdentify * lang/cpp/src/global.h (Feature2): ditto. -- This is mostly for compatible code with KF5::Gpgmepp where there is no hard requirement against gpgme 1.7. With 1.7 a version check would also suffice.
* python: Port more tests.Justus Winter2016-07-125-6/+335
| | | | | | | | | | | | | * lang/python/pyme/core.py (Context.op_keylist_all): Add missing 'op_keylist_end'. (Context.op_trustlist_all): Fix function. Add missing 'op_trustlist_end'. * lang/python/tests/Makefile.am (pytests): Add new files. * lang/python/tests/t-import.py: New file. * lang/python/tests/t-keylist.py: Likewise. * lang/python/tests/t-trustlist.py: Check alternate interface. Signed-off-by: Justus Winter <[email protected]>
* python: Improve python packaging.Justus Winter2016-07-122-3/+26
| | | | | | | * lang/python/Makefile.am: Sign source releases, and upload them. * lang/python/setup.py.in: Add categories. Signed-off-by: Justus Winter <[email protected]>
* m4: Don't set fpic for qt on windowsAndre Heinecke2016-07-121-2/+4
| | | | | | | | * m4/qt.m4 (FIND_QT): Do not set fpic for windows. -- Otherwise each compile call will result in a warning that fpic is ignored for windows.
* m4: Use LIBS instead of LDFLAGS for Qt libsAndre Heinecke2016-07-121-3/+3
| | | | | | | | * m4/qt.m4: Modify LIBS instead of LDFLAGS for link test. -- The test would otherwise fail when building for windows because the link order was wrong.
* Bump version to 1.7.0Andre Heinecke2016-07-121-2/+2
| | | | | | | | | * configure.ac(mym4_version_minor), (mym4_version_micro): Next release will be 1.7.0 -- This was already mentioned in NEWS but acidentally not changed in configure.ac
* Qt: Install CamelCase forward includesAndre Heinecke2016-07-121-2/+40
| | | | | | | | | | | | * lang/qt/src/Makefile.am (camelcase_headers): New. Create and install CamelCase headers. -- For Qt Libraries it is a common pattern that headers are installed additionally under their Namespace / Class Name so that automated inclusion works once a class is used in code. This was also done for QGpgME headers when they lived in Libkleo so this increases compatibility.
* Qt: Export VerifyDetachedJobAndre Heinecke2016-07-121-1/+1
| | | | * lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Export it.
* Qt/Cpp: Add version headersAndre Heinecke2016-07-125-2/+71
| | | | | | | | | | | * lang/cpp/src/gpgmepp_version.h.in, lang/qt/src/qgpgme_version.h.in: New. Version information. * lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them. * configure.ac: Configure them. -- The version headers are common practice in KDE Frameworks and were installed for KF5Gpgmepp and Libkleo respectively.
* Qt/Cpp: Add license blurb to export headersAndre Heinecke2016-07-122-0/+40
| | | | | * lang/cpp/src/gpgmepp_export.h, lang/qt/src/qgpgme_export.h: Add license blurb.
* python: Fix distcheck.Justus Winter2016-07-111-0/+2
| | | | | | * lang/python/Makefile.am (EXTRA_DIST): Add missing files. Signed-off-by: Justus Winter <[email protected]>
* m4: Add compile / link check for qtAndre Heinecke2016-07-111-0/+22
| | | | | | | | | | * m4/qt.m4 (FIND_QT): Check if a qt application can be compiled and linked. -- In case gpgme is cross compiled pkg-config may pick up qt for the build system and not for the host system. To avoid that we check that we can compile a qt program for host.
* python: Enable out-of-tree build of pyme bindings.Justus Winter2016-07-114-29/+99
| | | | | | | | | | | * lang/python/MANIFEST.in: Update manifest template. * lang/python/Makefile.am: Copy more files, move generation of files to Python build script, add 'sdist' target to build a Python source distribution. * lang/python/gpgme-h-clean.py: Add code to build 'errors.i'. * lang/python/setup.py.in: Generate files, enable out-of-tree builds. Signed-off-by: Justus Winter <[email protected]>
* python: Do not depend on access to internal data structures.Justus Winter2016-07-112-45/+76
| | | | | | | | * lang/python/gpgme.i (gpgme_data_t): Rework so that it works without access to the definition of 'struct gpgme_data'. * lang/python/helpers.c (object_to_gpgme_data_t): Add assertion. Signed-off-by: Justus Winter <[email protected]>
* python: Make result wrapping backwards compatible.Justus Winter2016-07-111-5/+4
| | | | | | * lang/python/pyme/results.py (Result.__init__): Skip missing fields. Signed-off-by: Justus Winter <[email protected]>
* Qt: Fix memleaks in testsAndre Heinecke2016-07-113-0/+20
| | | | | | | | | | * lang/qt/tests/t-keylist.cpp(cleanupTestCase): Ensure that posted events are handled for autodeletion. (testSingleKeylistSync): delete job. * lang/qt/tests/t-ownertrust.cpp(cleanupTestCase): Ditto * lang/qt/tests/t-ownertrust.cpp(testChangeOwnerTrust): Delete keylistjobs. * lang/qt/tests/t-keylocate.cpp(cleanupTestCase): Ditto
* Qt: Add some general Protocol documentationAndre Heinecke2016-07-111-0/+35
| | | | | | | * lang/qt/src/protocol.h (Protocol): Add doc. -- This explicitly documents that syncs run with exec need deletion.
* Qt: Disable t-tofuinfo testsAndre Heinecke2016-07-111-5/+1
| | | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Disable tests. -- Even with the wait this test could fail and anyway the delay was not nice. So we remove the wait hack and just wait for the bug (2405) to be fixed in GnuPG or GpgME core.
* src: Fix error handling.Justus Winter2016-07-081-2/+7
| | | | | | | * src/encrypt.c (encrypt_status_handler): Fix error handling, || conflates errors. Signed-off-by: Justus Winter <[email protected]>
* python: Fix raising stashed exceptions.Justus Winter2016-07-081-1/+7
| | | | | | | | | Fixes an issue with newer versions of Python. * lang/python/helpers.c (pygpgme_raise_callback_exception): Be more careful when restoring the exception. Signed-off-by: Justus Winter <[email protected]>
* python: Fix distcheck.Justus Winter2016-07-075-23/+68
| | | | | | | | | | | | | | * lang/python/INSTALL: Drop obsolete file. * lang/python/Makefile.am (EXTRA_DIST): Add missing files. (CLEANFILES): Remove generated files. (clean-local): Fix permissions of copied files. * lang/python/tests/Makefile.am (TESTS): Use our own setup and teardown scripts. (EXTRA_DIST): Add missing files. * lang/python/tests/final.py: New file. * lang/python/tests/initial.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* qt: Fix distcheck.Justus Winter2016-07-072-2/+6
| | | | | | | | * lang/qt/src/Makefile.am (qgpgme_headers): Add missing file. (CLEANFILES): Add generated file. * lang/qt/tests/Makefile.am (clean-local): Remove private keys. Signed-off-by: Justus Winter <[email protected]>
* cpp: Fix distcheck.Justus Winter2016-07-071-0/+2
| | | | | | * lang/cpp/src/Makefile.am (CLEANFILES): Remove generated file. Signed-off-by: Justus Winter <[email protected]>
* Qt: Add test for publicKeyAlgorithmAsStringAndre Heinecke2016-07-061-0/+22
| | | | * lang/qt/tests/t-keylist.cpp (testPubkeyAlgoAsString): New.
* Cpp: Expose gpgme_pubkey_algo_nameAndre Heinecke2016-07-062-1/+15
| | | | | | | * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithmAsString): New static variant. * lang/cpp/src/key.h: Declare function. Clarify comment about name mismatch.
* Qt: Add check for pubkeyAlgo in t-keylistAndre Heinecke2016-07-061-0/+4
| | | | | * lang/qt/tests/t-keylist.cpp (testSingleKeyListSync): Check pubkeyAlgo.
* Cpp: Add PubkeyAlgo enumAndre Heinecke2016-07-062-3/+19
| | | | | | * lang/cpp/src/key.h (Subkey::PubkeyAlgo): New enum. (Subkey::publicKeyAlgorithm): Change return type. * lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithm): Use enum.
* Qt: Fix include order when buildin testAndre Heinecke2016-07-061-4/+4
| | | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include cpp before gpgme src directory. -- This fixes a problem where context.h would be picked up from gpgme/src instead of including the context.h from gpgme++.
* Revert "Qt: More robust lookup of Cpp's context.h"Andre Heinecke2016-07-061-1/+1
| | | | | | | | | | * lang/qt/src/threadedjobmixin.h: Revert using full path for context.h -- This reverts commit 47bfbc9026b49b9918359af5fcc1621aab0d1065 as it causes problems depending on the include path. The proper fix will be to ensure that cpp/src is included before gpgme/src.
* Qt: Fix test build with Qt < 5.4.0Andre Heinecke2016-07-053-4/+4
| | | | | | | * lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp: Use old style SIGNAl syntax for QSignalSpy
* Qt: More robust lookup of Cpp's context.hAndre Heinecke2016-07-051-1/+1
| | | | | | | | | * lang/qt/src/threadedjobmixin.h: When building qgpgme look for context.h in the full cpp subdirectory. -- Gpgme core also contains a context.h that can lead to confusion otherwise.
* w32: Fallback to 2.1 reg key for gpgconf searchAndre Heinecke2016-07-051-3/+14
| | | | | | | | | * src/w32-util.c (_gpgme_get_gpgconf_path): Fallback to 2.1 installer registry key. -- Finding gpgconf is utterly important so we should be as compatible as possible.
* Doc: Document pinentry modeAndre Heinecke2016-07-041-0/+56
| | | | | | | * doc/gpgme.texi (Passphrase Callback): Document as context attribute. (gpgme_set_passphrase_cb): Note that this requires LOOPBACK mode with GnuPG 2.1.
* Qt: Add testTofuSignCountAndre Heinecke2016-07-041-1/+83
| | | | | | | | | * src/lang/qt/tests/t-tofuinfo.cpp(testTofuSignCount): New. (initTestCase): Set gpg-agent loopback pinentry config. (signAndVerify): Helper for tofuTestSignCount. -- Also needs the wait code because of GnuPG-Bug-Id: 2405
* Qt: Add test passphrase providerAndre Heinecke2016-07-042-1/+48
| | | | | * lang/qt/tests/t-support.h (TestPassphraseProvider): New. * lang/qt/tests/Makefile.am (t_tofuinfo_SOURCES): Add t-support.h
* Cpp: Add support for TOFU_CONFLICT sigsumAndre Heinecke2016-07-042-1/+6
| | | | | | * lang/cpp/src/verificationresult.cpp (GpgME::Signature::Summary): Handle TOFU_CONFLICT. * lang/cpp/src/verificationresult.h (Summary): Add TofuConflict.
* Cpp: Add support for pinentry_modeAndre Heinecke2016-07-042-0/+50
| | | | | | * lang/cpp/src/context.cpp (Context::pinentryMode): Return mode. (Context::setPinentryMode): Set mode. * lang/cpp/src/context.h (PinentryMode): Add enum.
* Qt: Add test for TofuInfoAndre Heinecke2016-07-012-3/+167
| | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: New. * lang/qt/tests/Makefile.am: Update accordingly. -- The test currently contains a workaround for GnuPG-Bug-Id 2405
* Cpp: Add TofuInfo to signaturesAndre Heinecke2016-07-016-3/+339
| | | | | | | | | | | | * lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h: New class. * lang/cpp/src/verificationresult.cpp (Signature::tofuInfo): New. (VerificationResult::Private): Handle tofu info. (GpgME::operator<<(std::ostream &os, const Signature &sig)): Include TofuInfo in dump. * lang/cpp/src/verificationresult.h (Signature::tofuInfo): New. * lang/cpp/src/Makefile.am (main_sources, gpgmepp_headers): Add new files. * configure.ac (LIBGPGMEPP_LT_REVISION): Bump for new API.
* core: Clarify documentation of tofu_stats addressAndre Heinecke2016-07-011-1/+6
| | | | | | | | * src/gpgme.h.in: Mention that Address is not always in addr-spec. -- The old comment made it look like you could always expect the address to be parsable as a mailbox address.