Commit Graph

1242 Commits

Author SHA1 Message Date
Ingo Klöcker
6334960bbe
build,cpp: Support building C++ bindings as nested package of gpgme
* Makefile.am: Add variables languages, dist_languages,
distcheck_languages, release_languages, sign_release_languages,
distclean_languages. Add rules for nested language bindings.
(distclean-local, dist-all, distcheck-all, release-all,
sign-release-all): New rules.
(.PHONY): Add all new rules.
* autogen-all.sh: New.
* configure.ac: Add cpp to available languages if subdir exists. Add
cpp to nested languages if enabled to generate corresponding make
targets. Call configure script of nested cpp package recursively.
* lang/cpp/configure.ac: Check if gpgmepp is built as nested package
and set GPGME_CFLAGS and GPGME_LIBS accordingly.
--

This re-adds the ability to build the C++ bindings together with gpgme
with a single `configure && make` command (if building from git). It
also adds make targets for running dist, distcheck, release and
sign-release for gpgme and all enabled nested languages with a single
make command.

GnuPG-bug-id: 7110
2024-06-11 14:58:00 +02:00
Ingo Klöcker
f87e23c512
build,python: Separate Python bindings from gpgme
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--

This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.

GnuPG-bug-id: 7110
2024-06-11 14:57:28 +02:00
Ingo Klöcker
28c23ce8db
build,cpp: Separate C++ bindings from gpgme
* configure.ac: Remove definition and substitution of
LIBGPGMEPP_LT_CURRENT, LIBGPGMEPP_LT_AGE, LIBGPGMEPP_LT_REVISION.
Remove "cpp" from available_languages and from default_languages.
Remove checks for C++ 11 and for support of visibility attribute.
Remove substitution of GPGME_CPP_CFLAGS.
Remove definition and substitution of GPGMEPP_PKGCONFIG_LIBS,
GPGMEPP_PKGCONFIG_CFLAGS, GPGMEPP_PKGCONFIG_HOST.
Remove generation of files in lang/cpp.
* lang/Makefile.am (DIST_SUBDIRS): Remove cpp.
* lang/cpp/.gitignore, lang/cpp/AUTHORS, lang/cpp/COPYING,
lang/cpp/COPYING.LESSER, lang/cpp/COPYING.LIB, lang/cpp/ChangeLog,
lang/cpp/INSTALL, lang/cpp/NEWS, lang/cpp/autogen.rc,
lang/cpp/autogen.sh, lang/cpp/configure.ac: New.
* lang/cpp/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc,
VERSION.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/cpp/build-aux/compile, lang/cpp/build-aux/config.guess,
lang/cpp/build-aux/config.sub, lang/cpp/build-aux/depcomp,
lang/cpp/build-aux/install-sh, lang/cpp/build-aux/libtool-patch.sed,
lang/cpp/build-aux/ltmain.sh, lang/cpp/build-aux/missing: New.
* m4/ax_cxx_compile_stdcxx.m4: Move to...
* lang/cpp/m4/ax_cxx_compile_stdcxx.m4: ...here.
* m4/ax_gcc_func_attribute.m4: Move to...
* lang/cpp/m4/ax_gcc_func_attribute.m4: ...here.
* lang/cpp/m4/gpg-error.m4, lang/cpp/m4/gpgme.m4,
lang/cpp/m4/libtool.m4, lang/cpp/m4/ltoptions.m4,
lang/cpp/m4/ltsugar.m4, lang/cpp/m4/ltversion.m4,
lang/cpp/m4/lt~obsolete.m4: New.
* lang/cpp/src/GpgmeppConfig-w32.cmake.in.in,
lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove @LIBASSUAN_LIBS@ from
INTERFACE_LINK_LIBRARIES of Gpgmepp target.
* lang/cpp/src/Makefile.am (AM_CPPFLAGS): Replace include paths of
gpgme relative to top_builddir with @GPGME_CFLAGS@. Remove
@LIBASSUAN_CFLAGS@.
(libgpgmepp_la_LIBADD): Replace relative paths of libgpgme.la with
@GPGME_LIBS@. Remove @LIBASSUAN_LIBS@.
* lang/cpp/tests/Makefile.am (LDADD): Replace relative paths of
libgpgme.la with @GPGME_LIBS@.
(AM_CPPFLAGS): Replace include paths of gpgme relative to top_builddir
with @GPGME_CFLAGS@. Remove @LIBASSUAN_CFLAGS@. Remove -DTOP_SRCDIR.
--

This makes building and distributing GpgME++ independent of the sources
of gpgme. Many of the new files are copied from gpgme to make GpgME++ a
self-contained package. A later commit re-adds the possibility to build
GpgME++ as nested package together with gpgme.

GnuPG-bug-id: 7110
2024-06-11 14:23:40 +02:00
Ingo Klöcker
e64dd7ee51
cpp: Don't include config.h
* lang/cpp/src/*.cpp, lang/cpp/tests/*.cpp: Remove config.h include.
--

The C++ binding sources don't need anything from config.h.

GnuPG-bug-id: 7110
2024-06-11 14:23:40 +02:00
Ingo Klöcker
130766ffc5
build,qt: Separate Qt bindings from gpgme
* configure.ac: Remove definition and substitution of
LIBQGPGME_LT_CURRENT, LIBQGPGME_LT_AGE, LIBQGPGME_LT_REVISION.
Remove "qt qt5 qt6" from available_languages.
Remove "qt" from default_languages.
Remove options --enable-reduce-relocations and
--enable-no-direct-extern-access.
Remove checks for pkg-config, Qt 5, Qt 6 and C++ 17.
Remove adding visibility flag to GPGME_QT5_CFLAGS and GPGME_QT6_CFLAGS.
Remove definition of conditionals WANT_QT5 and WANT_QT6.
Remove checks for doxygen and dot.
Remove generation of files in lang/qt.
* lang/Makefile.am (DIST_SUBDIRS): Remove qt.
* lang/qt/.gitignore, lang/qt/AUTHORS, lang/qt/COPYING,
lang/qt/ChangeLog, lang/qt/INSTALL, lang/qt/NEWS, lang/qt/autogen.rc,
lang/qt/autogen.sh, lang/qt/configure.ac: New.
* lang/qt/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc,
VERSION.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/qt/build-aux/compile, lang/qt/build-aux/config.guess,
lang/qt/build-aux/config.sub, lang/qt/build-aux/depcomp,
lang/qt/build-aux/install-sh, lang/qt/build-aux/libtool-patch.sed,
lang/qt/build-aux/ltmain.sh, lang/qt/build-aux/missing: New.
* lang/qt/doc/Doxyfile.in (INPUT): Update path.
* m4/ax_check_compile_flag.m4: Move to...
* lang/qt/m4/ax_check_compile_flag.m4: ...here
* m4/pkg.m4: Move to...
* lang/qt/m4/pkg.m4: ...here
* m4/qt5.m4: Move to...
* lang/qt/m4/qt5.m4: ...here
* m4/qt6.m4: Move to...
* lang/qt/m4/qt6.m4: ...here
* lang/qt/m4/ax_cxx_compile_stdcxx.m4,
lang/qt/m4/ax_gcc_func_attribute.m4, lang/qt/m4/gpg-error.m4,
lang/qt/m4/gpgme.m4, lang/qt/m4/gpgmepp.m4, lang/qt/m4/libtool.m4,
lang/qt/m4/ltoptions.m4, lang/qt/m4/ltsugar.m4,
lang/qt/m4/ltversion.m4, lang/qt/m4/lt~obsolete.m4: New.
* lang/qt/src/Makefile.am (AM_CPPFLAGS): Replace include paths of
gpgmepp and gpgme relative to top_builddir with @GPGMEPP_CFLAGS@ and
@GPGME_CFLAGS@.
(libqgpgme_la_LIBADD, libqgpgmeqt6_la_LIBADD): Replace relative paths
of libgpgmepp.la and libgpgme.la with @GPGMEPP_LIBS@ and @GPGME_LIBS@.
* lang/qt/tests/Makefile.am (EXTRA_DIST): Add new files.
(LDADD): Replace relative paths of libgpgmepp.la and libgpgme.la with
@GPGMEPP_LIBS@ and @GPGME_LIBS@.
(AM_CPPFLAGS): Replace include paths of gpgmepp and gpgme relative to
top_builddir with @GPGMEPP_CFLAGS@ and @GPGME_CFLAGS@.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
* lang/qt/tests/pubdemo.asc, lang/qt/tests/secdemo.asc,
lang/qt/tests/start-stop-agent: New.
--

This makes building and distributing QGpgME independent of the sources
of gpgme. Many of the new files are copied from gpgme to make QGpgME a
self-contained package. A later commit re-adds the possibility to build
QGpgME as nested package together with gpgme.

GnuPG-bug-id: 7110
2024-06-11 14:23:39 +02:00
Ingo Klöcker
84affea627
qt: Don't include config.h
* lang/qt/src/*.cpp, lang/qt/tests/*.cpp: Remove config.h include.
--

The Qt binding sources don't need anything from config.h.

GnuPG-bug-id: 7110
2024-06-10 14:59:29 +02:00
Ingo Klöcker
76b38f54a5
cpp: Add pkgconfig file for gpgmepp
* 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 by qgpgme to find gpgmepp.

GnuPG-bug-id: 7110
2024-06-10 14:58:53 +02:00
Ingo Klöcker
5b0903c9af
qt: Always include C++ binding headers with gpgme++/ prefix
* 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
2024-06-10 14:58:53 +02:00
Ingo Klöcker
8be031ebdb
build,cpp: Create forwarding headers in a gpgme++ folder
* 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.

GnuPG-bug-id: 7110
2024-06-10 14:58:53 +02:00
Ingo Klöcker
87319b3fc7
qt: Align license of some Makefiles with license of other Makefiles
* 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.
2024-06-10 14:56:02 +02:00
Ingo Klöcker
29be63ae37
qt: Fix license headers of Makefiles
* 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.
2024-06-10 14:55:50 +02:00
Ingo Klöcker
09cc0c81f7
qt: Fix license headers of CMake config files
* 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.
2024-06-10 14:55:42 +02:00
Ingo Klöcker
967b6b726e
qt: Fix license headers of dataprovider.*
* 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.
2024-06-10 14:55:26 +02:00
Ingo Klöcker
4136928f0d
cpp: Remove commented out and disabled code
* lang/cpp/src/configuration.cpp: Remove disabled, abandoned code.
* lang/cpp/src/context.cpp: Remove commented out, obsolete code.
--
2024-06-10 14:54:48 +02:00
Ingo Klöcker
1245b09012
build,python: Fix make distcheck for Python 3.9+
* 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.
2024-05-29 17:13:30 +02:00
Ben Greiner
5844d9e700
build,python: Build Python bindings without distutils
* m4/python.m4: Add python3.12 and 3.11 as valid interpreters, remove
EOL 3.4, 3.5, 3.7 (keep 3.6 because some distributions still ship and
maintain it).
* lang/python/Makefile.am (clean-local): Remove dist and gpg.egg-info
created by Python 3.9+ on make install.
* lang/python/setup.py.in: switch from distutils to setuptools where
possible, remove obsolete and deprecated -py3 option of swig, add
classifiers up to 3.12, remove 3.4, 3.5, 3.7.
* lang/python/doc/src/gpgme-python-howto.org: replace distutils with
setuptools
* lang/python/examples/howto/advanced/cython/setup.py: replace distutils
with setuptools
--

This fixes building the Python bindings for Python 3.12 where distutils
has been removed.

Based on D545
2024-05-29 17:04:10 +02:00
Ingo Klöcker
6aa359b1e8
cpp: Fix includes in public headers
* lang/cpp/src/defaultassuantransaction.h,
lang/cpp/src/gpgadduserideditinteractor.h,
lang/cpp/src/gpgagentgetinfoassuantransaction.h,
lang/cpp/src/gpggencardkeyinteractor.h,
lang/cpp/src/gpgsetexpirytimeeditinteractor.h,
lang/cpp/src/gpgsetownertrusteditinteractor.h,
lang/cpp/src/gpgsignkeyeditinteractor.h,
lang/cpp/src/interfaces/assuantransaction.h,
lang/cpp/src/interfaces/dataprovider.h,
lang/cpp/src/interfaces/statusconsumer.h,
lang/cpp/src/scdgetinfoassuantransaction.h,
lang/cpp/src/statusconsumerassuantransaction.h,
lang/cpp/src/trustitem.h: Use #include "foo.h" instead of
#include <foo.h> for own headers.
--

This fixes the build for projects that include the headers (as intended)
with #include <gpgme++/...> and that don't add the gpgme++ subdirectory
to the list of include paths for the compiler.

GnuPG-bug-id: 7110
2024-05-24 10:51:32 +02:00
Ingo Klöcker
f0d1f2c4c7
Merge branch 'ikloecker/t7118-revkeys' 2024-05-24 10:47:15 +02:00
Tobias Fella
15718cb295
qt,cpp: Implement adding ADSKs to existing keys
* lang/cpp/src/context.cpp: Add functions for adding ADSKs.
* lang/cpp/src/context.h: Ditto.
* lang/qt/src/qgpgmequickjob.cpp: Add implementation of ADSK job.
* lang/qt/src/qgpgmequickjob.h: Ditto.
* lang/qt/src/quickjob.h: Add job for adding ADSKs.
2024-05-22 13:08:50 +02:00
Ingo Klöcker
90eb80134b
cpp: Add information about revocation keys to Key
* lang/cpp/src/gpgmefw.h (gpgme_revocation_key_t): New forward
declaration.
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods
revocationKey, numRevocationKeys, revocationKeys.
(class RevocationKey): New.
(swap): New overload for RevocationKey.
(operator<<): New overload for RevocationKey.
* lang/cpp/src/key.cpp (operator<<): Add information about revocation
keys to the output stream for Key.

* lang/cpp/tests/run-keylist.cpp (main): Don't output Key if nextKey
failed, e.g. at the end of the key listing.
--

GnuPG-bug-id: 7118
2024-05-21 16:38:59 +02:00
Ingo Klöcker
c933269d3a
qt: Avoid bogus stringop-overread warning
* lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use
QByteArray overload of QString::fromUtf8.
--

There's no need to make the code more complicated than necessary. Unless
we want to provoke weird compiler warnings. :-)
2024-05-21 12:36:11 +02:00
Ingo Klöcker
333241b286
qt: Fix warning about missing return
* lang/qt/src/qgpgmeexportjob.cpp (ExportJob::exec): Return a value and
remove unused argument names.
--

ExportJob::exec is never executed because its virtual overload is always
used. Therefore it doesn't matter what value we return.
2024-05-21 12:24:31 +02:00
Ingo Klöcker
e4a95746ad
cpp: Handle smart card op failure status messages
* lang/cpp/src/editinteractor.cpp (parse_sc_op_failure): New.
(CallbackHelper::edit_interactor_callback_impl): Parse failure code on
GPGME_STATUS_SC_OP_FAILURE status.
(sc_op_failure_to_error): New.
--

This converts a SC_OP_FAILURE status message logged by gpg to a
corresponding error. Unfortunately, GPG_ERR_BAD_PIN and
GPG_ERR_BAD_RESET_CODE are mapped to the same SC_OP_FAILURE code, so
that we had to choose one.

GnuPG-bug-id: 6971
2024-04-05 15:08:01 +02:00
Andre Heinecke
67057d83f5
Qt: Fix windows build of new jobs
--
See git log for changes.
2024-03-13 13:15:41 +01:00
Tobias Fella
47f3d92bf3
qt: Add function for synchronously executing ExportJob
* lang/qt/src/exportjob: Add exec function.
* lang/qt/src/qgpgmeexportjob.cpp: Implement exec function.
* lang/qt/src/qgpgmeexportjob.h: Override exec function.

--

GnuPG-Bug-Id: 6893
2024-01-22 11:24:49 +01:00
Ingo Klöcker
0011412193
qt: Remove superfluous virtual overrides and member variables
* lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp
(QGpgMEAddExistingSubkeyJob::exec): Remove call of resultHook.
* lang/qt/src/qgpgmedecryptjob.cpp (QGpgMEDecryptJob::exec): Remove
call of resultHook.
(QGpgMEDecryptJob::resultHook): Remove.
* lang/qt/src/qgpgmedecryptjob.h (QGpgMEDecryptJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmedecryptverifyjob.cpp (QGpgMEDecryptVerifyJob::exec):
Remove call of resultHook.
(QGpgMEDecryptVerifyJob::resultHook): Remove.
* lang/qt/src/qgpgmedecryptverifyjob.h (QGpgMEDecryptVerifyJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJob::exec): Remove
call of resultHook.
(QGpgMEEncryptJob::resultHook): Remove.
* lang/qt/src/qgpgmeencryptjob.h (QGpgMEEncryptJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmegpgcardjob.cpp (QGpgMEGpgCardJob::exec): Remove
call of resultHook.
* lang/qt/src/qgpgmeimportfromkeyserverjob.cpp
(QGpgMEImportFromKeyserverJob::exec): Remove call of resultHook.
(QGpgMEImportFromKeyserverJob::resultHook): Remove.
* lang/qt/src/qgpgmeimportfromkeyserverjob.h
(QGpgMEImportFromKeyserverJob): Remove resultHook override. Remove
member mResult.
* lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJob::exec): Remove call
of resultHook.
(QGpgMEImportJob::resultHook): Remove.
* lang/qt/src/qgpgmeimportjob.h (QGpgMEImportJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmekeyformailboxjob.cpp (QGpgMEKeyForMailboxJob::exec):
Remove call of resultHook.
* lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::QGpgMEKeyListJob):
Remove initialization of mResult.
(QGpgMEKeyListJob::resultHook): Do not set (removed) mResult.
* lang/qt/src/qgpgmekeylistjob.h (QGpgMEKeyListJob): Remove member
mResult.
* lang/qt/src/qgpgmelistallkeysjob.cpp
(QGpgMEListAllKeysJob::QGpgMEListAllKeysJob): Remove initialization of
mResult.
(QGpgMEListAllKeysJob::exec): Remove call of resultHook.
(QGpgMEListAllKeysJob::resultHook): Remove.
* lang/qt/src/qgpgmelistallkeysjob.h (QGpgMEListAllKeysJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmereceivekeysjob.cpp (QGpgMEReceiveKeysJob::exec):
Remove call of resultHook.
(QGpgMEReceiveKeysJob::resultHook): Remove.
* lang/qt/src/qgpgmereceivekeysjob.h (QGpgMEReceiveKeysJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmerevokekeyjob.cpp (QGpgMERevokeKeyJob::exec): Remove
call of resultHook.
* lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJob::exec):
Remove call of resultHook.
(QGpgMESignEncryptJob::resultHook): Remove.
* lang/qt/src/qgpgmesignencryptjob.h (QGpgMESignEncryptJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmesignjob.cpp (QGpgMESignJob::exec): Remove call of
resultHook.
(QGpgMESignJob::resultHook): Remove.
* lang/qt/src/qgpgmesignjob.h (QGpgMESignJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmeverifydetachedjob.cpp
(QGpgMEVerifyDetachedJob::exec): Remove call of resultHook.
(QGpgMEVerifyDetachedJob::resultHook): Remove.
* lang/qt/src/qgpgmeverifydetachedjob.h (QGpgMEVerifyDetachedJob):
Remove resultHook override. Remove member mResult.
* lang/qt/src/qgpgmeverifyopaquejob.cpp (QGpgMEVerifyOpaqueJob::exec):
Remove call of resultHook.
(QGpgMEVerifyOpaqueJob::resultHook): Remove.
* lang/qt/src/qgpgmeverifyopaquejob.h (QGpgMEVerifyOpaqueJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmewkdlookupjob.cpp (QGpgMEWKDLookupJob::exec):
Remove call of resultHook.
--

All overrides of resultHook (except for the one of QGpgMEKeyListJob)
are superfluous. All the resultHook overrides do is store the result in
a member variable which is then returned in exec() (which just before
returning calls resultHook). The member variable the result is stored in
is only ever used by exec(). So exec() can simply return the result
directly. Some Job subclasses call resultHook without overriding it.
That's equally useless because the default implementation of resultHook
is empty. The only resultHook override that does anything useful is the
one of QGpgMEKeyListJob.
2024-01-19 16:07:14 +01:00
Ingo Klöcker
eae22d9a48
qt: Remove left-over mentions of showErrorDialog
* lang/qt/src/qgpgmedecryptjob.cpp,
lang/qt/src/qgpgmeimportfromkeyserverjob.cpp,
lang/qt/src/qgpgmeimportjob.cpp: Remove obsolete comment.
* lang/qt/src/qgpgmekeylistjob.cpp,
lang/qt/src/qgpgmelistallkeysjob.cpp: Remove long obsolete, #if 0'ed out
definitions of showErrorDialog.
--

Informing the users about errors is the responsibility of the users of
the QGpgME Job API since a long time.
2024-01-19 15:44:22 +01:00
Ingo Klöcker
85c7a94d63
cpp,tests: Launch dirmngr with gpg-conf
* lang/cpp/tests/run-wkdlookup.cpp (main): Replace backslashes with
forward slashes in homedir returned by GpgME::dirInfo. Use "gpgconf
--launch dirmngr" to start dirmngr.
--

With this change the same code as by QGpgMEWKDLookupJob is again used to
launch dirmngr. It also fixes the bad example of starting dirmngr
without the help of gpgconf.

GnuPG-bug-id: 6833
2024-01-09 11:22:43 +01:00
Ingo Klöcker
7e520213c0
qt: Pass home directory with forward slashes when launching dirmngr
* lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Replace backslashes
with forward slashes in homedir returned by GpgME::dirInfo.
--

This works around a bug which causes backslashes to be escaped (doubled)
twice on Windows, once by gpgme_op_spawn and once by the spawn helper
gpgme-w32spawn. The next versions of GnuPG 2.2 and 2.4 also have a
workaround for this.

GnuPG-bug-id: 6833
2024-01-09 11:13:51 +01:00
Tobias Fella
d60d1b7f79
qt: Fix validity for (sub)keys generated using QGpgMEQuickJob
* lang/qt/src/qgpgmequickjob.cpp: Fix expiration calculation
--

The job calculates the validity as the seconds since epoch,
while GPG expects the seconds since the current time.
This leads to the validity being significantly longer than expected.

GnuPG-Bug-Id: 6889
2024-01-08 14:36:26 +01:00
Ingo Klöcker
c631622484
qt: Support verification of detached signatures directly from files
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (VerifyDetachedJob): Move definition of
constructor and destructor and inclusion of the moc file to the
corresponding .cpp file.
* lang/qt/src/verifydetachedjob.cpp: New.
* lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member
functions setSignatureFile, signatureFile, setSignedFile, signedFile.
* lang/qt/src/verifydetachedjob_p.h: New.
* lang/qt/src/qgpgmeverifydetachedjob.cpp (class
QGpgMEVerifyDetachedJobPrivate): New.
(QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob): Instantiate private
job class.
(verify_from_filename): New.

* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-verifydetachedjob.cpp: New.
--

This makes it possible to tell gpg to read the input directly from the
specified files bypassing GpgME's Data IO when verifying a detached
signature.

GnuPG-bug-id: 6550
2024-01-05 12:10:22 +01:00
Ingo Klöcker
0b3c8709f7
qt,doc: Document that Job::startIt() doesn't self-destruct Job on error
--
GnuPG-bug-id: 6550
2023-12-22 10:35:15 +01:00
Ingo Klöcker
e77a8ac0cc
qt: Support verification of opaque signed data directly to/from files
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (VerifyOpaqueJob): Move definition of constructor
and destructor and inclusion of the moc file to the corresponding .cpp
file.
* lang/qt/src/verifyopaquejob.cpp: New.
* lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member
functions setInputFile, inputFile, setOutputFile, outputFile.
* lang/qt/src/verifyopaquejob_p.h: New.
* lang/qt/src/qgpgmeverifyopaquejob.cpp (class
QGpgMEVerifyOpaqueJobPrivate): New.
(QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob): Instantiate private
job class.
(verify_from_filename): New.

* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-verifyopaquejob.cpp: New.
--

This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
verifying an opaque signed (or clear signed) file.

GnuPG-bug-id: 6550
2023-12-22 10:05:16 +01:00
Ingo Klöcker
20b32e0350
qt: Support decryption (with verification) directly to/from files
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (DecryptVerifyJob): Move definition of constructor
and destructor and inclusion of the moc file to the corresponding .cpp
file.
* lang/qt/src/decryptverifyjob.cpp: New.
* lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member
functions setInputFile, inputFile, setOutputFile, outputFile.
* lang/qt/src/decryptverifyjob_p.h: New.
* lang/qt/src/qgpgmedecryptverifyjob.cpp (class
QGpgMEDecryptVerifyJobPrivate): New.
(QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob): Instantiate private
job class.
(decrypt_verify_from_filename): New.

* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-decryptverifyjob.cpp: New.
--

This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
decrypting (and verifying) a file.

GnuPG-bug-id: 6550
2023-12-22 10:01:17 +01:00
Ingo Klöcker
a44d84772d
qt: Support writing/reading signed/encrypted files directly to/from file
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (EncryptJob, SignJob, SignEncryptJob): Move
definition of constructor and destructor and inclusion of the moc file
to the corresponding .cpp files.
* lang/qt/src/encryptjob.cpp (EncryptJob): Define constructor. Define
destructor as default. Include moc file.
* lang/qt/src/encryptjob.cpp, lang/qt/src/encryptjob.h (EncryptJob):
Add member functions setRecipients, recipients, setInputFile, inputFile,
setOutputFile, outputFile, setEncryptionFlags, encryptionFlags.
* lang/qt/src/encryptjob_p.h (EncryptJobPrivate): Add members
m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags.
* lang/qt/src/qgpgmeencryptjob.cpp (encrypt_to_filename): New.
(QGpgMEEncryptJobPrivate::startIt): Start the job with the values
from the member variables.
* lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt_to_filename): New.
(QGpgMESignEncryptJobPrivate::startIt): Start the job with the values
from the member variables.
* lang/qt/src/qgpgmesignjob.cpp (class QGpgMESignJobPrivate): New.
(QGpgMESignJob::QGpgMESignJob): Instantiate private job class.
(sign_to_filename): New.
* lang/qt/src/signencryptjob.cpp (SignEncryptJob): Define constructor.
Define destructor as default. Include moc file.
* lang/qt/src/signencryptjob.cpp, lang/qt/src/signencryptjob.h
(SignEncryptJob): Add member functions setSigners, signers,
setRecipients, recipients, setInputFile, inputFile, setOutputFile,
outputFile, setEncryptionFlags, encryptionFlags.
* lang/qt/src/signencryptjob_p.h (SignEncryptJobPrivate): Add members
m_signers, m_recipients, m_inputFilePath, m_outputFilePath,
m_encryptionFlags.
* lang/qt/src/signjob.cpp: New.
* lang/qt/src/signjob.h (SignJob): Add member functions setSigners,
signers, setInputFile, inputFile, setOutputFile, outputFile,
setSigningFlags, signingFlags.
* lang/qt/src/signjob_p.h: New.
* lang/qt/tests/Makefile.am: Add new test programs.
* lang/qt/tests/run-encryptjob.cpp: New.
* lang/qt/tests/run-signjob.cpp: New.
--

This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
signing and/or encrypting a file.

GnuPG-bug-id: 6550
2023-12-21 11:49:23 +01:00
Ingo Klöcker
b166958b86
qt: Remove dead code
* lang/qt/src/qgpgmeencryptjob.cpp,
lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp:
Remove long commented out showErrorDialog member function definitions.
--

Displaying error messages is delegated to the job users since ages.
2023-12-21 09:12:43 +01:00
Ingo Klöcker
60c0fd7c95
cpp: Support new flags for direct signing/encryption of files
* lang/cpp/src/context.h (enum EncryptionFlags): Add constant
EncryptFile.
* lang/cpp/src/global.h (enum SignatureMode): Add constant SignFile.
* lang/cpp/src/context.cpp (sigflags2sigflags): Handle new flag
SignFile.
(encryptflags2encryptflags): Handle new flag EncryptFile.
(operator<<): Add new flags to the corresponding debug streams.
* lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle
new flag SignFile (even if it cannot occur).
--

GnuPG-bug-id: 6550
2023-12-19 14:01:18 +01:00
Ingo Klöcker
d5dafb2ae3
qt: Replace Q_FOREACH with range-for
* lang/qt/src/qgpgmekeyformailboxjob.cpp (do_work): Replace Q_FOREACH
with range-for.
* lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::resultHook):
Ditto.
* lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Ditto.
* lang/qt/tests/t-keylist.cpp (KeyListTest::testPubkeyAlgoAsString):
Ditto.
* lang/qt/tests/t-keylocate.cpp (KeyLocateTest::testDaneKeyLocate,
KeyLocateTest::testKeyLocateSingle): Ditto.
* lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Replace Q_FOREACH
with range-for. Add braces around single statement blocks.
* lang/qt/src/qgpgmesignjob.cpp (sign): Ditto.
* lang/qt/src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfig::reloadConfiguration,
QGpgMENewCryptoConfig::sync,
QGpgMENewCryptoConfigComponent::setComponent,
QGpgMENewCryptoConfigEntry::urlValueList,
QGpgMENewCryptoConfigEntry::setURLValueList): Replace Q_FOREACH with
range-for. Fix indentation. Add braces around single statement blocks.
--

Where necessary the iterated object is wrapped with qAsConst to avoid
deep copies of the iterated object.
2023-12-13 13:16:21 +01:00
Ingo Klöcker
f7d69de030
qt: Replace Q_NULLPTR with nullptr
* lang/qt/src/defaultkeygenerationjob.h, lang/qt/src/qgpgmebackend.h,
lang/qt/src/quickjob.h, lang/qt/src/threadedjobmixin.h: Replace all
occurrences of Q_NULLPTR with nullptr.
--
2023-12-13 13:04:32 +01:00
Ingo Klöcker
1bbe2d4b70
qt: Start dirmngr with gpgconf to avoid multiple instances
* lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use "gpgconf
--launch dirmngr" to start dirmngr.
--

Using gpgconf to start dirmngr prevents multiple instances to be started
by the concurrently running keyserver lookup and WKD lookup.

GnuPG-bug-id: 6833
2023-11-23 16:13:39 +01:00
Ingo Klöcker
618fea9e20
qt: On Windows, use UTF-8 when logging the error text
* lang/qt/src/debug.cpp (operator<<): On Windows, interpret the error
text as UTF-8 instead of local 8-bit encoding.
--

GnuPG-bug-id: 5960
2023-11-15 11:57:18 +01:00
Ingo Klöcker
278f92b189
qt: Remove left-over partial files more persistently
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/cleaner.cpp, lang/qt/src/cleaner.h: New.
* lang/qt/src/util.cpp (PartialFileGuard::~PartialFileGuard): Call
Cleaner::removeFile instead of removeFile.
* lang/qt/src/util.cpp, lang/qt/src/util.h (removeFile): Remove.
--

If the initial attempt to remove the file fails then a Cleaner is
created that tries to remove the file at regular intervals (10 s)
and on destruction (which happens on application shutdown).

GnuPG-bug-id: 6584
2023-11-15 11:57:18 +01:00
Ingo Klöcker
52d59d75ca
qt: Deprecate DefaultKeyGenerationJob
* lang/qt/src/defaultkeygenerationjob.h (class DefaultKeyGenerationJob):
Deprecate.
--

GnuPG generates Ed25519 keys by default and has switched to 3072 bits as
default for RSA keys. DefaultKeyGenerationJob always generates RSA 2048
keys and uses the old parameter file API of GnuPG. It shouldn't be used
anymore.

GnuPG-bug-id: 6805
2023-11-10 08:55:07 +01:00
Ingo Klöcker
46f5d5eeb3
qt: Use temporary .part file names when creating archives
* lang/qt/src/util.h, lang/qt/src/util.cpp (class PartialFileGuard):
New.
* lang/qt/src/util.cpp (getRandomCharacters, createPartFileName): New.
* lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt_to_filename): Use
PartialFileGuard.
* lang/qt/src/qgpgmesignarchivejob.cpp (sign_to_filename): Ditto.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp
(sign_encrypt_to_filename): Ditto.
--

When creating signed and/or encrypted archives, gpgtar now writes the
result to a temporary file name. On success, the archive is renamed to
the final file name. Otherwise, the (partially written) temporary file
is removed (if possible).

GnuPG-bug-id: 6721
2023-10-27 16:07:34 +02:00
Ingo Klöcker
8d8985bda1
qt: Refactor removal of output file on cancel or error
* lang/qt/src/util.h, lang/qt/src/util.cpp (removeFile): New.
* lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Move removal of
output file from here
(encrypt_to_filename): ... to here and use new function.
* lang/qt/src/qgpgmesignarchivejob.cpp (sign): Move removal of output
file from here
(sign_to_filename): ... to here and use new function.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Move
removal of output file from here
(sign_encrypt_to_filename): ... to here and use new function.
--

GnuPG-bug-id: 6721
2023-10-27 16:07:34 +02:00
Andre Heinecke
ab25df8328
qt: Handle cancel in changeexpiryjob
* lang/qt/src/qgpgmechangeexpiryjob.cpp (change_expiry): Return
cancel error.

--
The classical "cancel is not an error" problem.
GnuPG-Bug-Id: T6754
2023-10-18 11:13:35 +02:00
Ingo Klöcker
5c7e4d252a
qt,doc: Fix typos in source code comments
--

Anonymous contribution

Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
2023-10-13 09:23:24 +02:00
Ingo Klöcker
131384b107
python,doc: Fix typos in documentation and source code comments
--

Anonymous contribution

Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
2023-10-13 09:22:36 +02:00
Ingo Klöcker
bd448c9cbf
cpp,doc: Fix typos in API documentation and source code comments
--

Anonymous contribution

Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
2023-10-13 09:21:47 +02:00
Marius P
959f976dfc
python,examples: Add missing word "License"
* lang/python/examples/howto/add-userid.py,
lang/python/examples/howto/clear-sign-file.py,
lang/python/examples/howto/create-key.py,
lang/python/examples/howto/decrypt-file.py,
lang/python/examples/howto/detach-sign-file.py,
lang/python/examples/howto/encrypt-file.py,
lang/python/examples/howto/encrypt-sign-file.py,
lang/python/examples/howto/encrypt-to-group-gullible.py,
lang/python/examples/howto/encrypt-to-group-trustno1.py,
lang/python/examples/howto/encrypt-to-group.py,
lang/python/examples/howto/export-key.py,
lang/python/examples/howto/export-minimised-key.py,
lang/python/examples/howto/export-secret-key.py,
lang/python/examples/howto/export-secret-keys.py,
lang/python/examples/howto/groups.py,
lang/python/examples/howto/import-key.py,
lang/python/examples/howto/import-keybasekey.py,
lang/python/examples/howto/import-keys-hkp.py,
lang/python/examples/howto/import-keys.py,
lang/python/examples/howto/import-mailvelope-keys.py,
lang/python/examples/howto/keycount.py,
lang/python/examples/howto/local-sign-group.py,
lang/python/examples/howto/mutt-groups.py,
lang/python/examples/howto/pmkey-import-alt.py,
lang/python/examples/howto/pmkey-import-hkp-alt.py,
lang/python/examples/howto/pmkey-import-hkp.py,
lang/python/examples/howto/pmkey-import.py,
lang/python/examples/howto/revoke-userid.py,
lang/python/examples/howto/send-key-to-keyserver.py,
lang/python/examples/howto/sign-file.py,
lang/python/examples/howto/sign-key.py,
lang/python/examples/howto/symcrypt-file.py,
lang/python/examples/howto/temp-homedir-config.py,
lang/python/examples/howto/verify-signatures.py,
lang/python/examples/howto/verify-signed-file.py: Add "License" after
"Lesser General Public"
--

Anonymous contribution

Signed-off-by: Ingo Klöcker <dev@ingo-kloecker.de>
2023-10-13 09:08:39 +02:00