* lang/qt/src/qgpgmenewcryptoconfig.cpp (parseURL): Handle extended
LDAP server option syntax.
(portToString): New.
(splitURL): Append flags to LDAP server option.
--
This adds support for the extended syntax of LDAP server options
introduced in gpg 2.2.18/2.3. The flags are stored as fragment of a
QUrl.
GnuPG-bug-id: 5217
* lang/qt/src/qgpgmesignkeyjob.h: Remove unneeded includes. Include
<memory>.
(QGpgMESignKeyJob): Remove all member variables. Add pimpl pointer.
* lang/qt/src/qgpgmesignkeyjob.cpp: Include <QString>. Don't include
<memory>.
(QGpgMESignKeyJob::Private): New.
(QGpgMESignKeyJob::QGpgMESignKeyJob): Remove initialization of removed
members. Initialize d.
(QGpgMESignKeyJob::start, QGpgMESignKeyJob::setUserIDsToSign,
QGpgMESignKeyJob::setCheckLevel, QGpgMESignKeyJob::setExportable,
QGpgMESignKeyJob::setSigningKey, QGpgMESignKeyJob::setNonRevocable,
QGpgMESignKeyJob::setRemark, QGpgMESignKeyJob::setDupeOk): Adapt to move
of member variables to pimpl.
--
GnuPG-bug-id: 5245, 5421
* lang/qt/src/cryptoconfig.h, lang/qt/src/cryptoconfig.cpp
(CryptoConfig::entry): Move implementation to cpp. Add overload not
requiring a group name.
--
The group name is not needed for identifying a config entry because the
groups only provide a logical grouping of config entry for user
interfaces. To improve usability entries are sometimes moved to a
different group, but this shouldn't break existing applications trying
to access those entries. The new group-agnostic overload makes
applications robust against regrouping of config entries.
GnuPG-bug-id: 5217
* lang/qt/src/encryptjob.h, lang/qt/src/signjob.h (start):
Undeprecate QByteArray based functions.
--
While the QIODevice access might avoid a copy it is more
difficult to manage the data and lifetime of the
QIODevices in calling code. The QByteArray calls are
convienient for small data objects like mails where
an in memory copy is not really expensive anymore.
This reverts commit 88294023c1.
--
This commit was too early and i needed to test more
this is breaking more then it helps so for now
revert it before we can do a proper solution.
* configure.ac: Configure cpp data.h.in
* lang/cpp/src/Makefile.am: Generate data.h
* lang/cpp/src/data.cpp, lang/cpp/src/data.h: Use portable
types.
* lang/qt/src/Makefile.am: Include build dir.
* lang/qt/tests/makefile.am: Include build dir.
--
These kind of patches have been around for a while, IMO this
should not create an ABI incompatbility for cases where
it already works because the types should be the same
so I think this is not an interface break.
GnuPG-Bug-Id: T3996
* lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Check remark for being
an empty string instead of a null QString.
--
GnuPG-bug-id: 5142
Co-authored-by: Daniel Kahn Gillmor
* lang/qt/src/debug.h: Add export macro.
--
This is public API so it should be exported. This did not
resolve a link issue for Windows that I've experienced
when building. But this might be to some uncleanlyness
in my build environment.
lang/qt/src/quickjob.h (QuickJob::result): Make parameters
auditLogAsHtml and audigLogError optional.
--
This aligns the signature of QuickJob's result signal with the result
signals of the other Job subclasses.
GnuPG-bug-id: 5094
* lang/qt/src/qgpgmequickjob.h: (GpgME::Key, QDateTime, QString):
Remove superfluous forward declarations.
(QGpgMEQuickJob): Remove superfluous second template argument. It is
identical to the default.
(QGpgMEQuickJob::result): Remove. It is already defined in the base
class.
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/debug.h, lang/qt/src/debug.cpp: New.
* NEWS: Mention it.
--
This was previously implemented in Kleopatra, but it makes sense for
all users of qgpgme.
* lang/cpp/src/engineinfo.h
(EngineInfo::Version::operator>(const Version &)): Fix logic.
(EngineInfo::Version::operator>(const char *)): Use Version-overload of
operator>.
* lang/qt/tests/t-various.cpp: Add test.
--
This fixes a logic error that 2.0.0 > 2.0.0 would return true.
* lang/qt/src/qgpgmelistallkeysjob.cpp
(do_list_keys): Rename to do_list_keys_legacy and put into unnamed
namespace.
(merge_keys): Put into unnamed namespace.
(list_keys): Rename to list_keys_legacy and put into unnamed namespace.
(do_list_keys, list_keys): New.
* lang/qt/tests/t-keylist.cpp (testListAllKeysSync): New.
--
With gpg >= 2.1, list keys once with --with-secret instead of listing
public keys and secret keys and then merging (part of) the information
about the keys.
GnuPG-bug-id: 4794
* lang/qt/src/dn.cpp (parse_dn_part): Fix parser.
--
This could in theory result in reading bytes after a after Nul in a
string and thus possible segv on unallocated memory or reading other
parts of the memory. However, it is harmless because the rfc2253
strings have been received from GnuPG which is expected to emit
correct syntax.
GnuPG-bug-id: 5037
* src/genkey.c (setexpire, gpgme_op_setexpire_start,
gpgme_op_setexpire): Move to ...
* src/setexpire.c: New.
* src/Makefile.am (main_sources): Add that file.
* src/context.h (ctx_op_data_id_t): Add OPDATA_SETEXPIRE.
* lang/qt/tests/t-various.cpp (testSetExpire): Test error handling.
--
Errors (and failures) emitted via status-fd need to be handled
explicitly, i.e. we need to provide an appropriate status handler with
corresponding op_data_t. Additionally, we need to set a passphrase
command handler if a passphrase callback is set in the context, e.g.
during tests.
GnuPG-bug-id: 4395
* lang/qt/src/changeexpiryjob.h (ChangeExpiryJob::start): New overload
that accepts subkeys (with empty implementation).
* lang/qt/src/qgpgmechangeexpiryjob.h,
lang/qt/src/qgpgmechangeexpiryjob.cpp (QGpgMEChangeExpiryJob::start):
New overload that accepts subkeys.
--
This adds the possibility to change the expiry of subkeys.
GnuPG-bug-id: 4717
* lang/qt/src/qgpgmechangeexpiryjob.cpp (change_expiry): Use new
setExpire() instead of edit() with GpgSetExpiryTimeEditInteractor
--
Using the new setExpire() (which uses --quick-set-expire) is a lot less
complex than using gpg's edit interface. It also feels faster. Next,
I'll add support for changing the expiration time of subkeys.
GnuPG-bug-id: 5003
* lang/cpp/context.cpp, lang/cpp/context.h
(Context::startPublicKeyExport, Context::exportPublicKeys): Extend
with flags paramenter.
(Context::ExportMode): New.
* lang/qt/src/exportjob.h (ExportJob::setExportMode): New.
* lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeexportjob.h:
Update accordingly.
--
This adds the C++ and Qt API for export modes.
* lang/qt/src/*: Change logging category to macro to QGPGME_LOG.
--
The old logging category macro had a typo and this way we
are more consistent with other logging rules. For example
you could write gpg.* in the logging conf.
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (GpgCardJob): Add impl stuff.
* lang/qt/src/protocol.h (gpgCardJob): Get one.
* lang/qt/src/qgpgmebackend.cpp,
lang/qt/src/qgpgmebackend.h: Add helpers to get the job.
* lang/qt/src/qgpgmegpgcardjob.cpp,
lang/qt/src/gpgcardjob.h,
lang/qt/src/qgpgmegpgcardjob.h: New.
--
This is annoyingly complex to add a simple new job.
In the future we should implement something like this
without the threadedjobmixin stuff. But the idea was
to follow the usual job pattern.
GnuPG-Bug-Id: T4794
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (action):
Use uidhash instead of number.
(GpgSignKeyEditInteractor::setKey): New.
* lang/cpp/src/gpgsignkeyeditinteractor.h: Update accordingly.
* lang/cpp/src/key.h, lang/cpp/src/key.cpp: Wrap uidhash.
* lang/qt/src/qgpgmesignkeyjob.cpp: Set the key.
--
Using the uidhash avoids problems when the user ids
on --edit-key are different ones then the uids
captured by gpgme when listing keys. Or if
they are in a different order. This can happen
with cached keys or keys with user attributes.
* lang/qt/tests/t-remarks.cpp (initTestCase): Supply
allow-weak-key-signatures flag for GnuPG 2.3, which
normally rejects use of SHA1 digest.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/qt/tests/t-encrypt.cpp (decryptSupported): Moved to
t-support as loopbackSupported.
* lang/qt/tests/t-remarks.cpp: Check for loopbackSupported.
* lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h
(loopbackSupported): New.
--
This ensures that the tests do not fail with GnuPG 2.0.x
* lang/qt/test/t-remarks.cpp (testRemarkReplaceSingleUIDExportable):
Use QVERIFY instead of assert.
--
An assert causes the temp directory not to be cleaned up. I
use this to analyze test failures.
If you want to see the tests home directory after a failure you
can just change a failing verify to an assert.
* lang/qt/tests/t-various.cpp (testRemarks): Move out.
* lang/qt/tests/t-remarks.cpp: New.
* lang/qt/tests/Makefile.am: Update accordingly.
--
While t-various is nice to add a quick test for more
extensive stuff it is better to move it in its own test.
This also tests with a key that has only a single uid.
* lang/qt/src/qgpgmesignkeyjob.cpp: Handle remarks and
dupeOK.
* lang/qt/src/signkeyjob.h (SignKeyJob::setDupeOk),
(SignKeyJob::setRemark): New.
--
This API makes it easy for Kleopatra to add remarks for:
GnuPG-Bug-Id: T4734
* lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am (AM_CPPFLAGS):
Add suggest-override and zero-as-null-pointer-constant warnings.
* lang/cpp/src/*, lang/qt/src/*: Consistenly use nullptr and override.
--
This was especially important for the headers so that downstream
users of GpgME++ or QGpgME do not get flooded by warnings if
they have these warnings enabled.
It also improves compiler errors/warnings in case of accidental
mistakes.
* configure.ac: Bump core LT version to C32/A21/R0. Bump C++ LT
version to C14/A8/R0.
* lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files.
* Makefile.am (EXTRA_DIST): Add conf/whatisthis.
Signed-off-by: Werner Koch <wk@gnupg.org>
* lang/python/tests/Makefile.am,
lang/qt/tests/Makefile.am,
tests/Makefile.am,
tests/gpg/Makefile.am,
tests/gpgsm/Makefile.am,
tests/opassuan/Makefile.am (GNUPGHOME): Make variable explict.
--
If the build directory has too long path, gpgme could fail.
This is similar to
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206
In order to fix that, this patch extracts the GNUPGHOME variable
to be presented directly in the Makefile and thus overridable by
command line option.
A build system can then create a symlink to the GNUPGHOME directory
in /tmp and use that symlink as the GNUPGHOME directory
thus making the path very short.
GnuPG-Bug-Id: T4091
Patch provided by vlmarek
* lang/qt/src/threadedjobmixin.cpp (fromEncoding)
(stringFromGpgOutput): New helpers.
(markupDiagnostics): Use it.
--
The Problem is that on my western windows system GnuPG
gets CP 437 as GetConsoleOutputCP and prints in that codepage.
In a W32 GUI Application we get 0 as GetConsoleOutputCP and 1252
with GetACP.
The only thing that seemed to somehow match was GetOEMCP but
that might just be luck and it might still be broken in
other windows languages.
This code is also used in Kleopatra so it might make sense
to make it public once it is demonstrated that it works on
most systems.
* lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::rewind): New.
* lang/qt/tests/t-various.cpp (testDataRewind): Test it.
--
The advantage of this convieniance function in GPGME is that
it avoids the messiness that are declarations with off_t.
GnuPG-Bug-Id: T3996
* src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigEntry::urlValue):
Build url from local file.
(QGpgMENewCryptoConfigEntry::setURLValue): Set native seperated
path.
--
This fixes setting files through cryptoconfig on Windows.
GnuPG-Bug-Id: T3939
* lang/qt/src/qgpgmequickjob.cpp (addSubkeyWorker)
(createWorker): Use toMSecsSinceEpoch instead toSecsSinceEpoch.
--
toSecsSinceEpoch was only introduced in Qt 5.8.
* lang/qt/src/qgpgmequickjob.cpp,
lang/qt/src/qgpgmequickjob.h,
lang/qt/src/quickjob.h: New.
* lang/qt/src/Makefile.am,
lang/qt/src/protocol.h,
lang/qt/src/protocol_p.h,
lang/qt/src/job.cpp: Update accordingly.
--
Keeping it in line with the Job for everything pattern.
Although it's reduced to one job for four commands as
the commands all behave the same.
* lang/qt/src/dataprovider.cpp (blocking_read): Keep
reading if process is not atEnd.
--
This fixes a regression in Kleopatra that uses this dataprovider
to chain the gpgtar process to the encryption / signing.
* lang/python/tests/Makefile.am: Kill all previously running daemons
before creating the private key store.
* lang/qt/tests/Makefile.am: Likewise.
* tests/gpg/Makefile.am: Likewise.
* tests/gpgsm/Makefile.am: Likewise.
--
Now that the daemons sockets are no longer created in the GNUPGHOME,
we cannot rely on cleaning the build directory to make sure they are
shut down. Therefore, we explicitly kill any running daemons when
creating the test environment.
Signed-off-by: Justus Winter <justus@g10code.com>
* lang/qt/src/qgpgmenewcryptoconfig.cpp: Include functional.
--
This is intended to fix compilation against the c++ stdlib from
Gentoo / GCC 7.
Patch provided by Martin Väth.
GnuPG-Bug-Id: T3151
* lang/qt/src/decryptjob.h,
lang/qt/src/decryptverifyjob.h,
lang/qt/src/signencryptjob.h,
lang/qt/src/verifydetachedjob.h,
lang/qt/src/verifyopaquejob.h: Undeprecate ByteArray based API.
--
While an IODevice may be more performant the ByteArray API is
a very easy way to get started with QGpgME as it allows you
basically to encrypt / decrypt any QString.
This also fixes a ton of deprecation warnings in KDE where this
API is used all over the place.
* lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp:
Only use exported API.
--
With the Job::Context hack we no longer need to use internal API.
* tests/gpg/Makefile.am: Use BUILT_SOURCES instead of check-local
and initial.test.
* lang/qt/tests/Makefile.am: Ditto.
--
This fixes "make dist" failure when source tree is clean:
git clean -dxf
autoreconf -ivf
./configure
make dist
BUILT_SOURCES should be used when file as generated without explicit
dependency. The check-local is all-am dependency, this means that it
will be resolved also in "make dist".
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* lang/qt/src/dn.cpp (parse_dn_part): Add fmt argument instead of
using name directly.
GnuPG-Bug-Id: 3023
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
* lang/qt/src/t-tofuinfo.cpp (TestTofuInfo::testSupported): Treat
it as unsupported if secret keylisting already fails.
--
The likely cause of this is that the agent can't be started
because the trust model is unsupported. Other tests check
that keylisting actually works.
* lang/qt/tests/t-encrypt.cpp (EncryptTest::testEncryptDecryptNowrap):
Disable test.
--
This test produces failures under CI/ASAN conditions as the
verify after the unwrap returns an error. As we currently
don't have time to look into this more it's disabled for now.
Similar to the testMixedEncryptDecrypt.
* lang/qt/src/dn.cpp (parse_dn_part): Use gpgrt_asprintf instead
of qstrdup.
--
This fixes a new / free mismatch because qstrdup uses new and
the allocated parts are freed with free. Similar to: a09ed3f2
* lang/qt/src/qgpgmenewcryptoconfig.cpp,
lang/qt/src/threadedjobmixin.h: Include functional.
--
With GCC 7.0, functional is not included transitively and we get:
In file included from qgpgmedeletejob.h:39:0,
from qgpgmedeletejob.cpp:38:
threadedjobmixin.h:98:33: error: 'function' in namespace 'std'
does not name a template type
void setFunction(const std::function<T_result()> &function)
^~~~~~~~
std::{function,bind,placeholders,mem_fn} are defined in functional.
References: https://bugzilla.redhat.com/show_bug.cgi?id=1417383
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
GnuPG-Bug-Id: 2955
Commit Message amended by Andre Heinecke
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
* lang/qt/tests/t-support.h (QSIGNALSPY_TIMEOUT): New macro.
* lang/qt/tests/t-encrypt.cpp: Use the new macro as timeout when
waiting for signals.
* lang/qt/tests/t-keylist.cpp: Likewise.
* lang/qt/tests/t-keylocate.cpp: Likewise.
* lang/qt/tests/t-ownertrust.cpp: Likewise.
* lang/qt/tests/t-wkspublish.cpp: Likewise.
--
Increase the timeout when waiting for signals from 5 seconds to 60.
This addresses intermittent test failures on slow machines.
Signed-off-by: Justus Winter <justus@g10code.com>
* lang/qt/src/Makefile.am (qgpgme_sources): Add cryptoconfig.cpp
* lang/qt/src/cryptoconfig.cpp: New.
* lang/qt/src/cryptoconfig.h (CryptoConfigEntry::stringValueList):
New.
* lang/qt/src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfigEntry::stringValueList): New.
* lang/qt/src/qgpgmenewcryptoconfig.h: Update accordingly.
--
This is a pardigm change in cryptoconfig.h to avoid ABI breaks
with each new config value we support it now has an implementation
that is directly related to qgpgmenewcryptoconfig, which is now
the only one.
* lang/qt/tests/t-support.h (TestPassphraseProvider::getPassphrase):
Use gpgrt_asprintf instead of strdup.
--
To avoid problems on MacOS we want to avoid strdup so that
qgpgme can be built without extensions. But qstrdup allocates
with new and not with malloc, so use gpgrt_asprintf instead.
* configure.ac: Set HAVE_MACOS_SYSTEM conditional.
* lang/qt/src/Makefile.am,
lang/cpp/src/Makefile.am,
lang/qt/src/QGpgmeConfig.cmake.in.in,
lang/cpp/src/GpgmeConfig.cmake.in.in: Use libsuffix again to
distinguish between macos .dylib
--
GnuPG-Bug-Id: 2884
* lang/qt/src/cryptoconfig.h (CryptoConfig::sync): Document
that runtime option is always set.
* lang/qt/Src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfigComponent::sync): Remove outdated comment
and warn on error.
* lang/cpp/src/GpgmeppConfig-w32.cmake.in.in
lang/qt/src/QGpgmeConfig-w32.cmake.in.in: New.
* lang/cpp/src/GpgmeppConfig.cmake.in.in,
lang/qt/src/QGpgmeConfig.cmake.in.in: Remove libsuffix handling.
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Create / install w32 config files.
* configure.ac: Configure them.
--
To work with DLL's cmake needs to know about the implib and
the final DLL. So the config files look different enough
that it's better to use alternative files.
* lang/qt/src/job.cpp,
lang/qt/src/job.h (Job::context): New.
* lang/qt/src/threadedjobmixin.cpp
(ThreadedJobMixin::~ThreadedJobMixin): New. Unregister context.
(ThreadedJobMixin::lateInitialization): Register context.
* NEWS: Update for cpp and qt.
--
The global map hack is necessary because the job class does
not know about the context which is held in threadedjobmixin.
Adding a virtual function in Job would be an ABI break which
I'd like to avoid at this point. Although QGpgME's API will
need a big ABI break to make it ABI maintainable. The virtual
jobs -> implementation classes are nearly unmaintainable ABI wise.
The context is exposed to provide more flexibility to users, e.g.
to add a passphrase callback or to set the sender in a context.
* lang/qt/src/qgpgme_export.h,
lang/qt/src/qgpgme_version.h: Change license to GPLv2+
--
These files were based on copies from the cpp version/export
headers. This change is meant to clarify the licensing by
bringing it in line with the overall licesense of the
qgpgme library.
* lang/qt/src/defaultkeygenerationjob.cpp
(DefaultKeyGenerationJob::start): Explicitly connect pointer
in the QPointer.
--
Commit message written by Andre Heinecke <aheinecke@intevation.de>
* configure.ac (VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO): New
subst variables for the version header.
* lang/cpp/src/GpgmeppConfigVersion.cmake.in,
lang/cpp/src/gpgmepp_version.h.in,
lang/qt/src/QGpgmeConfigVersion.cmake.in,
lang/qt/src/qgpgme_version.h.in: Use new variables.
--
Using the LT_* variables was just wrong. Reporting the
package version also makes more sense then the library version.
Having different versions might make ABI breaks more visible
by increasing the major version number, but to have different
versions in the same package is too confusing imo and gpgme
uses a versioning that is unrelated to the library version number.
* lang/qt/src/Makefile.am: Install cmake config file in qgpgme subdir.
--
Putting it together with Gpgmepp was done for historic reasons
but the proper way is for each library to have its own subdir.
* lang/qt/src/dn.cpp (DN, DN::Attribute): New public API.
* lang/qt/src/dn.h: New.
* lang/qt/src/Makefile.am: Update accordingly.
--
This is a general useful API to work with X509 distinguished
names and is useful when doing CMS with GpgME.
Adding this class from libkleo allows kmails messagelib to
avoid any KDE UI Frameworks and so can be used more versatile
in the future.
This class can be combined with libkleos DNAttributeMapper
to have the same bevavior as before in libkleo when using
DN::prettyDN calls can be converted from:
Kleo::DN(uid).prettyDN();
to:
QGpgME::DN dn(uid);
uid.setAttributeOrder(
Kleo::DNAttributeMapper::instance()->attributeOrder());
dn.prettyDN();
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Install version headers in include
subdirs.
--
This change was requested on the gnupg-devel mailing list to
avoid placing these headers into the top level include directories.
There is currently no known user of these headers so changing it
now should not break things downstream.
* lang/qt/src/multideletejob.h: Fix include, cryptobackend.h is now
called protocol.h
* lang/qt/src/multideletejob.cpp: New file.
* lang/qt/src/Makefile.am: Add multideletejob.cpp.
* lang/cpp/src/Makefile.am: Install abstractimportjob.h since it's
included from importjob.h
--
Fixes build when someone inclues importjob.h in their code.
* src/qgpgmewkspublishjob.cpp,
src/qgpgmewkspublishjob.h,
src/wkspublishjob.h,
tests/t-wkspublish.cpp: Fix spelling of received.
* src/configure.ac (LIBQGPGME_LT_CURRENT): Bump
accordingly.
--
While this is an API break I've decided to fix this now
instead of deprecating / keeping it around forever in the API.
The only known users of QGpgME are KDE Applications and
there it is not yet used.
* lang/qt/tests/t-encrypt.cpp: Disable tests that require
a password for 2.0.
--
The passphrase_cb apparently does not work with 2.0 so we would
need a fake pinentry to get this to work. We just disable the
test instead as this is a rarely used feature and works with
1.4 and 2.1.
* lang/qt/tests/Makefile.am (TESTS): Remove t-wkspublish.
--
Even the only enabled test did a connection to localhost this
might fail if it is stalled and is an outside factor. It also might
be disturbing other services locally.
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Replace resolved_includedir.
* lang/cpp/src/GpgmeppConfig.cmake.in.in,
lang/qt/src/QGpgmeConfig.cmake.in.in: Use resolved_includedir
instead of relying on a common installation prefix.
--
This fixes usage of the config files in case gpgme
is configured with a custom --includedir.
We have to do the replacement manually like for libdir
because configure would include variables in the replacement.
* THANKS, doc/ChangeLog-2011, tests/ChangeLog-2011,
tests/gpg/geheim.txt: convert from iso 8859-1 to utf-8.
* lang/qt/src/dataprovider.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp,
lang/qt/src/qgpgmesecretkeyexportjob.cpp: replace U+FFFD REPLACEMENT
CHARACTER with proper U+00E4 LATIN SMALL LETTER A WITH DIAERESIS.
--
Note that src/versioninfo.rc.in is still ISO-8859-1. I don't know
whether Windows will properly handle UTF-8 in this file or not, so i
have not touched it.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* lang/qt/tests/Makefile.am (clean-local): Avoid non-portable "--"
* lang/python/Makefile.am (copystamp): Use well defined cp -R instead
of cp -r.
Signed-off-by: Werner Koch <wk@gnupg.org>
* lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add
debug output.
--
The debug output is only emitted before a failure of the
test in case a keylisting of bravo@example.net fails which
it should never do.
* lang/qt/src/qgpgmekeyformailboxjob.cpp: Explicitly include
QStringList.
* lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp: Move
includes into impl. Explicitly include QDir.
--
This fixes build against Qt versions where the includes are less
implicit.
* lang/qt/src/keyformailboxjob.h,
lang/qt/src/qgpgmekeyformailboxjob.h: Fix includes.
--
This ensures that when building qgpgme you do not need an installed
gpgme++.
* lang/qt/src/Makefile.am (AM_CPPFLAGS): Include cpp before core.
--
Both core and cpp have headers that have the same names, this
can lead to the wrong headers beeing included when qt bindings
are built.
* lang/qt/src/keylistjob.h (addMode): New.
* lang/qt/src/qgpgmekeylistjob.h (addMode): New.
* lang/qt/src/qgpgmekeylistjob.cpp (addMode: New.
--
Instead of new API for each new thing lets be a bit more
generic / open.
* lang/qt/src/Makefile.am: Reorder include directives.
--
This fixes the problem that QGpgME would pick up gpgme or
gpgme++ headers from an installed version.
* lang/qt/tests/t-support.cpp (QGpgMETest::copyKeyrings): New helper.
* lang/qt/tests/t-support.h: Declare.
* lang/qt/tests/t-encrypt.cpp: use it
* lang/qt/tests/t-tofuinbo.cpp: ditto.
--
New helper takes care of copying the correct files for either
keybox or keyring.
* lang/qt/tests/t-wkspublish.cpp: New.
* lang/qt/tests/Makefile.am: Update accordingly.
--
Most tests are disabled by default as tey require
an online connection.
Define DO_ONLINE_TESTS to enable the tests.
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp: Include moc / subclass stub.
* lang/qt/src/protocol.h: Add virtual for new job.
* lang/qt/src/protocol_p.h: Add job.
* lang/qt/src/wkspublishjob.h: Interface for WKSPublishJob.
* lang/qt/src/qgpgmewkspublishjob.cpp,
lang/qt/src/qgpgmewkspublishjob.h: New.
--
The Job was originally intended to be used with a SpawnEngine
Context but QProcess was a better fit for the job.
Usage is similar to the client tool. check, create, recieve.
* lang/cpp/src/key.cpp (UserID::tofuInfo): New.
* lang/cpp/src/key.h: Update accordingly.
* lang/cpp/src/tofuinfo.cpp: Remove dropped fields.
* lang/cpp/src/tofuinfo.h: Update accordingly.
* lang/cpp/src/verificationresult.cpp,
lang/cpp/src/verificationresult.h: Remove tofu info.
* lang/qt/tests/t-tofuinfo.cpp: Disable for now.
--
With be4ff75d7 Tofu info now lives with a UserID
Object. While this breaks API it was not yet released.
* lang/qt/src/defaultkeygenerationjob.cpp,
lang/qt/src/defaultkeygenerationjob.h: New.
* lang/qt/src/Makefile.am: Update accordingly.
--
The defaultkeygenerationjob makes it easier to just generate a key
in the future this should probably use quick-gen key but since this
is not exposed in gpgme we hardcode the defaults and do it with
the params file.
This is also the first job that uses a new and better architecture
without backend abstraction and the pimpl pattern instead of
a specialized subclass.
This is an adoption of kde's libkleo commit f49b7157
Thanks dvratil@kde.org
* lang/qt/src/job.cpp: Include moc and make subclass.
* lang/qt/src/keyformailboxjob.h,
lang/qt/src/qgpgmekeyformailboxjob.cpp,
lang/qt/src/qgpgmekeyformailboxjob.h: New.
* lang/qt/tests/run-keyformailboxjob.cpp: New manual test.
* lang/qt/tests/Makefile.am: Add run-keyformailboxjob.
* lang/qt/src/Makefile.am: Update accordingly.
* lang/qt/src/protocol.h, lang/qt/src/protocol_p.h: Add
keyformailboxjob.
--
The KeyForMailboxjob can be used to determine the best key to
use to encrypt something to a given mail address.
* lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp: Create
TestPassphraseProvider on stack.
--
Context does not delete the provider. This fixes ASAN errors.
* lang/qt/tests/t-keylist.cpp: Don't include t-support.moc
--
Accidental leftover from trying to generate t-support moc from
another cpp file. This was solved instead by a new rule to generate
moc files from the header.
* lang/qt/tests/Makefile.am: Add t-encrypt and t-support.
* lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest):
New. Class to handle common cleanup / init.
* lang/qt/tests/t-keylist.cpp,
lang/qt/tests/t-keylocate.cpp,
lang/qt/tests/t-ownertrust.cpp,
lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest.
* lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric
encryption. Mixed encryption test is disabled.
* lang/qt/src/encryptjob.h, lang/qt/src/signencryptjob.h,
lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeencryptjob.cpp,
lang/qt/src/qgpgmesignencryptjob.cpp,
lang/qt/src/qgpgmeencryptjob.cpp: Add start and exec overloads
that accept generic EncryptFlags.
--
While this technically is an ABI break (vtable change) there
are no known classes outside qgpgme that inherit encryptjob
or signencryptjob. And the new functions should be added
to the bottom of the vtable.
* lang/qt/src/Makefile.am (camelcase_headers): New. Create and install
CamelCase headers.
--
For Qt Libraries it is a common pattern that headers are installed
additionally under their Namespace / Class Name so that automated
inclusion works once a class is used in code. This was also
done for QGpgME headers when they lived in Libkleo so this increases
compatibility.
* lang/cpp/src/gpgmepp_version.h.in,
lang/qt/src/qgpgme_version.h.in: New. Version information.
* lang/qt/src/Makefile.am, lang/cpp/src/Makefile.am: Add them.
* configure.ac: Configure them.
--
The version headers are common practice in KDE Frameworks and
were installed for KF5Gpgmepp and Libkleo respectively.
* lang/qt/tests/t-tofuinfo.cpp: Disable tests.
--
Even with the wait this test could fail and anyway the delay
was not nice. So we remove the wait hack and just wait for
the bug (2405) to be fixed in GnuPG or GpgME core.
* lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include cpp before
gpgme src directory.
--
This fixes a problem where context.h would be picked up from gpgme/src
instead of including the context.h from gpgme++.
* lang/qt/src/threadedjobmixin.h: Revert using full path
for context.h
--
This reverts commit 47bfbc9026 as
it causes problems depending on the include path. The proper
fix will be to ensure that cpp/src is included before gpgme/src.
* lang/qt/src/threadedjobmixin.h: When building qgpgme look for
context.h in the full cpp subdirectory.
--
Gpgme core also contains a context.h that can lead to confusion
otherwise.
* src/lang/qt/tests/t-tofuinfo.cpp(testTofuSignCount): New.
(initTestCase): Set gpg-agent loopback pinentry config.
(signAndVerify): Helper for tofuTestSignCount.
--
Also needs the wait code because of GnuPG-Bug-Id: 2405
* lang/qt/tests/t-tofuinfo.cpp: New.
* lang/qt/tests/Makefile.am: Update accordingly.
--
The test currently contains a workaround for GnuPG-Bug-Id 2405
* lang/qt/tests/t-ownertrust.cpp: New test.
* lang/qt/tests/Makefile.am: Add test.
--
This test would have catched the issue created by not handling
GPGME_STATUS_KEY_CONSIDERED.
* lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME.
--
Without building QGpgME the headers of gpgme++ are not included
corretly and taken from an already installed gpgme++.
* lang/cpp/src/context.cpp,
lang/cpp/src/context.h,
lang/cpp/src/context_p.h (Context::createForEngine),
(Context::edit, Context::startEditing),
(Context::takeLastEditInteractor, Context::cardEdit),
(Context::startCardEditing, Context::takeLastCardEditInteractor),
(Context::assuanTransact, Context::startAssuanTransaction),
(Context::takeLastAssuanTransaction): Port to unique_ptr.
* lang/qt/src/qgpgmeadduseridjob.cpp,
lang/qt/src/qgpgmechangeexpiryjob.cpp,
lang/qt/src/qgpgmechangeownertrustjob.cpp,
lang/qt/src/qgpgmechangepasswdjob.cpp,
lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly.
--
This is another API break but as we already broke API with GpgME++
and QGpgME from KDE Frameworks this is a good time to do this
to avoid using a deprected C++ class in the API.
* lang/qt/src/Makefile.am (qgpgme_headers): Add protocol.h
(private_qgpgme_headers): Add protocol_p.h
* lang/qt/src/protocol.h: New. From QGpgMEBackend.
* lang/qt/src/protocol_p.h: New. From QGpgMEBackend.
* lang/qt/src/qgpgmebackend.h,
lang/qt/src/qgpgmebackend.cpp (Protocol): Removed.
--
The backend class does not make much sense anymore as we
only have the GpgME backend obviously. It's purpose was
for Libkleo's Backend abstraction.
* lang/qt/src/Makefile.am: Do not install all headers.
--
The qgpgme classes hide the implementation and thus make it
easier to change it without ABI breaks. They should not
be installed.
* configure.ac: Look for doxygen if qt is built.
Configure new files.
* lang/qt/doc/Doxyfile.in: New.
* lang/qt/doc/Makefile.am: New.
* lang/qt/README: Update.
--
Currently this is a standard doxyfile template without much
customization.
* lang/qt/tests/t-keylist.cpp: Verify that GNUPGHOME is set.
* lang/qt/tests/initial.test: New dummy test.
* lang/qt/tests/Makefile.am: Add dependency to initial.test
--
Feels weird but this follows the pattern in tests/gpg/Makefile.am
and solves the problem that the environment is dirty.
* lang/qt/src/qgpgmebackend.cpp (QGpgME::openpgp, QGpgME::smime): New.
* lang/qt/src/qgpgmebackend.h: Declare.
* lang/qt/tests/t-keylist.cpp (KeyListTest::testSingleKeyListSync):
Use new functions.
--
This replaces the cryptobackendfactory functionality from libkleo.
* configure.ac: Configure test Makefile.
* m4/qt.m4: Look up Qt5Test flags.
* lang/qt/tests/t-keylist.cpp: New. Simple keylist check.
* lang/qt/tests/Makefile.am: New. General test framework.
--
This test mostly checks that it basically compiles / works and
adds a test framework.
* qgpgmeadduseridjob.cpp,
qgpgmechangeexpiryjob.cpp,
qgpgmechangeownertrustjob.cpp,
qgpgmechangepasswdjob.cpp,
qgpgmedecryptjob.cpp,
qgpgmedecryptverifyjob.cpp,
qgpgmedeletejob.cpp,
qgpgmedownloadjob.cpp,
qgpgmeencryptjob.cpp,
qgpgmeexportjob.cpp,
qgpgmeimportfromkeyserverjob.cpp,
qgpgmeimportjob.cpp,
qgpgmekeygenerationjob.cpp,
qgpgmekeylistjob.cpp,
qgpgmelistallkeysjob.cpp,
qgpgmerefreshkeysjob.cpp,
qgpgmesecretkeyexportjob.cpp,
qgpgmesignencryptjob.cpp,
qgpgmesignjob.cpp,
qgpgmesignkeyjob.cpp,
qgpgmeverifydetachedjob.cpp,
qgpgmeverifyopaquejob.cpp: Add missing MOC includes.
--
In the CMake world this was handled by cmake automoc
suppport and not neccessary.