aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into ben-minor-fixesben/minor-docs-fixesBen McGinnes2016-08-1710-20/+103
|\
| * core: New global flag "require-gnupg".Werner Koch2016-08-166-6/+61
| | | | | | | | | | | | | | | | | | | | | | * src/gpgme.c (gpgme_set_global_flag): Add flag. * src/engine.c (engine_minimal_version): New variable. (_gpgme_set_engine_minimal_version): New function. (gpgme_get_engine_info): Check that flag. * tests/run-keylist.c (main): New option --require-gnupg. Signed-off-by: Werner Koch <[email protected]>
| * core: Simplify setting of dummy versions.Werner Koch2016-08-165-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/engine.c (_gpgme_engine_info_release): Do not assert but free FILE_NAME. (gpgme_get_engine_info): Provide default for VERSION and REQ_VERSION. Use calloc instead of malloc. (_gpgme_set_engine_info): Ditto. * src/engine-assuan.c (llass_get_version): Return NULL. (llass_get_req_version): Ditto. * src/engine-spawn.c (engspawn_get_version): Ditto. (engspawn_get_req_version): Ditto. * src/engine-uiserver.c (uiserver_get_version): Ditto. (uiserver_get_req_version): Ditto. Signed-off-by: Werner Koch <[email protected]>
* | TODO stuffBen McGinnes2016-08-161-0/+8
| | | | | | | | | | * Expanded the documentation section to reflect the quandary with quality documentation.
* | Historical RecordBen McGinnes2016-08-161-6/+26
| | | | | | | | | | | | * Minor grammatical fixes. * Added paragraph on Justus' updates. * Rewrote PyPI section as it is now available there (as pyme3).
* | Spelling fixBen McGinnes2016-08-161-1/+1
|/ | | | * Changed binginds to bindings. :)
* Qt: Add test for progress signal of encryptjobAndre Heinecke2016-08-121-0/+62
| | | | | | | | * lang/qt/tests/t-encrypt.cpp (testProgress): New. -- This tests that a ByteArray IODevice now gives proper progress signals.
* Cpp: Provide size-hint for seekable and mem dataAndre Heinecke2016-08-121-0/+10
| | | | | | | | | * lang/cpp/src/data.cpp (GpgME::Data::Data): Set size-hint for mem and DataProvider based Data. -- This fixes the case that QGpgME did not have a total value for progress as the size was unknown.
* core: Make use of the "size-hint" in engine-gpg.Werner Koch2016-08-123-4/+134
| | | | | | | | | | | | | | * src/engine-gpg.c: Include data.h. (add_input_size_hint): New. (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign) (gpg_verify): Call new function, * tests/run-encrypt.c (status_cb): Print to stderr. (progress_cb): New.o (main): Add option --progress. Print full-status lines. Provide a size for the input data. Signed-off-by: Werner Koch <[email protected]>
* core: Add gpgme_data_set_flag to add more meta data to data objects.Werner Koch2016-08-128-0/+68
| | | | | | | | | | | * src/gpgme.h.in (gpgme_data_set_flag): New public function. * src/data.c (gpgme_data_set_flag): New. (_gpgme_data_get_size_hint): New. * src/data.h (strucy gpgme_data): Add field 'size_hint'. * src/gpgme.def, src/libgpgme.vers: Add new function. * src/conversion.c (_gpgme_string_to_off): New. Signed-off-by: Werner Koch <[email protected]>
* Add Python bindings to NEWS.Justus Winter2016-08-121-0/+2
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* Qt: Fix defaultkeygenerationjob buildAndre Heinecke2016-08-121-0/+2
| | | | * lang/qt/src/defaultkeygenerationjob.cpp: Include moc.
* Qt: Add DefaultKeyGenerationJobAndre Heinecke2016-08-113-4/+207
| | | | | | | | | | | | | | | | | | | * lang/qt/src/defaultkeygenerationjob.cpp, lang/qt/src/defaultkeygenerationjob.h: New. * lang/qt/src/Makefile.am: Update accordingly. -- The defaultkeygenerationjob makes it easier to just generate a key in the future this should probably use quick-gen key but since this is not exposed in gpgme we hardcode the defaults and do it with the params file. This is also the first job that uses a new and better architecture without backend abstraction and the pimpl pattern instead of a specialized subclass. This is an adoption of kde's libkleo commit f49b7157 Thanks [email protected]
* Qt: Ensure all public classes are exportedAndre Heinecke2016-08-1113-15/+29
| | | | | | | | | | | | | | | | | | | | * src/abstractimportjob.h, src/cryptoconfig.h, src/deletejob.h, src/exportjob.h, src/importfromkeyserverjob.h, src/importjob.h, src/keygenerationjob.h, src/keylistjob.h, src/listallkeysjob.h, src/refreshkeysjob.h, src/signencryptjob.h, src/specialjob.h, src/verifydetachedjob.h: Export classes. -- This is an adoption of kde's libkleo commit: d6a71a4e Thanks [email protected]
* Qt: Add KeyForMailboxJobAndre Heinecke2016-08-119-4/+399
| | | | | | | | | | | | | | | | * lang/qt/src/job.cpp: Include moc and make subclass. * lang/qt/src/keyformailboxjob.h, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.h: New. * lang/qt/tests/run-keyformailboxjob.cpp: New manual test. * lang/qt/tests/Makefile.am: Add run-keyformailboxjob. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add keyformailboxjob. -- The KeyForMailboxjob can be used to determine the best key to use to encrypt something to a given mail address.
* doc: Get rid of version.texiWerner Koch2016-08-104-3/+354
| | | | | | | | | | | | | | | | | * configure.ac (CC_FOR_BUILD): New. * doc/mkdefsinc.c: New. Taken from GnuPG and modified for gpgme. * doc/Makefile.am (EXTRA_DIST): Add defsincdate and mkdefsinc.c (BUILT_SOURCES): new. (gpgme.texi): New dependency. (mkdefsinc, defsincdate, defs.inc): New rules. (dist-hook): New. * doc/gpgme.texi: Include defs.inc. Remove version.texi. -- GnuPG-bug-id: 2352 That new system should also yield more approriate date infos for the manual.
* build: Declare all languages for make dist.Werner Koch2016-08-102-0/+4
| | | | | | * lang/Makefile.am (DIST_SUBDIRS): New. Signed-off-by: Werner Koch <[email protected]>
* core: Do not identify PNG files as PGP signatures.Werner Koch2016-08-101-0/+5
| | | | | | | | * src/data-identify.c (next_openpgp_packet): Blacklist PNG files. -- GnuPG-bug-id: 2314 Signed-off-by: Werner Koch <[email protected]>
* Cpp: Handle empty recipients consistentlyAndre Heinecke2016-08-102-38/+38
| | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::getKeysFromRecipients): New helper. (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) (Context::startCombinedSigningAndEncryption): Use new helper. * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add as private helper. -- bf776ce was incomplete as the code to handle recpients was duplicated four times. This is now unified and constently uses a nullptr instead of an empty array.
* core: Handle ENCRYPT_SYMMETRIC also for sig & encAndre Heinecke2016-08-101-4/+7
| | | | | * src/engine-gpg.c (gpg_encrypt_sign): Handle ENCRYPT_SYMMETRIC flag.
* Qt: Remove unused variableAndre Heinecke2016-08-101-1/+1
| | | | | * lang/qt/src/qgpgmerefreshkeysjob.cpp (slotStatus): Remove unused variable typ.
* Qt: Create TestPassphraseProvider on stackAndre Heinecke2016-08-102-4/+7
| | | | | | | | * lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp: Create TestPassphraseProvider on stack. -- Context does not delete the provider. This fixes ASAN errors.
* Cpp: Clarify ownership of provider classesAndre Heinecke2016-08-101-0/+14
| | | | | * lang/cpp/src/context.h: Note that the context does not take ownership of providers.
* tests: Fix memory leak.Justus Winter2016-08-101-0/+1
| | | | | | * tests/gpg/t-encrypt-mixed.c (main): Free 'text2'. Signed-off-by: Justus Winter <[email protected]>
* core: Ensure err is initalized in gpg_encryptAndre Heinecke2016-08-101-1/+1
| | | | * src/engine-gpg.c (gpg_encrypt): Initialize err.
* Qt: Fix t-keylist moc includeAndre Heinecke2016-08-101-1/+0
| | | | | | | | | * lang/qt/tests/t-keylist.cpp: Don't include t-support.moc -- Accidental leftover from trying to generate t-support moc from another cpp file. This was solved instead by a new rule to generate moc files from the header.
* Qt: Clean up debug output in testsAndre Heinecke2016-08-091-2/+1
| | | | | * lang/qt/tests/t-support.cpp: Remove accidentally commited debug output.
* Qt: Add encryption test and refactor testsuiteAndre Heinecke2016-08-098-46/+302
| | | | | | | | | | | | * lang/qt/tests/Makefile.am: Add t-encrypt and t-support. * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest): New. Class to handle common cleanup / init. * lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest. * lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric encryption. Mixed encryption test is disabled.
* Qt: Add support for EncryptJobs with generic flagsAndre Heinecke2016-08-096-22/+100
| | | | | | | | | | | | | | * lang/qt/src/encryptjob.h, lang/qt/src/signencryptjob.h, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp: Add start and exec overloads that accept generic EncryptFlags. -- While this technically is an ABI break (vtable change) there are no known classes outside qgpgme that inherit encryptjob or signencryptjob. And the new functions should be added to the bottom of the vtable.
* Cpp: Add support for all EncryptionFlagsAndre Heinecke2016-08-092-1/+26
| | | | | * lang/cpp/src/context.h (EncryptionFlags): Extend. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto.
* Cpp: Fix simple symmetric encryptionAndre Heinecke2016-08-091-1/+2
| | | | | | | | * lang/cpp/src/context.cpp (Context::encrypt): If no recipients are provided encrypt with NULL and not an empty array. -- Sending an empty array leads to an invalid argument error.
* core: Add support for mixed symmetric and asym encAndre Heinecke2016-08-097-7/+154
| | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_encrypt_flags_t): New flag GPGME_ENCRYPT_SYMMETRIC. * src/engine-gpg.c (gpg_encrypt): Also add --symmetric if the flag is given. * NEWS: Mention new flag. * tests/run-encrypt.c (show_usage): Extend for --symmetric. (main): Handle --symmetric. (main): Set passphrase_cb in loopback mode. (main): Fix encrypt call if no recipients are given. * tests/gpg/t-encrypt-mixed.c: New. * tests/gpg/Makefile.am (c_tests): Add new test. * doc/gpgme.texi: Document new flag.
* core: Let GPGME_PROTOCOL_ASSUAN pass Assuan comments through.Werner Koch2016-08-081-0/+1
| | | | | | | | * src/engine-assuan.c (llass_new): Set ASSUAN_CONVEY_COMMENTS, -- GnuPG-bug-id: 2429 Signed-off-by: Werner Koch <[email protected]>
* Prepend LD_LIBRARY_PATH for python testsAndre Heinecke2016-08-081-1/+1
| | | | | | | | | | | * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Prepend path instead of setting the value. -- This fixes the case where tools / libararies are needed for a working GnuPG system that are pointed to by LD_LIBRARY_PATH. E.g. GnuPG itself is installed in a custom prefix and PATH / LD_LIBRARY_PATH is set accordingly.
* python: Clean up and modernize examples.Justus Winter2016-08-0514-500/+360
| | | | | | | | | | | | | | | | | | | | * lang/python/examples/Examples.rst: Delete file. * lang/python/examples/t-edit.py: Likewise. This is actually a test case and has been moved to 'tests'. * lang/python/examples/assuan.py: New file. * lang/python/examples/decryption-filter.py: Likewise. * lang/python/examples/delkey.py: Modernize. * lang/python/examples/encrypt-to-all.py: Likewise. * lang/python/examples/exportimport.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/testCMSgetkey.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* core: Extend gpgme_subkey_t to carry the keygrip.Werner Koch2016-08-046-10/+76
| | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_subkey): Add file 'keygrip'. * src/key.c (gpgme_key_unref): Free KEYGRIP. * src/keylist.c (keylist_colon_handler): Parse GRP records. * src/engine-gpg.c (gpg_keylist_build_options): Do not use --with-fingerprint options for gpg versions >= 2.1.15. * tests/run-keylist.c (main): Print subkeys and keygrips. Signed-off-by: Werner Koch <[email protected]>
* python: Add a nicer interface to list keys.Justus Winter2016-08-032-1/+16
| | | | | | | * lang/python/pyme/core.py (Context.keylist): New method. * lang/python/tests/t-keylist.py: Test new method. Signed-off-by: Justus Winter <[email protected]>
* python: Add a flag identifying in-tree builds.Justus Winter2016-08-024-1/+24
| | | | | | | | | | * lang/python/helpers.c (pyme_in_tree_build): New variable. * lang/python/helpers.h (pyme_in_tree_build): New declaration. * lang/python/pyme/version.py.in (in_tree_build): New variable. * lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD' as appropriate. Signed-off-by: Justus Winter <[email protected]>
* python: Fix build system integration.Justus Winter2016-08-021-3/+17
| | | | | | | * lang/python/Makefile.am: Be more careful when cleaning the build directory, we must not delete the generated file 'pyme/version.py'. Signed-off-by: Justus Winter <[email protected]>
* doc: Document the Assuan protocol.Justus Winter2016-08-021-1/+97
| | | | | | | * doc/gpgme.texi: Document the Assuan protocol. GnuPG-bug-id: 2407 Signed-off-by: Justus Winter <[email protected]>
* doc: Fix formatting.Justus Winter2016-08-021-2/+2
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* python: Fix out-of-tree build.Justus Winter2016-07-281-1/+1
| | | | | | | * lang/python/MANIFEST.in: Add 'private.h'. Fixes-commit: 3d4dc3f0 Signed-off-by: Justus Winter <[email protected]>
* python: Improve error handling.Justus Winter2016-07-281-8/+18
| | | | | | | | * lang/python/pyme/core.py (Context.protocol): Check that the engine is usable before setting the protocol. (Context._errorcheck): Add missing functions. Signed-off-by: Justus Winter <[email protected]>
* src: Fix dummy engine versions.Justus Winter2016-07-283-6/+6
| | | | | | | | | | | | | | | Previously, 'gpgme_engine_check_version' failed for these protocols because the version parser failed to parse the dummy versions. * src/engine-assuan.c (llass_get_version): Use a version triple that the parser can understand. (llass_get_req_version): Likewise. * src/engine-spawn.c (engspawn_get_version): Likewise. (engspawn_get_req_version): Likewise. * src/engine-uiserver.c (uiserver_get_version): Likewise. (uiserver_get_req_version): Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Drop superfluous imports and trim public interface.Justus Winter2016-07-288-9/+27
| | | | | | | | | | | | | | | * lang/python/pyme/__init__.py: Avoid leaking low-level 'gpgme', make sure the main module looks nice and tidy, appease pyflakes. * lang/python/pyme/errors.py: Appease pyflakes. * lang/python/pyme/util.py: Avoid leaking low-level 'gpgme' into the module namespace. * lang/python/pyme/version.py.in: Likewise. * lang/python/tests/t-keylist.py: Drop superfluous imports. * lang/python/tests/t-sig-notation.py: Likewise. * lang/python/tests/t-sign.py: Likewise. * lang/python/tests/t-signers.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Rename compiled SWIG module.Justus Winter2016-07-287-115/+115
| | | | | | | | | | | | | | | | | Avoid the name pygpgme, as this is the name of another popular Python binding for GPGME. This commit renames the compiled Python module produced by SWIG. * lang/python/Makefile.am: Rename the compiled Python module. * lang/python/gpgme.i: Likewise. * lang/python/pyme/core.py: Likewise. * lang/python/pyme/errors.py: Likewise. * lang/python/pyme/util.py: Likewise. * lang/python/pyme/version.py.in: Likewise. * lang/python/setup.py.in: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Rename exported functions.Justus Winter2016-07-283-28/+28
| | | | | | | | | | | | | | Avoid the name pygpgme, as this is the name of another popular Python binding for GPGME. This commit renames all functions that are exported to the Python world. * lang/python/helpers.c: Rename all exported functions. * lang/python/helpers.h: Likewise. * lang/python/pyme/core.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Rename private functions.Justus Winter2016-07-284-72/+77
| | | | | | | | | | | | | | | | Avoid the name pygpgme, as this is the name of another popular Python binding for GPGME. This commit renames all functions that are not exported to the Python world. * lang/python/gpgme.i: Rename all private functions. * lang/python/helpers.c: Likewise. * lang/python/helpers.h: Likewise. * lang/python/private.h: Likewise. Also move the SWIG runtime helper prototypes here. Signed-off-by: Justus Winter <[email protected]>
* python: Support the Assuan engine.Justus Winter2016-07-287-1/+302
| | | | | | | | | | | | | | * lang/python/gpgme.i: Add typemaps for the Assuan protocol callbacks. * lang/python/helpers.c (_pyme_assuan_{data,inquire,status}_cb): New functions. * lang/python/private.h (_pyme_assuan_{data,inquire,status}_cb): New prototypes. * lang/python/pyme/core.py (Context.assuan_transact): New method. * lang/python/pyme/util.py (percent_escape): New function. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/t-protocol-assuan.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Improve engine information handling.Justus Winter2016-07-283-9/+54
| | | | | | | | | * lang/python/gpgme.i (gpgme_engine_info_t): Wrap engine infos. * lang/python/pyme/core.py (Context.engine_info): New property. (Context.{g,s}et_engine_info): Improve docstrings. * lang/python/pyme/results.py (EngineInfo): New class. Signed-off-by: Justus Winter <[email protected]>