aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qt: Add missing header redirectionAndre Heinecke2016-09-052-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++.
* qt: Include cpp before core directoryAndre Heinecke2016-09-051-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.
* qt: Fix 2.1 t-support copyAndre Heinecke2016-08-251-1/+3
| | | | * lang/qt/src/t-support.cpp (copyKeyring): Fix seckey copy.
* qt: Fix and extend TofuInfo test.Andre Heinecke2016-08-251-10/+51
| | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Delete executed jobs. (testTofuKeyList): New. (testSupported): Activate for 2.1.16 (signAndVerify): Disable sigcount tests.
* qt: Fix keyring copy in testsAndre Heinecke2016-08-253-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.
* qt: Add generic flag support for keylistjobsAndre Heinecke2016-08-253-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.
* qt: Ensure that current src dir is included firstAndre Heinecke2016-08-251-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.
* cpp: Add WithTofu Keylist ModeAndre Heinecke2016-08-253-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.
* qt: Fix tofuinfo test when gpg is gpg2Andre Heinecke2016-08-254-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.
* qt: Remove unused variable in testAndre Heinecke2016-08-251-2/+0
| | | | * t-wkspublish.cpp (testWKSPublishCreate): Remove context.
* qt: Add test for wkspublishjobAndre Heinecke2016-08-252-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.
* qt: Add WKSPublishJobAndre Heinecke2016-08-257-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.
* Cpp: Change firstSeen / lastSeen return valuesAndre Heinecke2016-08-252-6/+6
| | | | | | * lang/cpp/src/tofuinfo.cpp, lang/cpp/src/tofuinfo.h (TofuInfo::firstSeen, TofuInfo::lastSeen): Change return values to unsigned long and update doc.
* Cpp: Add wrapper for gpgme_get_dirinfoAndre Heinecke2016-08-252-0/+14
| | | | | * lang/cpp/src/context.cpp (dirInfo): New. * lang/cpp/src/global.h (dirInfo): New.
* Cpp: Add support for spawn engineAndre Heinecke2016-08-253-1/+66
| | | | | | | * lang/cpp/src/context.cpp (Context::spawn, Context::spawnAsync): New. * lang/cpp/src/context.h: Add prototypes. (SpawnFlags): New. * lang/cpp/src/global.h (SpawnEngine): Added.
* core: Add GPGME_KEYLIST_MODE_WITH_TOFU.Werner Koch2016-08-257-15/+186
| | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_TOFU): New. * src/engine-gpg.c (gpg_keylist_build_options): Use that. * src/keylist.c: Include limits.h. (parse_tfs_record): New. (keylist_colon_handler): Support TFS record. * tests/run-keylist.c: Include time.h. (isotimestr): New. (main): Add option --tofu. Print TOFU info. * tests/run-verify.c: Include time.h. (isotimestr): New. (print_result): Use isotimestr for TOFU dates. Signed-off-by: Werner Koch <[email protected]>
* core: Adjust for TOFU_STATS change in gnupg 2.1.16.Werner Koch2016-08-242-9/+5
| | | | | | | | | | | | | | | * src/gpgme.h.in (_gpgme_tofu_info): Change 'firstseen' and 'lastseen' to a timestamp value. * src/verify.c (parse_tofu_stats): Do not cap these values at UINT_MAX. -- Using an unsigned long here is okay: We will never get an error and even on machines where unsigned long is 32 bit (e.g. Windows64) this allows us to operate until 2106. By then Windows will be a footnote in history or Windows128 has changed that type to something larger than 32 bit ;-) Signed-off-by: Werner Koch <[email protected]>
* core: Set the 'encrcount' field in gpgme_tofu_info_t.Werner Koch2016-08-241-2/+8
| | | | | | * src/verify.c (parse_tofu_stats): Set ENCRCOUNT field. Signed-off-by: Werner Koch <[email protected]>
* cpp: Get rid of AssuanResult due to its deprecation.Werner Koch2016-08-246-203/+40
| | | | | | | | | | | | | | * lang/cpp/src/assuanresult.cpp: Remove. * lang/cpp/src/assuanresult.h: Remove. * lang/cpp/src/Makefile.am: Remove these files. * lang/cpp/src/context.cpp: Remove header assuanresult.h (assuanTransact): Change return type to Error. Use gpgme_op_assuan_transact_ext. (startAssuanTransaction): Change return type to Error. (assuanResult): Remove * lang/cpp/src/context.h (assuanResult): Adjust for changes. Signed-off-by: Werner Koch <[email protected]>
* Qt: Adapt (disabled) tofuinfo test to new APIAndre Heinecke2016-08-241-49/+60
| | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Switch to UID based API. -- Test is still disabled as GnuPG still returns unexpected results.
* Cpp: Add Key to signatureAndre Heinecke2016-08-242-0/+20
| | | | | * lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h (Signature::key): New.
* Cpp: Use fpr field for primaryFingerprintAndre Heinecke2016-08-241-5/+10
| | | | | | | | | | * lang/cpp/src/key.cpp (Key::primaryFingerprint): Return fpr value if available. -- Should not be necessary but we might have an incomplete key without subkeys but the fingerprint already set in gpgme's data type.
* Cpp: Move tofuinfo from signature to useridAndre Heinecke2016-08-237-72/+17
| | | | | | | | | | | | | | * lang/cpp/src/key.cpp (UserID::tofuInfo): New. * lang/cpp/src/key.h: Update accordingly. * lang/cpp/src/tofuinfo.cpp: Remove dropped fields. * lang/cpp/src/tofuinfo.h: Update accordingly. * lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h: Remove tofu info. * lang/qt/tests/t-tofuinfo.cpp: Disable for now. -- With be4ff75d7 Tofu info now lives with a UserID Object. While this breaks API it was not yet released.
* core: Put the protocol into a TOFU created key object.Werner Koch2016-08-231-2/+3
| | | | | | | | * src/verify.c (parse_tofu_user): Add arg 'protocol' and store it in the KEY. (_gpgme_verify_status_handler): Pass protocol. Signed-off-by: Werner Koch <[email protected]>
* core: Change the way TOFU information are represented.Werner Koch2016-08-239-121/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'. Add field 'key'. (struct _gpgme_key): Add field 'fpr'. (struct _gpgme_user_id): Add field 'tofu'. (struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'. * src/key.c (gpgme_key_unref): Release TOFU and FPR. * src/keylist.c (keylist_colon_handler): Store the fingerprint of the first subkey also in KEY. * src/verify.c (release_tofu_info): Remove. (release_op_data): Release KEY. (parse_tofu_user): Rewrite for new data structure. (parse_tofu_stats): Ditto. (parse_tofu_stats_long): Ditto. * tests/run-verify.c (print_result): Ditto. * tests/run-keylist.c (main): Print more fields. -- TOFU information are now associated with the user ID and not with a separate object. Note that this breaks code relying on the former non-released TOFU feature. The C++ bindings won't work right now. Signed-off-by: Werner Koch <[email protected]>
* core: Extend gpgme_user_id_t with 'address'.Werner Koch2016-08-235-25/+62
| | | | | | | | | * src/mbox-util.c, src/mbox-util.h: Adjust for use in gpgme. * src/Makefile.am (main_sources): Add mbox-util. * src/key.c (_gpgme_key_append_name): Set 'address' field of uid. (gpgme_key_unref): Free it. Signed-off-by: Werner Koch <[email protected]>
* core: New code for parsing mail addresses.Werner Koch2016-08-222-0/+268
| | | | | | | | | | | | | | * src/mbox-util.c: New. * src/mbox-util.h: New. -- The files haven been copied verbatim from GnuPG 2.1.15 commit 54245979e691129ed9d3a6c642087fb8d3227449 after the license has been changed in GnuPG. We need this file too match GnuPG's idea of a mail address. Signed-off-by: Werner Koch <[email protected]>
* core: Add new items for gpgme_get_dirinfo.Werner Koch2016-08-223-5/+104
| | | | | | | | | | | | | * src/dirinfo.c (WANT_SYSCONFDIR, WANT_LIBEXECDIR, WANT_LIBDIR): New. (WANT_DATADIR, WANT_LCOALEDIR, WANT_AGENT_SSH_SOCKET): New (WANT_DIRMNGR_SOCKET): New. (dirinfo): Add fields 'sysconfdir', 'bindir', 'libexecdir', 'libdir', 'datadir', 'localedir', 'agent_ssh_socket', and 'dirmngr_socket'. (parse_output): Set these fields. (get_gpgconf_item): Return them. (gpgme_get_dirinfo): Likewise. Signed-off-by: Werner Koch <[email protected]>
* core: Base gpgme_get_dirinfo(uiserver-socket) on the socket dir.Werner Koch2016-08-221-10/+23
| | | | | | | * src/dirinfo.c (dirname_len): New. (parse_output): Change computation of UISRV_SOCKET. Signed-off-by: Werner Koch <[email protected]>
* core: New commands --lang and --have-lang for gpgme-configWerner Koch2016-08-213-10/+40
| | | | | | | | * configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst. * src/gpgme-config.in (avail_lang): Add commands --lang and --have-lang. Signed-off-by: Werner Koch <[email protected]>
* core: Remove (now) useless diagnosticAndre Heinecke2016-08-181-2/+0
| | | | | | | | | | | * src/w32-io.c(_gpgme_io_spawn): Remove spawnhelper not found diagnostic. -- When spawnhelper is not found the error is now catched before the CreateProcess call so the added diagnostic in bb2d11c (which was not helpful because the value for spawnhelper would be NULL in that case) is now no longer needed.
* core: Fail loudly in case w32 spawner not foundAndre Heinecke2016-08-181-0/+26
| | | | | | | | | | | | | | | | * src/w32-io.c (_gpgme_io_spawn): Show a message box in case gpgme-w32spawn.exe not found. -- Otherwise every engine call will just fail with unsupported protocol. Even in the debug output the problem was not made clear because CreateProcess will fail with error code 87 (Invalid Parameter) because spawnhelper is NULL. The helpful error message for ERROR_INVALID_PARAMETER would have been: "is 'NULL' correctly installed" As GpgME basically becomes useless on Windows without the spawnhelper we want to fail very loud in that case.
* Cpp: Fix some pedantic warningsAndre Heinecke2016-08-173-4/+4
| | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::getKeysFromRecipients): Remove ignored / invalid const qualifier. * lang/cpp/src/result.h: Don't shadow error function in ctor.
* 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]>
* 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.