aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* cpp: Go with default answer on unknown question by key edit interfaceIngo Klöcker2024-08-281-0/+14
| | | | | | | | | | | | | | * lang/cpp/src/editinteractor.cpp (edit_interactor_callback_impl): Send empty string to edit interface if General Error occurred. -- A General Error is usually returned by the nextState function of the concrete EditInteractor subclasses if gpg asks an unexpected question which isn't handled by the edit interactor's state machine. In this case, it's usually safe to go with the default answer. This makes the edit interactors much more robust. GnuPG-bug-id: 7274
* qt: Add support for new context flag "proc-all-sigs"Ingo Klöcker2024-08-2621-8/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/decryptverifyarchivejob_p.h (DecryptVerifyArchiveJobPrivate): Add member m_processAllSignatures. * lang/qt/src/decryptverifyjob.cpp, lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/decryptverifyjob_p.h (DecryptVerifyJobPrivate): Add member m_processAllSignatures. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify_from_file_name): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyArchiveJob::start): Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyArchiveJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_file_name. * lang/qt/src/qgpgmedecryptverifyjob.cpp (decrypt_verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyJob::start, QGpgMEDecryptVerifyJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/qgpgmeverifydetachedjob.cpp (verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyDetachedJob::start, QGpgMEVerifyDetachedJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyDetachedJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/qgpgmeverifyopaquejob.cpp (verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyOpaqueJob::start, QGpgMEVerifyOpaqueJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyOpaqueJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/verifydetachedjob.cpp, lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/verifydetachedjob_p.h (VerifyDetachedJobPrivate): Add member m_processAllSignatures. * lang/qt/src/verifyopaquejob.cpp, lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/verifyopaquejob_p.h (VerifyOpaqueJobPrivate): Add member m_processAllSignatures. * lang/qt/tests/run-decryptverifyarchivejob.cpp, lang/qt/tests/run-decryptverifyjob.cpp, lang/qt/tests/run-verifydetachedjob.cpp, lang/qt/tests/run-verifyopaquejob.cpp (struct CommandLineOptions): Add member processAllSignatures. (parseCommandLine): Add command line option --process-all-signatures. (main): Pass new option to the job. -- The new option processAllSignatures is added to all jobs that verify data signatures. By enabling this option, one can tell gpg not to stop checking signatures after the first bad signature. GnuPG-bug-id: 6870
* New context flag "proc-all-sigs".Werner Koch2024-08-236-1/+64
| | | | | | | | | | | | | * src/context.h (struct gpgme_context): Add proc_all_sigs. * src/gpgme.c (gpgme_set_ctx_flag): Add flag "proc-all-sigs". (gpgme_get_ctx_flag): Ditto. * src/engine-gpg.c (engine.gpg): Add flags.proc_all_sigs. (have_option_proc_all_sigs): New. (gpg_set_engine_flags): Set flag from context. (build_argv): Add --proc-all-sigs if requested and supported. -- GnuPG-bug-id: 7261
* qt,tests: Add make target to clean the keyringIngo Klöcker2024-08-071-0/+5
| | | | | | | | | | * lang/qt/tests/Makefile.am (clean-keyring): New target. -- Many tests operate on the keyring in the build directory. If a test fails then the keyring might be in an unclean state causing subsequent tests to fail. The new make target allows cleaning the keyring without resorting to brute force with "make clean".
* qt: Use --quick-set-ownertrust if availableIngo Klöcker2024-08-072-1/+19
| | | | | | | | | | | | | | | | * lang/qt/src/qgpgmechangeownertrustjob.cpp (set_owner_trust): New. (QGpgMEChangeOwnerTrustJob::start): Use set_owner_trust if gpg is new enough. * lang/qt/tests/t-ownertrust.cpp (ChangeOwnerTrustTest::testChangeOwnerTrust): Log unexpected error. -- Using the --quick-set-ownertrust command to set the owner trust is much more robust than using the edit interface. Prefer the former if gpg supports it. GnuPG-bug-id: 7239
* tests,json: Remove no longer needed codeIngo Klöcker2024-08-071-106/+1
| | | | | | | | | | * tests/json/t-json.c (parse_version_number, parse_version_string, compare_versions, check_gpg_version): Remove. (main): Use have_gpg_version from t-support.h. -- In the meantime gpgrt provides API for comparing versions (which is used by have_gpg_version in t-support.h).
* qt: Support disabling and enabling of keysIngo Klöcker2024-08-079-7/+300
| | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (QuickJob): Move definition of constructor and destructor and inclusion of the moc file to quickjob.cpp. * lang/qt/src/qgpgmequickjob.cpp (class QGpgMEQuickJobPrivate): New. (QGpgMEQuickJob::QGpgMEQuickJob): Instantiate private job class. (set_key_enabled): New. * lang/qt/src/quickjob.cpp: New. * lang/qt/src/quickjob.h (class QuickJob): Add member function startSetKeyEnabled. * lang/qt/src/quickjob_p.h: New. * lang/qt/tests/Makefile.am: Add new test for Qt 5 and Qt 6. * lang/qt/tests/t-disablekey.cpp: New. -- GnuPG-bug-id: 7239
* cpp: Add support for setting owner trust and for disabling keysIngo Klöcker2024-08-063-0/+74
| | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (class Context): Add member functions setOwnerTrust, startSetOwnerTrust, setKeyEnabled, startSetKeyEnabled. * lang/cpp/src/context.cpp (owner_trust_to_string): New. -- GnuPG-bug-id: 7239
* core: New function gpgme_op_setownertrustIngo Klöcker2024-08-0623-7/+589
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/Makefile.am (main_sources): Add new file. * src/context.h (ctx_op_data_id_t): Add OPDATA_SETOWNERTRUST. * src/engine.c, src/engine.h (_gpgme_engine_op_setownertrust): New. * src/engine-backend.h (engine_ops): Add 'setownertrust' and adjust all engine initializers. * src/engine-gpg.c (gpg_setownertrust): New. (_gpgme_engine_ops_gpg): Set setownertrust to gpg_setownertrust. * src/gpgme.h.in (gpgme_op_setownertrust_start, gpgme_op_setownertrust): New. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/setownertrust.c: New. * doc/gpgme.texi: Document new functions. * tests/Makefile.am (noinst_PROGRAMS): Add new test program. * tests/run-setownertrust.c: New. * tests/gpg/Makefile.am (c_tests): Add new file. (LDADD): Add @GPG_ERROR_LIBS@. * tests/gpg/t-setownertrust.c: New. * tests/gpg/t-support.h (have_gpg_version): New. -- This extends GPGME to support the --quick-set-ownertrust command added by GnuPG 2.4.6. This allows changing the owner trust of keys and enabling/disabling keys without using the editinteractor interface. GnuPG-bug-id: 7239
* w32: Use UTF-8 for localized error descriptions for all threadsIngo Klöcker2024-08-051-0/+4
| | | | | | | | | | | | | * src/version.c (do_subsystem_inits) [W32]: Switch gettext to UTF-8 for current thread and all new threads. -- We did already enable UTF-8, but it was only effective for the main thread. Now we enable it also for all new threads (if supported by libgpg-error). This way debug output in background threads now also uses UTF-8. GnuPG-bug-id: 7188
* build,qt: Fix include path in CMake filesIngo Klöcker2024-07-221-4/+4
| | | | | | | | | * lang/qt/src/Makefile.am (QGpgmeConfig.cmake, QGpgmeQt6Config.cmake): Use new variables includeprefix{5,6} instead of replaced variable includeprefix. -- GnuPG-bug-id: 7205
* build,qt: Don't put generated camel-case headers in tarballIngo Klöcker2024-07-181-2/+2
| | | | | | | * lang/qt/src/Makefile.am: Change camelcase5include_HEADERS to nodist_camelcase5include_HEADERS. Change camelcase6include_HEADERS to nodist_camelcase6include_HEADERS. --
* core: Remove obsolete source filesIngo Klöcker2024-07-182-59/+0
| | | | | | | | * src/isascii.c, src/putc_unlocked.c: Remove. -- I noticed those files when I compared the content of the dist tarball with the repo.
* build,qt: Allow building Qt 5 bindings and Qt 6 bindingsIngo Klöcker2024-07-183-47/+70
| | | | | | | | | | | | | | | | | | * configure.ac: Remove "qt" from default_languages. Add "qt5 qt6" to default_languages. Remove "qt" from help for --enable-languages. Don't fail anymore if "qt5" and "qt6" are enabled. Warn that "qt" is deprecated if it was enabled. * lang/qt/src/Makefile.am (libqgpgme_la, libqgpgmeqt6_la): New. (lib_LTLIBRARIES): Set Qt 5 and/or Qt 6 variant of libqgpgme. (AM_CPPFLAGS): Replace with libqgpgme_la_CPPFLAGS for Qt 5 and libqgpgmeqt6_la_CPPFLAGS for Qt 6. -- This makes it possible to build QGpgME simultaneously for Qt 5 and Qt 6. By default, QGpgME is now built for all versions of Qt that are found. Specifying "qt" as language is deprecated. GnuPG-bug-id: 7205
* build,qt: Decouple generation of moc filesIngo Klöcker2024-07-184-103/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/qt5.m4: Export moc for Qt 5 in variable MOC5. Unset temporary MOC2. * m4/qt6.m4: Export moc for Qt 6 in variable MOC6. * lang/qt/src/Makefile.am: Generate .moc5 files from .h files. Generate .moc forwarding headers in moc5 subfolder. Add moc5 subfolder to include paths for Qt 5-based qgpgme library. Ditto for Qt 6. Clean up moc5 and moc6 subfolders. * lang/qt/tests/Makefile.am: List tests and test runners for Qt 5 and Qt 6. Generate .moc5 files from .cpp files of tests. Generate .moc forwarding headers in moc5 subfolder. Generate .hmoc file from t-support.h directly in moc5 subfolder. Add moc5 subfolder to include paths for all Qt 5-based tests and runners. Ditto for Qt 6. Specify sources, LDADD and CPPFLAGS for all tests and test runners for Qt 5 and Qt 6. Clean up moc5 and moc6 subfolders. -- The output of Qt 5's moc and Qt 6's moc is incompatible. Therefore, we need to generate different .moc files for Qt 5 and Qt 6 to support co-building of the Qt 5 and Qt 6 bindings. The duplication of the listing of the tests couldn't be avoided because automake doesn't understand `the_tests5 = $(the_tests:%=%5)` and couldn't match the tests with their _SOURCES. Maybe some m4 programming would have helped, but that would have made the Makefiles even more unreadable. GnuPG-bug-id: 7205
* build,qt: Remove include directories on uninstallIngo Klöcker2024-07-181-1/+14
| | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (uninstall-include-dirs-qt5, uninstall-include-dirs-qt6): New targets. (uninstall_include_dirs_qt5, uninstall_include_dirs_qt6): New variables. (uninstall-local): Replace with... (uninstall-hook): ...this. Add new uninstall_include_dirs_qt* variables. -- We have to use uninstall-hook because uninstall-local runs before the header files have been removed from the include folders we want to remove. GnuPG-bug-id: 7205
* build,qt: Decouple handling of include headersIngo Klöcker2024-07-181-7/+12
| | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (includeprefix): Replace with... (includeprefix5, includeprefix6): ...these. (qgpgmeincludedir): Replace with... (qgpgme5includedir, qgpgme6includedir): ...these. (qgpgmeinclude_HEADERS): Replace with... (qgpgme5include_HEADERS, qgpgme6include_HEADERS): ...these. (nodist_qgpgmeinclude_HEADERS): Replace with... (nodist_qgpgme5include_HEADERS, nodist_qgpgme6include_HEADERS): ..these. (camelcaseincludedir): Replace with... (camelcase5includedir, camelcase6includedir): ...these. (camelcaseinclude_HEADERS): Replace with... (camelcase5include_HEADERS, camelcase6include_HEADERS): ...these. -- This prepares the code for the case that WANT_QT5 and WANT_QT6 are both true. GnuPG-bug-id: 7205
* build,qt: Decouple (un)install of CMake filesIngo Klöcker2024-07-181-6/+10
| | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (install-cmake-files): Rename target to install-cmake-files-qt5 and install-cmake-files-qt6. (uninstall-cmake-files): Rename target to uninstall-cmake-files-qt5 and uninstall-cmake-files-qt6. (install_cmake_files_qt5, uninstall_cmake_files_qt5, install_cmake_files_qt6, uninstall_cmake_files_qt6): New variables. (install-data-local): Depend on both install-cmake-files-qt* targets. (uninstall-local): Depend on both uninstall-cmake-files-qt* targets. -- This prepares the targets for the case that WANT_QT5 and WANT_QT6 are both true. GnuPG-bug-id: 7205
* core: Support all keylist modes and fix possible overrunIngo Klöcker2024-07-151-3/+17
| | | | | | | | | | | | | | * src/gpgme-tool.c (gt_get_keylist_mode): Increase NR_KEYLIST_MODES to number of keylist modes. Add support for GPGME_KEYLIST_MODE_WITH_TOFU, GPGME_KEYLIST_MODE_WITH_KEYGRIP, GPGME_KEYLIST_MODE_WITH_V5FPR. Write all modes. (hlp_keylist_mode): List all supported keylist modes. (cmd_keylist_mode): Add support for GPGME_KEYLIST_MODE_WITH_TOFU, GPGME_KEYLIST_MODE_WITH_KEYGRIP, GPGME_KEYLIST_MODE_WITH_V5FPR. -- This fixes the possible overrun reported by Michal Hlavinka and adds support for all keylist modes.
* build,cpp: Fix include paths in forwarding headers in gpgme++ folderIngo Klöcker2024-07-101-1/+1
| | | | | | | | | | | | * lang/cpp/src/Makefile.am (build rule for copied headers): Write abs_srcdir instead of srcdir in the generated headers. -- The generated include paths lacked a "../" if srcdir was relative. This lead to self-including includes for in-source builds. Including the real headers with their absolute paths fixes this. GnuPG-bug-id: 7110
* qt: Replace usage of deprecated Error::asStringIngo Klöcker2024-07-0525-59/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/debug.cpp (operator<<): Use Error::asStdString instead of Error::asString. * lang/qt/src/qgpgmedecryptverifyjob.cpp (decrypt_verify), lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigComponent::sync), lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use QDebug operator for Error instead of Error::asString. * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use errorAsString instead of Error::asString. * lang/qt/src/util.h (errorAsString): New. * lang/qt/tests/run-decryptverifyarchivejob.cpp (main), lang/qt/tests/run-decryptverifyjob.cpp (main), lang/qt/tests/run-encryptarchivejob.cpp (main), lang/qt/tests/run-encryptjob.cpp (main), lang/qt/tests/run-exportjob.cpp (main), lang/qt/tests/run-importjob.cpp (main), lang/qt/tests/run-receivekeysjob.cpp (main), lang/qt/tests/run-refreshkeysjob.cpp (main), lang/qt/tests/run-signarchivejob.cpp (main), lang/qt/tests/run-signjob.cpp (main), lang/qt/tests/run-verifydetachedjob.cpp (main), lang/qt/tests/run-verifyopaquejob.cpp (main), lang/qt/tests/run-wkdrefreshjob.cpp (main), lang/qt/tests/t-ownertrust.cpp (testChangeOwnerTrust), lang/qt/tests/t-remarks.cpp (testRemarkOwnKey), lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Use QDebug operator for Error instead of Error::asString. * lang/qt/tests/t-changeexpiryjob.cpp (all test functions), lang/qt/tests/t-trustsignatures.cpp (all test functions), lang/qt/tests/t-various.cpp (testSignKeyWithoutExpiration, testSignKeyWithExpiration): Use errorAsString instead of Error::asString. -- GnuPG-bug-id: 7188
* cpp: Deprecate Error::asString and update usersIngo Klöcker2024-07-057-13/+17
| | | | | | | | | | | | | * lang/cpp/src/error.h (Error::asString): Mark as deprecated. * lang/cpp/src/context.cpp (operator<<), lang/cpp/src/editinteractor.cpp (edit_interactor_callback_impl), lang/cpp/tests/run-getkey.cpp (main), lang/cpp/tests/run-keylist.cpp (main), lang/cpp/tests/run-wkdlookup.cpp (main): Use Error::asStdString instead of Error::asString. -- GnuPG-bug-id: 7188
* cpp: Add safer member function returning text describing an errorIngo Klöcker2024-07-053-0/+12
| | | | | | | | | | | | | | | * lang/cpp/src/error.h, lang/cpp/src/context.cpp (class Error): New member function asStdString. -- Unlike asString the new function doesn't cache the value returned by gpgme_strerror_r. This ensures that on Windows the UTF-8 encoded text is returned for the main thread even if the function was called before for another thread. For other threads asStdString will still return the natively encoded error description until UTF-8 encoded error descriptions can be enabled for all threads (T7185). GnuPG-bug-id: 7188
* qt: Always include C++ binding headers with gpgme++/ prefixIngo Klöcker2024-07-05131-415/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am, lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add builddir instead of srcdir of C++ bindings as include path. * lang/qt/src/changeexpiryjob.cpp, lang/qt/src/changeexpiryjob.h, lang/qt/src/changeownertrustjob.h, lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h, lang/qt/src/debug.cpp, lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h, lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h, lang/qt/src/encryptjob.h, lang/qt/src/encryptjob_p.h, lang/qt/src/filelistdataprovider.cpp, lang/qt/src/filelistdataprovider.h, lang/qt/src/hierarchicalkeylistjob.h, lang/qt/src/importjob.cpp, lang/qt/src/importjob.h, lang/qt/src/importjob_p.h, lang/qt/src/job.h, lang/qt/src/keyformailboxjob.h, lang/qt/src/keylistjob.h, lang/qt/src/listallkeysjob.h, lang/qt/src/multideletejob.cpp, lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptjob.h, lang/qt/src/qgpgmedecryptverifyarchivejob.cpp, lang/qt/src/qgpgmedecryptverifyarchivejob.h, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.h, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.h, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmeimportjob.h, 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/qgpgmequickjob.cpp, lang/qt/src/qgpgmereceivekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp, lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerevokekeyjob.cpp, lang/qt/src/qgpgmesetprimaryuseridjob.cpp, lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h, lang/qt/src/qgpgmesignencryptarchivejob.cpp, lang/qt/src/qgpgmesignencryptarchivejob.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/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.h, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmeverifyopaquejob.h, lang/qt/src/qgpgmewkdlookupjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.h, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/quickjob.h, lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h, lang/qt/src/signencryptarchivejob.cpp, lang/qt/src/signencryptarchivejob.h, lang/qt/src/signencryptjob.h, lang/qt/src/signencryptjob_p.h, lang/qt/src/signjob.h, lang/qt/src/signjob_p.h, lang/qt/src/threadedjobmixin.cpp, lang/qt/src/threadedjobmixin.h, lang/qt/src/tofupolicyjob.h, lang/qt/src/util.cpp, lang/qt/src/wkdlookupresult.cpp, lang/qt/src/wkdlookupresult.h, lang/qt/src/wkdrefreshjob_p.h, lang/qt/tests/run-decryptverifyarchivejob.cpp, lang/qt/tests/run-decryptverifyjob.cpp, lang/qt/tests/run-encryptarchivejob.cpp, lang/qt/tests/run-encryptjob.cpp, lang/qt/tests/run-exportjob.cpp, lang/qt/tests/run-importjob.cpp, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/run-receivekeysjob.cpp, lang/qt/tests/run-refreshkeysjob.cpp, lang/qt/tests/run-signarchivejob.cpp, lang/qt/tests/run-signjob.cpp, lang/qt/tests/run-verifydetachedjob.cpp, lang/qt/tests/run-verifyopaquejob.cpp, lang/qt/tests/run-wkdrefreshjob.cpp, lang/qt/tests/t-addexistingsubkey.cpp, lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-config.cpp, lang/qt/tests/t-decryptverify.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-import.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-remarks.cpp, lang/qt/tests/t-revokekey.cpp, lang/qt/tests/t-setprimaryuserid.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp, lang/qt/tests/t-verify.cpp, lang/qt/tests/t-wkdlookup.cpp, lang/qt/tests/t-wkspublish.cpp: Include GpgME++ headers with gpgme++/ prefix. -- This prepares the Qt bindings for building them separately from the C++ bindings. GnuPG-bug-id: 7110
* build,cpp: Create forwarding headers in a gpgme++ folderIngo Klöcker2024-07-051-1/+12
| | | | | | | | | | | | | | | | * lang/cpp/src/Makefile.am (copied_headers): New. (build rule for all copied headers): New. (BUILT_SOURCES): New. (CLEANFILES): Add copied_headers. -- The forwarding headers make it easier to use the headers from the Qt bindings when building them against the built but not installed C++ bindings because we can always include the C++ headers with gpgme++/ prefix. This also helps to avoid including a C++ header with the same name as a header in the Qt bindings (e.g. util.h). GnuPG-bug-id: 7110
* Fix calling CancelSynchronousIo.NIIBE Yutaka2024-07-051-2/+2
| | | | | | | | | * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): Use HANDLE. -- GnuPG-bug-id: 6634 Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix printing size_t and off_t value for LLP64 Windows.NIIBE Yutaka2024-07-052-5/+5
| | | | | | | | | | | * src/debug.h (_trace_sysres_off_t): Use 'z' length specifier. * src/w32-io.c (_gpgme_io_read): Likewise. (writer, _gpgme_io_write): Likewise. -- GnuPG-bug-id: 7187 Signed-off-by: NIIBE Yutaka <[email protected]>
* Remove ath.h and ath.c.NIIBE Yutaka2024-07-053-252/+2
| | | | | | | | | * src/Makefile.am (system_components): We don't use ath.h any more. (main_sources): Remove ath.h and ath.c. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Don't use ath_self, but get thread ID directly.NIIBE Yutaka2024-07-052-6/+22
| | | | | | | | | | | * src/debug.c [HAVE_W32_SYSTEM or __linux] (tid_log_callback): Use native thread ID call for Windows and Linux, ifdef-out-ed. (debug_init): Only call gpgrt_log_set_pid_suffix_cb for relevant systems. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Use gpgrt_b64dec in libgpg-error.NIIBE Yutaka2024-07-013-259/+6
| | | | | | | | | | | | | | | * src/b64dec.c: Remove. * src/Makefile.am (main_sources): Remove b64dec.c. * src/data-identify.c (pgp_binary_detection): Use gpgrt_b64dec in libgpg-error. -- gpgrt_b64dec is available in libgpg-error 1.27 and it is already in use by JSON support. GnuPG-bug-id: 7180 Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Remove obsolete filesIngo Klöcker2024-06-282-82/+0
| | | | | | | | * lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp: Remove. -- These files have never been used since gpgmepp was imported into this repo.
* qt: Allow appending a detached signature to an existing fileIngo Klöcker2024-06-186-9/+78
| | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmesignjob.cpp (sign_to_filename): Add argument "appendSignature". Append new detached signature to an existing file if requested. * lang/qt/src/signjob.cpp, lang/qt/src/signjob.h (class SignJob): Add member functions setAppendSignature, appendSignatureEnabled. * lang/qt/src/signjob_p.h (struct SignJobPrivate): Add member m_appendSignature. * lang/qt/tests/run-signjob.cpp (struct CommandLineOptions): Add members signingFlags, appendSignature. Initialize armor. (parseCommandLine): Add command line options --detach-sign and --append. (main): Do not exit if output file exists and append is enabled. Pass new options to the job. -- This change simplifies cross-signing a document by appending additional detached signatures to a file with already existing detached signatures. GnuPG-bug-id: 6867
* qt,build: Install headers for Qt 5 and Qt 6 in different locationsIngo Klöcker2024-06-172-6/+14
| | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (includeprefix): New. (qgpgmeincludedir, camelcaseincludedir): Add $(includeprefix). (QGpgmeConfig.cmake, QGpgmeQt6Config.cmake): Add $(includeprefix) to replacement for @resolved_includedir@. -- This installs the headers for Qt 5 in $(includedir)/qgpgme-qt5 and the headers for Qt 6 in $(includedir)/qgpgme-qt6. For users of the CMake files the change will be transparent, i.e. they don't have to do anything. Packagers will have to change their scripts but in the end this change will make their lifes easier. GnuPG-bug-id: 7161
* Update gpg-error.m4 again for spell fix.NIIBE Yutaka2024-06-141-1/+1
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* qt,tests: Fix deprecation warnings (in Qt 6 build)Ingo Klöcker2024-06-131-2/+2
| | | | | | | * lang/qt/tests/t-tofuinfo.cpp (TofuInfoTest::signAndVerify, TofuInfoTest::testTofuPolicy): Use range-based for loop instead of Qt's deprecated foreach. --
* qt: Specify import options as list of strings instead of as stringIngo Klöcker2024-06-136-10/+14
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/importjob.cpp, lang/qt/src/importjob.h (setImportOptions): Change type of argument "options" to QStringList. (importOptions): Change return type to QStringList. * lang/qt/src/importjob_p.h (struct ImportJobPrivate): Change type of member m_importOptions to QStringList. * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Change type of argument "importOptions" to QStringList. Join list of import options with ',' when setting the "import-options" context flag. * lang/qt/tests/t-import.cpp (ImportTest::testImportWithImportOptions): Adapt to API change. -- This makes the API that was introduced with the previous commit easier to use. GnuPG-bug-id: 7152
* m4: Update m4 files.NIIBE Yutaka2024-06-132-23/+31
| | | | | | | | | * m4/gpg-error.m4: Update libgpg-error master. * m4/libassuan.m4: Update libassuan master. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgme.m4: Fix setting/using GPG_ERROR_CONFIG.NIIBE Yutaka2024-06-131-8/+7
| | | | | | | | | gpgm4.m4 (_AM_PATH_GPGRT_CONFIG): Don't set GPG_ERROR_CONFIG and gpg_error_config_version. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Allow specifying import options when importing keysIngo Klöcker2024-06-125-4/+66
| | | | | | | | | | | | | | | * lang/qt/src/importjob.cpp, lang/qt/src/importjob.h (class ImportJob): Add member functions setImportOptions and importOptions. * lang/qt/src/importjob_p.h (struct ImportJobPrivate): Add member m_importOptions. * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Add arg importOptions and adjust the callers. Set import options context flag. * lang/qt/tests/t-import.cpp (ImportTest): Add member function testImportWithImportOptions. -- GnuPG-bug-id: 7152
* tests: Add --import-filter option to usage info of run-importIngo Klöcker2024-06-121-0/+1
| | | | | * tests/run-import.c (show_usage): Add option --import-filter. --
* core: Allow setting import options when importing keysIngo Klöcker2024-06-1211-7/+77
| | | | | | | | | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): New field import_options. * src/engine-backend.h (struct engine_ops): Add arg import_options to field 'import'. * src/engine-gpg.c (gpg_import): Add arg import_options and pass option --import-options with argument value to gpg. * src/engine-gpgsm.c (gpgsm_import): Add dummy arg import_options. * src/engine.c (_gpgme_engine_op_import): Add arg import_options and pass option to import function of engine. * src/engine.h (_gpgme_engine_op_import): Add arg import_options. * src/gpgme.c (gpgme_release): Free 'import_options'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "import-options". * src/import.c (_gpgme_op_import_start, _gpgme_op_import_keys_start, _gpgme_op_receive_keys_start): Pass import options stored in context to _gpgme_engine_op_import. * tests/run-import.c (show_usage, main): Add option --import-options. -- This makes the --import-options option available in the GPGME API for key imports. GnuPG-bug-id: 7152
* qt,doc: Fix typosIngo Klöcker2024-06-121-2/+2
| | | | | * lang/qt/README: Fix typos. --
* qt: Align license of some Makefiles with license of other MakefilesIngo Klöcker2024-06-102-24/+26
| | | | | | | | | | * lang/qt/doc/Makefile.am, lang/qt/tests/Makefile.am: Change license from LGPL to GPL. -- Both files are part of QGpgME (as lang/qt/Makefile.am and lang/qt/src/Makefile.am). Hence, they should be licensed as other parts of QGpgME.
* qt: Fix license headers of MakefilesIngo Klöcker2024-06-102-15/+15
| | | | | | | | | | * lang/qt/Makefile.am, lang/qt/src/Makefile.am: Files are part of QGpgme. Fix wrong package name (GPGME-CL -> QGpgME). Replace references to LGPL with references to GPL. -- The files were already licensed under the GPL but the license headers contained multiple (copy&paste?) errors.
* qt: Fix license headers of CMake config filesIngo Klöcker2024-06-106-18/+18
| | | | | | | | | | | | | | | | * lang/qt/src/QGpgmeConfig-w32.cmake.in.in, lang/qt/src/QGpgmeConfig.cmake.in.in, lang/qt/src/QGpgmeConfigVersion.cmake.in: Files are part of QGpgME. Fix copy&paste error (GPGME-CL -> QGpgME). Fix reference to license to check for details. * lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config.cmake.in.in, lang/qt/src/QGpgmeQt6ConfigVersion.cmake.in: Files are part of QGpgME. Fix reference to license to check for details. -- The files were already licensed under the GPL but the license headers contained multiple (copy&paste?) errors.
* qt: Fix license headers of dataprovider.*Ingo Klöcker2024-06-102-30/+30
| | | | | | | | | * lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h: Change license header from LGPL to GPL. -- QGpgME is released under the GPL. As part of QGpgME these files (that were originally licensed under the LGPL) are released under the GPL.
* cpp: Remove commented out and disabled codeIngo Klöcker2024-06-102-156/+0
| | | | | | * lang/cpp/src/configuration.cpp: Remove disabled, abandoned code. * lang/cpp/src/context.cpp: Remove commented out, obsolete code. --
* doc: Extend description for GPGME_CREATE_ADSKWerner Koch2024-06-051-1/+4
| | | | --
* core,w32: Pass file names with forward slashes to gpg and gpgtarIngo Klöcker2024-06-043-29/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/conversion.c, src/util.h (_gpgme_replace_backslashes): New. src/engine-gpg.c (_add_arg): Add argument file_name. On Windows, replace backslashes in file name arguments with forward slashes. (add_arg_ext, add_arg_with_locp, add_arg, add_arg_pfx, add_gpg_arg, add_gpg_arg_with_value, add_arg_len): Adjust call of _add_arg. (add_file_name_arg, add_file_name_arg_len, add_gpg_arg_with_file_name): New. (add_file_name_arg_or_data): Call add_file_name_arg for file name. (gpg_new): Call add_gpg_arg_with_file_name for home directory. (gpg_decrypt): Call add_file_name_arg for output directory and output file name. (append_args_from_recipients_string): Call add_file_name_arg_len for recipients file name. (gpg_encrypt): Call add_file_name_arg for output file name, base directory and input file name. Call add_gpg_arg_with_file_name to set file name stored in message. (gpg_encrypt_sign): Call add_file_name_arg for output file name, base directory and input file name. Call add_gpg_arg_with_file_name to set file name stored in message. (gpg_sign): Call add_file_name_arg for output file name, base directory and input file name. Call add_gpg_arg_with_file_name to set file name stored in message. (gpg_verify): Call add_file_name_arg for output directory and output file name. -- By passing all file names with forward slashes to gpg and gpgtar we avoid problems caused by the quoting of backslashes. GnuPG-bug-id: 7141
* build,python: Fix make distcheck for Python 3.9+Ingo Klöcker2024-05-291-2/+6
| | | | | | | | | | | * lang/python/Makefile.am (uninstall-local): Remove installed .egg folders. -- Python 3.9+ install the module into a gpg-*.egg folder instead of in "gpg" with accompanying gpg-*.egg-info file. Moreover, Python 3.9+ normalize version numbers, e.g. the version 1.24.0_beta576 is normalized as 1.24.0b576.