* lang/python/setup.py.in (BuildExtFirstHack.run): Extend members of the
extension instead of lists that were passed to the extension.
--
setuptools 72.2.0 integrated changes in distutils which included
"Support for Pathlike objects in data files and extensions". With this
change the extensions now take a copy of the sources list passed to the
constructor instead of keeping a reference to the passed list. Hence,
modifying the sources list that was passed to the extension didn't
change the sources list of the extension anymore. This is fixed by
modifying the sources list of the extension directly. For consistency
we do the same for the swig_opts list.
GnuPG-bug-id: 7281
* configure.ac: Add substitutions GPGMEPP_PKGCONFIG_LIBS,
GPGMEPP_PKGCONFIG_CFLAGS, GPGMEPP_PKGCONFIG_HOST. Apply them. Configure
gpgmepp.pc file.
* lang/cpp/src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add gpgmepp.pc.in.
* lang/cpp/src/gpgmepp.pc.in: New.
--
This pkgconfig file will be used, at least temporarily, by qgpgme
to find gpgmepp, but it's also useful in general for projects that
don't use cmake.
GnuPG-bug-id: 7262
* 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
* 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
* 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".
* 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/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).
* 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
* 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
* 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
* 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
* 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
* 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
* 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.
* 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
* 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
* 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
* 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 <gniibe@fsij.org>
* 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 <gniibe@fsij.org>
* 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 <gniibe@fsij.org>
* 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
* 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
* lang/qt/tests/t-tofuinfo.cpp (TofuInfoTest::signAndVerify,
TofuInfoTest::testTofuPolicy): Use range-based for loop instead of Qt's
deprecated foreach.
--
* 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
* 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
* 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.
* 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.
* 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.
* 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.