* m4/qt6.m4: Do not add -fpic to GPGME_QT6_CFLAGS. Add -fpic to CPPFLAGS
used for build test of simple Qt 6 application.
--
The pkgconfig files of Qt6Core do not contain the qt_config variable,
so that we cannot easily check whether Qt6 was compiled with pic. For
simplicity we always compile the test application with -fpic to avoid
a build failure if Qt6 was actually compiled with pic.
For the actual build of QGpgME libtool automatically uses -fPIC, so that
we don't have to add it to the GPGME_QT6_CFLAGS.
* lang/qt/src/qgpgmenewcryptoconfig.cpp (struct Select1St): Remove.
--
This struct was never used in this implementation of the crypto config
classes and it causes a build error with Qt 6 where QPair is an alias
for std::pair.
* configure.ac: Look for Qt 5 and/or Qt 6. Require C++17 if Qt 6 binding
is built. Build cmake files QGpgmeConfig* for Qt 5 and QGpgmeQt6Config*
for Qt 6.
(available_languages): Add "qt5" and "qt6".
(WANT_QT5, WANT_QT6): New conditionals.
* lang/qt/src/Makefile.am: Keep building libqgpgme for Qt 5. Build
libqgpgmeqt6 for Qt 6.
* lang/qt/tests/Makefile.am: Build tests for Qt 5 or Qt 6.
* lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in,
lang/qt/src/QGpgmeQt6Config.cmake.in.in,
lang/qt/src/QGpgmeQt6ConfigVersion.cmake.in, m4/qt6.m4: New.
--
This makes it possible to build QGpgME optionally for Qt 6.4.0 or later.
By default or if the language "qt" is enabled, then QGpgME is built
either for Qt 5 (if found) or Qt 6. A build for Qt 5 or Qt 6 can be
requested by explicitly enabling the language "qt5" or "qt6". Building
QGpgME for Qt 5 and Qt 6 simultaneously is not supported.
m4/qt.m4: Rename to
m4/qt5.m4: this.
(FIND_QT): Rename to FIND_QT5.
(GPGME_QT): Change variable prefix to GPGME_QT5.
(GPGME_QTTEST: Change variable prefix to GPGME_QT5TEST.
configure.ac, lang/qt/src/Makefile.am, lang/qt/tests/Makefile.am:
Adjust accordingly.
--
In preparation to adding support for building qgpgme for Qt6, add the
version number to a few variables to avoid confusion.
* src/sign.c (parse_sig_created): Special case the rfc4880 "1F" status.
--
This has always been wrong but we can't simply force strtol to assume
hex. Patch compiles but has received no specific test. For details
see
GnuPG-bug-id: 6223
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (enum SignKeyState): Add
new state REJECT_SIGN_EXPIRED.
(makeTable): Add entries for new state to transition map.
(GpgSignKeyEditInteractor::action): Handle new state.
--
With this change the edit interactor aborts the key signing operation
with a "key expired" error instead of with a "general error".
GnuPG-bug-id: 6155
* configure.ac (GPGME_CONFIG_CFLAGS): Prefix with -I${includedir} for
non-standard include paths.
(GPGME_CONFIG_LIBS): Prefix with -L${libdir} for non-standard library
paths.
* src/gpgme.pc.in (Cflags): Remove hard-coded -I${includedir}.
(Libs): Remove hard-coded -L${libdir}.
--
This helps prevent problems when building/linking something that depends
on gpgme (installed in standard path) and some other library (installed
in a standard path and a custom path).
See T6136 for related changes in libgpg-error.
* m4/ax_cxx_compile_stdcxx.m4: Replace with current version from the
autoconf archive.
--
This fixes the problem that the switch -std=c++11 was omitted if the
compiler supported C++11 features by default. This made gcc happily
compile C++14 code. Now C++11 is enforced by gcc.
GnuPG-bug-id: 6141
* lang/qt/src/qgpgmerefreshsmimekeysjob.cpp
(QGpgMERefreshSMIMEKeysJob::start): Replace 'auto' in lambda with the
actual type.
* lang/qt/src/qgpgmesignkeyjob.cpp (class TrustSignatureProperties): Add
default c'tor and c'tor initializing all members.
* lang/qt/src/util.cpp (toFingerprints): Replace 'auto' in lambda with
the actual type.
* lang/qt/tests/run-exportjob.cpp (createExportJob): Replace 'auto'
return type with actual type.
--
This fixes compilation with strict C++11.
GnuPG-bug-id: 6141
* lang/cpp/src/importresult.cpp (ImportResult::mergeWith): Replace
'auto' in lambdas with the actual type.
--
Generic lambdas require C++14.
GnuPG-bug-id: 6141
* lang/qt/tests/t-addexistingsubkey.cpp
(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
negative expiration date.
--
On 32-bit systems the expiration date of the test key overflows. This
will cause the AddExistingSubkeyJob to fail. We expect it to fail with
an "invalid time" error.
GnuPG-bug-id: 6137
* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
logic of string comparisons.
--
This fixes the problem that the interactor didn't return the proper
error code if gpg didn't accept the key grip or the expiration date.
GnuPG-bug-id: 6137
* lang/qt/tests/t-addexistingsubkey.cpp,
lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
uint_least32_t.
--
This doesn't change the outcome of the tests (they also pass without
this change because of the expiration dates of the test keys), but it's
still good practise to treat the expiration time as an unsigned number
if the assertions check that the expiration time is in some range.
GnuPG-bug-id: 6137
* lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp (add_subkey): Convert
expiration time to uint_least32_t.
--
This fixes the corresponding test on 32-bit systems where time_t (the
return type of expirationTime()) is a signed 32-bit integer type.
GnuPG-bug-id: 6137
* src/w32-util.c (_gpgme_get_gpgconf_path): Add fallback for
GnuPG VS-Desktop install scheme.
--
GnuPG VS-Desktop has the install layout:
%PROGRAMFILES%\GnuPG VS-Desktop\bin\libgpgme.dll
%PROGRAMFILES%\GnuPG VS-Desktop\GnuPG\bin\gpgconf.exe
This fallback is of course only required if the registry
string pointing to the correct install directory is
broken.
GnuPG-Bug-Id: T6131
* lang/qt/src/cryptoconfig.cpp (CryptoConfig::entry): Add nullptr
checks.
--
This fixes a crash when gpgconf is not found. When every return
value is NULL.
GnuPG-Bug-Id: T6131
* lang/python/src/core.py (Context, Data): Don't call __del__
from __exit__ method, as the object may be still in use.
* lang/python/tests/t-idiomatic.py: Fix the test.
--
GnuPG-bug-id: 6060
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp,
lang/qt/src/qgpgmerefreshopenpgpkeysjob.h,
lang/qt/src/refreshopenpgpkeysjob.h: Remove.
* lang/qt/src/Makefile.am, lang/qt/src/job.cpp: Update accordingly.
* lang/qt/src/protocol.h (class Protocol): Remove pure virtual member
function refreshOpenPGPKeysJob.
* lang/qt/src/protocol_p.h (Protocol::refreshOpenPGPKeysJob): Remove.
* lang/qt/tests/run-refreshkeysjob.cpp (main): Use ReceiveKeysJob for
OpenPGP keys.
--
The RefreshOpenPGPKeysJob did more than it was intended to do, e.g. it
imported new keys with the email addresses of the key to be refreshed
via the configured auto-key-locate methods, but only a refresh from the
key servers is wanted. For this we can use the ReceiveKeysJob.
This commit mostly reverts the commits
e12861f18cc64a8daf50
The changes are source- and binary-compatible to the last release.
GnuPG-bug-id: 5951
* lang/qt/src/Makefile.am (qgpgme_sources): Add signencryptjob.cpp.
* lang/qt/src/signencryptjob.cpp: New.
* lang/qt/src/signencryptjob.h (class SignEncryptJob): Add member
functions setFileName, fileName.
* lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Set file name of
input.
(sign_encrypt_qba, QGpgMESignEncryptJob::exec,
QGpgMESignEncryptJob::start): Pass file name to sign_encrypt resp.
sign_encrypt_qba.
--
This makes it possible to store the original name of a signed and
encrypted file in the resulting data.
GnuPG-bug-id: 6056
* lang/qt/src/Makefile.am (qgpgme_sources): Add encryptjob.cpp.
* lang/qt/src/encryptjob.cpp: New.
* lang/qt/src/encryptjob.h (class EncryptJob): Add member functions
setFileName, fileName.
* lang/qt/src/qgpgmeencryptjob.cpp (encrypt): Set file name of input.
(encrypt_qba, QGpgMEEncryptJob::exec, QGpgMEEncryptJob::start): Pass
file name to encrypt resp. encrypt_qba.
--
This makes it possible to store the original name of an encrypted file
in the encryption result.
GnuPG-bug-id: 6056
* lang/qt/src/downloadjob.h, lang/qt/src/exportjob.h,
lang/qt/src/keylistjob.h lang/qt/src/refreshkeysjob.h: in qt6 we need
to use #include <QStringList>
--
It fixes some compile qt6 compile error.
Signed-off-by: Laurent Montel <montel@kde.org>
* lang/cpp/src/GpgmeppConfig-w32.cmake.in.in,
lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove find_package() call.
--
The KF5 variants have been removed years ago with revision
a3cf30f894.
* configure.ac (USE_GPGRT_CONFIG): New.
* src/Makefile.am [USE_GPGRT_CONFIG]: Conditionalize the install
of gpgme-config.
--
When system will migrate use of gpgrt-config and removal of
gpg-error-config, gpgme-config will not be installed (but use gpgme.pc
by gpgrt-config).
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/qt/tests/t-various.cpp (TestVarious::testSignKeyWithExpiration):
Assert that the expiration date is either 2106-02-05 or 2106-02-04.
--
This avoids a test failure if the test is run at 00:xx:xx in a location
that uses DST.
GnuPG-bug-id: 5991
* lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Change maxAllowedDate to
2106-02-05. Change log-level from warning to debug.
* lang/qt/tests/t-various.cpp (TestVarious::testSignKeyWithExpiration):
Remove check for warning. Adapt assertion.
--
Capping the expiration date at 2106-02-05 prevents a u32 overflow when
adding the number of days until the maximal date to the current time.
GnuPG-bug-id: 5991
* src/keylist.c (gpgme_op_keylist_from_data_start): Call
_gpgme_op_import_init_result.
--
This fixes a crash when importing keys from data. Initializing the
import result was missing for this keylist operation.
Fixes-commit: f3ca57dfd7
GnuPG-bug-id: 5951