aboutsummaryrefslogtreecommitdiffstats
path: root/lang (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-08-16TODO stuffBen McGinnes1-0/+8
* Expanded the documentation section to reflect the quandary with quality documentation.
2016-08-16Historical RecordBen McGinnes1-6/+26
* Minor grammatical fixes. * Added paragraph on Justus' updates. * Rewrote PyPI section as it is now available there (as pyme3).
2016-08-16Spelling fixBen McGinnes1-1/+1
* Changed binginds to bindings. :)
2016-08-12Qt: Add test for progress signal of encryptjobAndre Heinecke1-0/+62
* lang/qt/tests/t-encrypt.cpp (testProgress): New. -- This tests that a ByteArray IODevice now gives proper progress signals.
2016-08-12Cpp: Provide size-hint for seekable and mem dataAndre Heinecke1-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.
2016-08-12Qt: Fix defaultkeygenerationjob buildAndre Heinecke1-0/+2
* lang/qt/src/defaultkeygenerationjob.cpp: Include moc.
2016-08-11Qt: Add DefaultKeyGenerationJobAndre Heinecke3-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]
2016-08-11Qt: Ensure all public classes are exportedAndre Heinecke13-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]
2016-08-11Qt: Add KeyForMailboxJobAndre Heinecke9-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.
2016-08-10build: Declare all languages for make dist.Werner Koch1-0/+1
* lang/Makefile.am (DIST_SUBDIRS): New. Signed-off-by: Werner Koch <[email protected]>
2016-08-10Cpp: Handle empty recipients consistentlyAndre Heinecke2-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.
2016-08-10Qt: Remove unused variableAndre Heinecke1-1/+1
* lang/qt/src/qgpgmerefreshkeysjob.cpp (slotStatus): Remove unused variable typ.
2016-08-10Qt: Create TestPassphraseProvider on stackAndre Heinecke2-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.
2016-08-10Cpp: Clarify ownership of provider classesAndre Heinecke1-0/+14
* lang/cpp/src/context.h: Note that the context does not take ownership of providers.
2016-08-10Qt: Fix t-keylist moc includeAndre Heinecke1-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.
2016-08-09Qt: Clean up debug output in testsAndre Heinecke1-2/+1
* lang/qt/tests/t-support.cpp: Remove accidentally commited debug output.
2016-08-09Qt: Add encryption test and refactor testsuiteAndre Heinecke8-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.
2016-08-09Qt: Add support for EncryptJobs with generic flagsAndre Heinecke6-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.
2016-08-09Cpp: Add support for all EncryptionFlagsAndre Heinecke2-1/+26
* lang/cpp/src/context.h (EncryptionFlags): Extend. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto.
2016-08-09Cpp: Fix simple symmetric encryptionAndre Heinecke1-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.
2016-08-08Prepend LD_LIBRARY_PATH for python testsAndre Heinecke1-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.
2016-08-05python: Clean up and modernize examples.Justus Winter14-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]>
2016-08-03python: Add a nicer interface to list keys.Justus Winter2-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]>
2016-08-02python: Add a flag identifying in-tree builds.Justus Winter4-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]>
2016-08-02python: Fix build system integration.Justus Winter1-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]>
2016-07-28python: Fix out-of-tree build.Justus Winter1-1/+1
* lang/python/MANIFEST.in: Add 'private.h'. Fixes-commit: 3d4dc3f0 Signed-off-by: Justus Winter <[email protected]>
2016-07-28python: Improve error handling.Justus Winter1-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]>
2016-07-28python: Drop superfluous imports and trim public interface.Justus Winter8-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]>
2016-07-28python: Rename compiled SWIG module.Justus Winter7-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]>
2016-07-28python: Rename exported functions.Justus Winter3-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]>
2016-07-28python: Rename private functions.Justus Winter4-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]>
2016-07-28python: Support the Assuan engine.Justus Winter7-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]>
2016-07-28python: Improve engine information handling.Justus Winter3-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]>
2016-07-28python: Add accessors for the protocol.Justus Winter1-0/+11
* lang/python/pyme/core.py (Context.__init__): Add 'protocol' parameter. (Context.protocol): New accessors. Signed-off-by: Justus Winter <[email protected]>
2016-07-28python: Expose less functions to the Python world.Justus Winter5-15/+46
* lang/python/Makefile.am (EXTRA_DIST, COPY_FILES): Add new file. * lang/python/gpgme.i: Include new file and add comments. * lang/python/helpers.c: Include new file. * lang/python/helpers.h: Move functions we do not need to expose... * lang/python/private.h: ... here. Signed-off-by: Justus Winter <[email protected]>
2016-07-15python: Make GPGME's version easily accessible.Justus Winter1-4/+3
* lang/python/pyme/version.py.in (gpgme_versionstr): New variable. Signed-off-by: Justus Winter <[email protected]>
2016-07-15python: Add an idiomatic interface.Justus Winter19-131/+773
* 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]>
2016-07-14Qt: Disable keylocate test for gnupg < 2.0.10Andre Heinecke1-0/+4
* lang/qt/tests/t-keylocate.cpp: Disable test for gnupg < 2.0.10
2016-07-14Cpp: Add EngineInfo::Version classAndre Heinecke2-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.
2016-07-14Qt: Fix usage of ignore-invalid-option in testsAndre Heinecke1-4/+4
* Makefile.am (pubring-stamp): Fix config.
2016-07-14Qt: Fix tests if gpg2 is gpgAndre Heinecke1-1/+7
* lang/qt/tests/Makefile.am (pubring-stamp): Loopback and provide passphrase on command line when importing.
2016-07-14python: Fix test.Justus Winter1-13/+5
* lang/python/tests/t-keylist.py: Do not assume key alpha is trusted yet. Signed-off-by: Justus Winter <[email protected]>
2016-07-14python: Drop bad category.Justus Winter1-1/+0
-- Signed-off-by: Justus Winter <[email protected]>
2016-07-13core: New GPGME_DATA_ENCODING_MIME.Werner Koch2-1/+4
* 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]>
2016-07-13Cpp: Add feature enum for new identifyAndre Heinecke2-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.
2016-07-12python: Port more tests.Justus Winter5-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]>
2016-07-12python: Improve python packaging.Justus Winter2-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]>
2016-07-12Qt: Install CamelCase forward includesAndre Heinecke1-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.
2016-07-12Qt: Export VerifyDetachedJobAndre Heinecke1-1/+1
* lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Export it.
2016-07-12Qt/Cpp: Add version headersAndre Heinecke4-2/+69
* 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.