aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* qt, cpp: Add additional copyright BSI notesAndre Heinecke2017-04-2566-8/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/Makefile.am, lang/cpp/src/Makefile.am, lang/cpp/src/callbacks.cpp, lang/cpp/src/callbacks.h, lang/cpp/src/configuration.cpp, lang/cpp/src/configuration.h, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_p.h, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data_p.h, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/defaultassuantransaction.h, lang/cpp/src/editinteractor.cpp, lang/cpp/src/editinteractor.h, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/encryptionresult.h, lang/cpp/src/engineinfo.cpp, lang/cpp/src/engineinfo.h, lang/cpp/src/error.h, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/eventloopinteractor.h, lang/cpp/src/exception.cpp, lang/cpp/src/exception.h, lang/cpp/src/global.h, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgadduserideditinteractor.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.h, lang/cpp/src/gpgmefw.h, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.h, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.h, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.h, lang/cpp/src/importresult.cpp, lang/cpp/src/importresult.h, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/interfaces/dataprovider.h, lang/cpp/src/interfaces/passphraseprovider.h, lang/cpp/src/interfaces/progressprovider.h, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keygenerationresult.h, lang/cpp/src/keylistresult.cpp, lang/cpp/src/keylistresult.h, lang/cpp/src/notation.h, lang/cpp/src/result.h, lang/cpp/src/result_p.h, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/scdgetinfoassuantransaction.h, lang/cpp/src/signingresult.cpp, lang/cpp/src/signingresult.h, lang/cpp/src/trustitem.cpp, lang/cpp/src/trustitem.h, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h, lang/cpp/src/vfsmountresult.cpp, lang/qt/Makefile.am, lang/qt/doc/Makefile.am, lang/qt/src/Makefile.am, lang/qt/src/defaultkeygenerationjob.h, lang/qt/tests/Makefile.am: Add missing copyright. -- Moving the qt / cpp bindings into GPGME contained global changes that modified nearly every source file. To reflect that the copyright year / note should also be updated.
* Change copyright from Intevation to BSIAndre Heinecke2017-04-25118-118/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/gpggencardkeyinteractor.cpp, lang/cpp/src/gpggencardkeyinteractor.h, lang/cpp/src/gpgmepp_export.h, lang/cpp/src/swdbresult.cpp, lang/cpp/src/swdbresult.h, lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h, lang/qt/src/abstractimportjob.h, lang/qt/src/adduseridjob.h, lang/qt/src/changeexpiryjob.h, lang/qt/src/changeownertrustjob.h, lang/qt/src/changepasswdjob.h, lang/qt/src/cryptoconfig.cpp, lang/qt/src/cryptoconfig.h, lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h, lang/qt/src/decryptjob.h, lang/qt/src/decryptverifyjob.h, lang/qt/src/deletejob.h, lang/qt/src/dn.cpp, lang/qt/src/dn.h, lang/qt/src/downloadjob.h, lang/qt/src/encryptjob.h, lang/qt/src/exportjob.h, lang/qt/src/hierarchicalkeylistjob.h, lang/qt/src/importfromkeyserverjob.h, lang/qt/src/importjob.h, lang/qt/src/job.cpp, lang/qt/src/job.h, lang/qt/src/keyformailboxjob.h, lang/qt/src/keygenerationjob.h, lang/qt/src/keylistjob.h, lang/qt/src/listallkeysjob.h, lang/qt/src/multideletejob.h, lang/qt/src/protocol.h, lang/qt/src/protocol_p.h, lang/qt/src/qgpgme_export.h, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmeadduseridjob.h, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmebackend.h, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeexpiryjob.h, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.h, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmechangepasswdjob.h, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptjob.h, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.h, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedeletejob.h, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmedownloadjob.h, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeexportjob.h, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.h, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmeimportjob.h, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.h, lang/qt/src/qgpgmekeygenerationjob.cpp, lang/qt/src/qgpgmekeygenerationjob.h, lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmekeylistjob.h, lang/qt/src/qgpgmelistallkeysjob.cpp, lang/qt/src/qgpgmelistallkeysjob.h, lang/qt/src/qgpgmenewcryptoconfig.cpp, lang/qt/src/qgpgmenewcryptoconfig.h, lang/qt/src/qgpgmerefreshkeysjob.cpp, lang/qt/src/qgpgmerefreshkeysjob.h, lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.h, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.h, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmesignjob.h, lang/qt/src/qgpgmesignkeyjob.cpp, lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmetofupolicyjob.h, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.h, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmeverifyopaquejob.h, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/qgpgmewkspublishjob.h, lang/qt/src/refreshkeysjob.h, lang/qt/src/signencryptjob.h, lang/qt/src/signjob.h, lang/qt/src/signkeyjob.h, lang/qt/src/specialjob.h, lang/qt/src/threadedjobmixin.cpp, lang/qt/src/threadedjobmixin.h, lang/qt/src/tofupolicyjob.h, lang/qt/src/verifydetachedjob.h, lang/qt/src/verifyopaquejob.h, lang/qt/src/wkspublishjob.h, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/t-config.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-various.cpp, lang/qt/tests/t-verify.cpp, lang/qt/tests/t-wkspublish.cpp, tests/gpg/t-encrypt-mixed.c, tests/gpg/t-thread-keylist-verify.c, tests/gpg/t-thread-keylist.c, tests/run-decrypt.c: Change Intevation GmbH copyright to BSI. -- This should make it more transparent where the BSI is the actual copyright holder as the code was mostly developed as part of a development contract.
* doc: Improve doc on passphrase_cb / pinentry modeAndre Heinecke2017-04-241-4/+8
| | | | | | | * doc/gpgme.texi (Passphrase Callback): Mention pinentry_mode and restrictions. (Pinentry Mode): Fix wording and clarify versions that need loopback mode for passphrase_cb to work.
* tests: Update encrypted sample files.Justus Winter2017-04-242-25/+22
| | | | | | | | | | * tests/gpg/cipher-1.asc: Update file. * tests/gpg/cipher-2.asc: Likewise. -- Convert the plaintext to UTF-8 and re-create the encrypted file. Fixes-commit: a11450eb048df79a3f2b00ebef6d7cab07ad5054 Signed-off-by: Justus Winter <[email protected]>
* python: Skip TOFU test if not supported by GnuPG.Justus Winter2017-04-112-0/+11
| | | | | | | | * lang/python/tests/support.py (have_tofu_support): New function. * lang/python/tests/t-quick-key-manipulation.py: Skip TOFU test if not supported by GnuPG. Signed-off-by: Justus Winter <[email protected]>
* python: use autoconf pre-processor when building via autoconfAlon Bar-Lev2017-04-112-0/+5
| | | | | | | * configure.ac: Add AC_PROG_CPP. * lang/python/Makefile.am: Set CPP environment for setup.py to use. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: fix run-tests missing python_libdirAlon Bar-Lev2017-04-111-1/+3
| | | | | | | * lang/python/tests/run-tests.py: Set python_libdir if --python-libdir is set. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Prune CLEANFILES.Justus Winter2017-04-101-3/+1
| | | | | | -- Fixes-commit: e7d9c0c3d773f826dbd2ed417d04e25c410f3374 Signed-off-by: Justus Winter <[email protected]>
* python: Fix distcheck.Justus Winter2017-04-101-2/+2
| | | | | | | | | * lang/python/Makefile.am (uninstall-local): Explicitly request the scheme 'posix_prefix'. On Python2.7 the default scheme is 'posix_local', breaking distcheck. Fixes-commit: 25e6444b3f4601c7821beab06bc4520deacb007b Signed-off-by: Justus Winter <[email protected]>
* python: Support alternatate libdir for testsAlon Bar-Lev2017-04-101-10/+15
| | | | | | | | | | | | * lang/python/tests/run-tests.py: Add --python-libdir optional parameter. -- This will make the python tests usable for downstream that build python module outside of autotools build system. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Read gpg-error.h using the pre-processorAlon Bar-Lev2017-04-101-25/+35
| | | | | | | | | | | | | | | * lang/python/setup.py.in: Read gpg-error.h using the pre-processor. -- The libgpg-error may be installed in multilib configuration in which there is a wrapper header at /usr/include that includes the actual header at /usr/include/*. This causes invalid errors.i generation. Let the pre-processor extract the header content instead reading it explicitly. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Remove unneeded stats copyAlon Bar-Lev2017-04-101-6/+0
| | | | | | | * lang/python/setup.py.in: errors.i, gpgme.h are generated and always newer than the original. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Remove usage of PYTHON_VERSIONSAlon Bar-Lev2017-04-103-15/+13
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove PYTHON_VERSIONS subst. * lang/python/Makefile.am: Use basename of python as builddir prefix. * lang/python/tests/run-tests.py: Likewise. -- Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go out of sync in some cases, for example in Gentoo where default python is 3.4 we get: PYTHON='/usr/bin/python2' PYTHONS='/usr/bin/python /usr/bin/python2' PYTHON_VERSIONS='2.7 3.4' We can use the basename of the python interpreter to achieve similar effect without having to sync indexes between these two variables. Signed-off-by: Alon Bar-Lev <[email protected]>
* tests: Do not use check-local magic as dependencyAlon Bar-Lev2017-04-102-16/+5
| | | | | | | | | | | | | | | | | | | | * tests/gpg/Makefile.am: Use BUILT_SOURCES instead of check-local and initial.test. * lang/qt/tests/Makefile.am: Ditto. -- This fixes "make dist" failure when source tree is clean: git clean -dxf autoreconf -ivf ./configure make dist BUILT_SOURCES should be used when file as generated without explicit dependency. The check-local is all-am dependency, this means that it will be resolved also in "make dist". Signed-off-by: Alon Bar-Lev <[email protected]>
* python: support .pydistutils.cfg modeAlon Bar-Lev2017-04-101-15/+10
| | | | | | | | | | | * lang/python/setup.py.in: Do not parse arguments. -- The distutils settings can come from either command-line or configuration file. Parsing parameters is not working in all cases. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: simplify build, some fixupsAlon Bar-Lev2017-04-0731-40/+24
| | | | | | | | | | | | | | | | | | | | | * lang/python/gpg/version.py.in: Rename to lang/python/version.py.in. configure.ac: Generate version.py.in in lang/python. * lang/python/MANIFEST.in: Include version.py explicitly. * lang/python/gpg: Rename to 'src'. * lang/python/Makefile.am: Do not copy source files, do not use absolute directories, support lib64 in uninstall, clean also dist directory, use symlink for gpg src. * lang/python/setup.py.in: Use builddir, copy sources into builddir, copy version.py into module. -- Simplify build to symlink the gpg sources into builddir instead of copying. This requires handling of version.py as generated file. In addition apply some cleanups: Drop the absolution pathes, clean the dist directory as well, support lib64 for sitelib at uninstall. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Fix vpath builds, fix distcheck.Justus Winter2017-04-054-75/+92
| | | | | | | | | | | | | | | | | | | | * lang/python/gpgme-h-clean.py: Delete file. * lang/python/MANIFEST.in: Adapt accordingly. * lang/python/Makefile.am (EXTRA_DIST): Likewise. (COPY_FILES_GPG): Bring variable back. (copystamp): Copy files. (clean-local): Delete copied files. (install-exec-local): Do not create and install list of installed files. (uninstall-local): Instead, create some explicit rules to uninstall the extension. * lang/python/setup.py.in: Parse arguments. Locate files either in the source directory, or in the build base directory. Inline the code from 'gpgme-h-clean.py'. Copy 'helpers.c', add source directory as include directory. Fixes-commit: 801d7d8c5dd530d26ad6c4bcc94d986e6e022da4 Signed-off-by: Justus Winter <[email protected]>
* python: Generate files into build directoryAlon Bar-Lev2017-04-053-64/+64
| | | | | | | | | | | | | | | | * lang/python/setup.py.in: Generate files within BuildExtFirstHack adjust build flags at this point instead of global. * lang/python/Makefile.am: Remove logic of separate source directory per python version in favor of build directory. * lang/python/tests/run-tests.py: Adjust build directory location. -- Generate files into build directory, leaving the source directory clean. Use the same source directory for multiple python version build. Result of 'prepare' target is a standard distutil layout that can be used easily by downstream to build all python targets in-place. Signed-off-by: Alon Bar-Lev <[email protected]>
* Fix typo.Justus Winter2017-04-051-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* FreeBSD's closefrom(2) does not return errorsPietro Cerutti2017-04-031-2/+2
|
* qt: pass fmt to gpgrt_asprintf()Igor Gnatenko2017-04-031-1/+1
| | | | | | | | | * lang/qt/src/dn.cpp (parse_dn_part): Add fmt argument instead of using name directly. GnuPG-Bug-Id: 3023 Signed-off-by: Igor Gnatenko <[email protected]> Signed-off-by: Andre Heinecke <[email protected]>
* python: Don't treat skipped tests as errorAndre Heinecke2017-03-301-1/+1
| | | | | * lang/python/tests/run-tests.py (failed): Don't count skipped tests for the return code.
* python: Fix skipping tests if running with GnuPG < 2.1.12.Justus Winter2017-03-3014-8/+17
| | | | | | | | | | | | | | | | | | | | | | * final.py: Import 'support.py' for the side-effect of checking the GnuPG version. * t-data.py: Likewise. * t-protocol-assuan.py: Likewise. * t-wrapper.py: Likewise. * t-callbacks.py: Avoid warning about 'support' being unused. * t-edit.py: Likewise. * t-encrypt-sym.py: Likewise. * t-file-name.py: Likewise. * t-idiomatic.py: Likewise. * t-sig-notation.py: Likewise. * t-trustlist.py: Likewise. * t-verify.py: Likewise. * t-wait.py: Likewise. * t-keylist-from-data.py: Trim unused imports. GnuPG-bug-id: 3008 Fixes-commit: 348da58fe0c3656e6177c98fef6b4c4331326c8e Signed-off-by: Justus Winter <[email protected]>
* qt: Handle if gpg does not support tofu in testAndre Heinecke2017-03-301-1/+22
| | | | | | | | | | * lang/qt/src/t-tofuinfo.cpp (TestTofuInfo::testSupported): Treat it as unsupported if secret keylisting already fails. -- The likely cause of this is that the agent can't be started because the trust model is unsupported. Other tests check that keylisting actually works.
* python,build: Reinstate prepare target.Alon Bar-Lev2017-03-292-14/+20
| | | | | | | | | | | | | * lang/python/Makefile.am: Fix 'prepare' target. * lang/python/setup.py.in: Use 'abs_top_builddir' instead of guessing the path. -- 'prepare' will prepare target at PREPAREDIR. The automake integration will also make use of prepare target. Downstream distributors may also make use of prepare target. Signed-off-by: Alon Bar-Lev <[email protected]>
* tests: Run the threading tests only on UNIX.Justus Winter2017-03-281-3/+3
| | | | | | | | | | | * tests/gpg/Makefile.am (tests_unix): Add 't-thread-keylist' and 't-thread-keylist-verify'. (c_tests): Drop them here. -- The tests use pthreads and we suspect problems with MinGW's wrappers. Signed-off-by: Justus Winter <[email protected]>
* tests: Make error message more helpful.Justus Winter2017-03-281-1/+2
| | | | | | | * tests/gpg/t-keylist.c (main): Print number of returned and expected keys. Signed-off-by: Justus Winter <[email protected]>
* Merge branch 'gpgme-1.9-branch'Werner Koch2017-03-285-18/+49
|\ | | | | | | --
| * Post release updatesgpgme-1.9-branchWerner Koch2017-03-282-2/+6
| | | | | | | | --
| * Release 1.9.0gpgme-1.9.0Werner Koch2017-03-285-18/+45
| | | | | | | | | | | | | | | | | | * configure.ac <c>: Bump LT version to C29/A18/R0. <cpp>: Bump LT version to C10/A4/R0. <qt>: Bump LT version to C9/A2/R0. -- Signed-off-by: Werner Koch <[email protected]>
* | Revert "qt: Disable testEncryptDecryptNowrap"Andre Heinecke2017-03-281-2/+0
|/ | | | This reverts commit 57d60b20f16dd5f1bccbbcaa0a6ed75a554a6414.
* core: Prepare for new key listing data send by gpg.Werner Koch2017-03-287-9/+71
| | | | | | | | | | | | * src/gpgme.h.in (gpgme_user_id_t): New fields 'origin' and 'last_update'. (gpgme_key_t): New fields 'origin' and 'last_update'. * src/conversion.c (_gpgme_parse_timestamp_ul): New. * src/keylist.c (keylist_colon_handler): Parse fields 19 and 20. * tests/run-keylist.c (main): Print new fields. Signed-off-by: Werner Koch <[email protected]>
* qt: Disable testEncryptDecryptNowrapAndre Heinecke2017-03-271-0/+2
| | | | | | | | | | | * lang/qt/tests/t-encrypt.cpp (EncryptTest::testEncryptDecryptNowrap): Disable test. -- This test produces failures under CI/ASAN conditions as the verify after the unwrap returns an error. As we currently don't have time to look into this more it's disabled for now. Similar to the testMixedEncryptDecrypt.
* python: Skip tests if running with GnuPG < 2.1.12.Justus Winter2017-03-271-1/+6
| | | | | | | | * lang/python/tests/support.py (assert_gpg_version): Fix error message. Skip all tests when we use GnuPG older than 2.1.12. GnuPG-bug-id: 3008 Signed-off-by: Justus Winter <[email protected]>
* Mention new cpp changes in the NEWSAndre Heinecke2017-03-241-0/+6
| | | | | | -- Somone that calls a function startCombinedDecryptionAndVerification should be required to always type it without autocompletion.
* cpp: Respect decrypt flags in new functionsAndre Heinecke2017-03-241-4/+4
| | | | | | | | | * lang/cpp/src/context.cpp: Respect directly provided flags in the new decrypt functions. -- Overlooked in the initial commit. Also fixed the according unused variable warnings.
* qt: Add unittest for decrypt unwrapAndre Heinecke2017-03-241-1/+66
| | | | | * lang/qt/tests/t-encrypt.cpp (EncryptTest::testEncryptDecryptNowrap): New.
* cpp: Use gpgme_op_decrypt_ex and add new flags.Andre Heinecke2017-03-243-11/+58
| | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp: New decrypt and decryptVerify functions that take flags as arguments. Use new variants in old functions. (Context::setDecryptionFlags): New helper. (Context::Private::Private): Initialize new member. * lang/cpp/src/context_p.h (Context::Private::decryptFlags): New. * lang/cpp/src/context.h (Context::DecryptFlags): New enum. (Context::EncryptionFlags): Extend for EncryptWrap. -- The setDecryptionFlags provides a generic way to set decryption flags for the whole context. This allows existing code to just keep using the old functions and modify the decryption behavior in a central place.
* core: New flags GPGME_DECRYPT_UNWRAP and GPGME_ENCRYPT_WRAP.Werner Koch2017-03-2420-75/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_ENCRYPT_WRAP): New const. (gpgme_decrypt_flags_t): New enum. (GPGME_DECRYPT_VERIFY): New const (GPGME_DECRYPT_UNWRAP): New const (gpgme_op_decrypt_ext_start): New func. (gpgme_op_decrypt_ext): New func. * src/decrypt-verify.c (gpgme_op_decrypt_ext_start): New. (gpgme_op_decrypt_ext): New. (decrypt_verify_start): Add arg FLAGS. Replace call to engine_op_decrypt_verify by the plain decrypt with the flag set. (gpgme_op_decrypt_verify_start): Pass the flag. (gpgme_op_decrypt_verify): Pass the flag. * src/decrypt.c (decrypt_start): Rename to ... (_gpgme_decrypt_start): this. Add arg FLAGS. Pass FLAGS to engine_op_decrypt. (gpgme_op_decrypt_start): Adjust for chnage pass 0 for FLAG. (gpgme_op_decrypt_start): Ditto. * src/engine.c (_gpgme_engine_op_decrypt_verify): Remove. (_gpgme_engine_op_decrypt): Add arg FLAGS. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/engine-backend.h (struct engine_ops): Remove member 'decrypt_verify'. Add FLAGS to 'decrypt'. Adjust all initialization. * src/engine-uiserver.c (uiserver_decrypt): Remove. (uiserver_decrypt_verify): Remove. (_uiserver_decrypt): Rename to ... (uiserver_decrypt): this. Replace arg VERIFY by new arg FLAGS. * src/engine-gpg.c (gpg_decrypt): Support GPGME_DECRYPT_UNWRAP. (gpg_encrypt): Support GPGME_ENCRYPT_WRAP. * tests/run-decrypt.c (main): New option --unwrap. * tests/run-encrypt.c (main): New option --wrap. -- Manual testing of that wrap/unwrap feature can be done this way: ./run-encrypt --verbose --key Alice /etc/motd > x ./run-decrypt --verbose --unwrap x > y ./run-encrypt --verbose --key Bob --wrap y > z 1. The message was first encrypted to Alice. 2. Alice decrypts the message receiving a valid OpenPGP message. 3. Alice encrypt that message to Bob This will also work with encrypted and signed messages; the signature will be kept intact during re-encryption. Requires GnuPG 2.1.12. Signed-off-by: Werner Koch <[email protected]>
* qt: Add test for Data::toKeysAndre Heinecke2017-03-221-0/+30
| | | | * lang/qt/tests/t-various.cpp (TestVarious::testKeyFromFile): New.
* cpp: Wrap keylist_from_dataAndre Heinecke2017-03-223-0/+30
| | | | | | | | * lang/cpp/data.h, lang/cpp/data.cpp (GpgME::Data::toKeys): New. -- Doing this in data instead of Context is a bit more idiomatic. But this could also be added to Context.
* qt: Initialize library first in testsAndre Heinecke2017-03-221-0/+2
| | | | | * lang/qt/tests/t-support.cpp (QGpgMETest::initTestCase): Initialize library.
* python: Improve Python detection.Justus Winter2017-03-221-2/+4
| | | | | | | | | | | * m4/python.m4 (_AM_PYTHON_INTERPRETER_LIST): Prefer the generic 'pythonX' over 'pythonX.Y'. This way we select the users preferred version for both flavors. Prefer 'python' over 'python3' but not over 'python2' so that the algorithm still finds a 'python2' even if 'python' is a Python3. Fixes-commit: 5189c08af9468cdeb6f16a6ecd0fee53e1e3aa0e Signed-off-by: Justus Winter <[email protected]>
* core: New API gpgme_op_set_uid_flag.Werner Koch2017-03-219-32/+189
| | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_set_uid_flag_start): New. (gpgme_op_set_uid_flag_start): New. * src/gpgme.def, src/libgpgme.vers: Add them. * src/genkey.c (addrevuid_start): Change arg revoke to a flag. (gpgme_op_revuid_start): Pass GENKEY_EXTRAFLAG_REVOKE for the fomer revoke parameter. (gpgme_op_revuid): Ditto. (set_uid_flag): New. (gpgme_op_set_uid_flag_start): New. (gpgme_op_set_uid_flag): New. * src/engine.h (GENKEY_EXTRAFLAG_SETPRIMARY): new. * src/engine-gpg.c (gpg_adduid): Implement that flag. * tests/run-genkey.c (main): New command --set-primary. -- GnuPG-bug-id: 2931 Signed-off-by: Werner Koch <[email protected]>
* python: Wrap 'gpgme_op_keylist_from_data_start'.Justus Winter2017-03-216-5/+243
| | | | | | | | | | | | | | * NEWS: Update. * lang/python/gpg/core.py (Context.keylist): New keyword argument 'source'. If given, list keys from 'source'. * lang/python/gpgme.i: Wrap the argument to 'gpgme_op_keylist_from_data_start'. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/support.py (EphemeralContext): Do not throw an error if no agent has been started in the context. * lang/python/tests/t-keylist-from-data.py: New file. Signed-off-by: Justus Winter <[email protected]>
* core: Extend gpgme_get_dirinfo to return the gpg-wks-client name.Werner Koch2017-03-213-1/+18
| | | | | | | | | * src/dirinfo.c (WANT_GPG_WKS_CLIENT_NAME): New const. (struct dirinfo): New field 'gpg_wks_client_name'. (get_gpgconf_item): Build it on demand. (gpgme_get_dirinfo): New value "gpg-wks-client-name" for WHAT. Signed-off-by: Werner Koch <[email protected]>
* core: New encryption flag GPGME_ENCRYPT_THROW_KEYIDS.Werner Koch2017-03-215-3/+24
| | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_ENCRYPT_THROW_KEYIDS): New flag. * src/engine-gpg.c (gpg_encrypt): Implement flag (gpg_encrypt_sign): Implement flag. * tests/run-encrypt.c (main): New option --throw-keyids. -- It would be nice to also selectively hide recipients (that is gpg --hidden-recipient) but our API does not ye allow this because it is based on key objects. A possible way to implement that would be a API to set processing flags into a key but this is complicated due to the reference counting and thus the possibility that a key object is used by different context. Signed-off-by: Werner Koch <[email protected]>
* core: New public API gpgme_op_keylist_from_data_start.Andre Heinecke2017-03-2117-8/+167
| | | | | | | | | | | | | | | | | * src/gpgme.h.in: New API gpgme_op_keylist_from_data_start. * src/libgpgme.vers, src/gpgme.def: Add it. * src/keylist.c (gpgme_op_keylist_from_data_start): New. * src/engine-backend.h (engine_ops): Add field 'keylist_data'. Change all engines to pass NULL for it. * src/engine.c (_gpgme_engine_op_keylist_data): New. * src/engine-gpg.c (gpg_keylist_data): New. (_gpgme_engine_ops_gpg): Register gpg_keylist_data. * tests/run-keylist.c (main): New option --from-file. -- Co-authored-by: Werner Koch <[email protected]> GnuPG-bug-id: 2819
* core,cpp: New key flag 'is_de_vs'.Werner Koch2017-03-207-6/+57
| | | | | | | | | | | | | | * src/gpgme.h.in (_gpgme_subkey): New flag is_de_vs. * tests/run-keylist.c (main): Print that flag. * src/keylist.c (parse_pub_field18): New. (keylist_colon_handler): Parse compliance flags. * lang/cpp/src/key.cpp (Key::isDeVs): New. (Subkey::isDeVs): New. * lang/cpp/src/key.h (class Key): New method isDeVs. (class Subkey): New method isDeVs. Signed-off-by: Werner Koch <[email protected]>
* tests: Fix distcheck.Justus Winter2017-03-201-1/+2
| | | | | | | | * tests/start-stop-agent: Do not create 'gpg-agent.conf' if it does not exist. Fixes-commit: 16b202d9999591b71fb8bb49f6db10ef96d4cbe8 Signed-off-by: Justus Winter <[email protected]>