Commit Graph

493 Commits

Author SHA1 Message Date
Werner Koch
1a26db7175
Release 1.23.2 2023-11-28 16:42:59 +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
ae332749ee
build,qt: Build Qt with -fPIC if required or requested
* configure.ac: Add option to enable building the Qt 6 binding with
-fPIC. Fix typo and mention default for --enable-no-direct-extern-access
option.
* m4/qt6.m4: Add -fPIC to GPGME_QT6_CFLAGS if requested or if Qt 6 was
built with reduce_relocations.
--

GnuPG-bug-id: 6781
2023-10-30 09:42:09 +01:00
Ingo Klöcker
cf88690cf4
Update NEWS
--
2023-10-27 16:14:01 +02:00
Werner Koch
0a0a5906d5
Post release updates
--
2023-10-27 14:41:52 +02:00
Werner Koch
cadcb38469
Release 1.23.1
--

This is minor fix to the spawn helper.  No change to the library code.

GnuPG-bug-id: 6774
2023-10-27 14:36:15 +02:00
Werner Koch
8faaf7b72b
Post release updates
--
2023-10-25 11:16:19 +02:00
Werner Koch
aae967ec9c
Release 1.23.0 2023-10-25 11:05:29 +02:00
Ingo Klöcker
a9e5a25b56
cpp: Support new key capability flags
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods
hasCertify, hasSign, hasEncrypt, hasAuthenticate.
--

GnuPG-bug-id: 6748
2023-10-05 15:27:52 +02:00
Werner Koch
b63d203d3b
core: Add key capability flags has_encrypt etc.
* src/gpgme.h.in (struct _gpgme_key): Add flags has_encrypt,
has_certify, has_sign, and has_authenticate.
* src/keylist.c (finish_key): Set these flags.
* tests/run-keylist.c (main): Print them.
--

GnuPG-bug-id: 6748
2023-10-05 14:18:03 +02:00
Werner Koch
e36b2d1bce
New mode to list a v5 fingerprint for v4 packets.
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_V5FPR): New.
(struct _gpgme_subkey): Add field v5fpr.
* src/engine-gpg.c (gpg_keylist_build_options): Pass new option to
gpg.
* src/key.c (gpgme_key_unref): Free new field.
* src/keylist.c (op_data_t): Parse and add "fp2" line.

* tests/run-keylist.c (show_usage): Add option --v5fpr.

* src/keylist.c (op_data_t): Add field failure_code.
(keylist_status_handler): Handle special value.
(gpgme_op_keylist_end): Return an error if a FAILURE line has been
seen.
--

Note that the failure code part has been added to better diagnose
problems if a wrong gpg version is used.  If verything works right we
should not get this because we check that the gnupg version sis either
>= 2.4.4 or less than 2.3 and >= 2.2.42.

Note further that the v5fpr field may also be used to get the SHA-256
fingerprint of X.509 certificates (even without passing the new mode
flag).

GnuPG-bug-id: 6705
2023-09-04 17:03:52 +02:00
Werner Koch
d75b2a9151
Support GPGME_ENCRYPT_ALWAYS_TRUST also for S/MIME.
* src/engine-gpgsm.c (gpgsm_encrypt): Send the always-trust options.

* tests/run-encrypt.c: Add option --always-trust.
--

Note that the run-encrypt test tool used to assume always-trust for
OpenPGP since 1.7.0 This bug has also been fixed by introducing the
explicit option.

GnuPG-bug-id: 6559
2023-08-31 12:02:02 +02:00
Ingo Klöcker
2ad36f7114
qt: Add job for refreshing OpenPGP keys via WKD
* lang/qt/src/wkdrefreshjob.cpp, lang/qt/src/wkdrefreshjob.h,
lang/qt/src/wkdrefreshjob_p.h, lang/qt/src/qgpgmewkdrefreshjob.cpp,
lang/qt/src/qgpgmewkdrefreshjob.h: New.
* lang/qt/src/protocol.h (class Protocol): Add pure virtual member
function wkdRefreshJob
* lang/qt/src/protocol_p.h (Protocol::wkdRefreshJob): ... and
implement it.
* lang/qt/src/Makefile.am: Update accordingly.

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

This job allows updating keys via WKD. Only user IDs that were
originally retrieved via WKD (i.e. which have origin WKD) are
considered.

GnuPG-bug-id: 6672
2023-08-21 18:06:52 +02:00
Ingo Klöcker
fb03a5b3df
doc: Fix interface changes
--

toLogString is in the QGpgME namespace (as everything else in the qt
bindings).
2023-08-21 10:19:09 +02:00
Werner Koch
cfeb62d358
Post release updates
--
2023-08-21 09:54:04 +02:00
Werner Koch
8ea7015a23
Release 1.22.0 2023-08-21 09:41:39 +02:00
Werner Koch
546d3a982d
Post release updates
--
2023-07-07 14:01:51 +02:00
Werner Koch
5bf3e6d075
Release 1.21.0 2023-07-07 13:35:14 +02:00
Ingo Klöcker
1c2459a592
qt: Support reading signed/encrypted archives directly from a file
* lang/qt/src/decryptverifyarchivejob.cpp,
lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add
member functions setInputFile, inputFile.
* lang/qt/src/decryptverifyarchivejob_p.h
(DecryptVerifyArchiveJobPrivate): Add member m_inputFilePath.
* lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify): Move
creation of indata to decrypt_verify_from_io_device.
(decrypt_verify_from_io_device, decrypt_verify_from_file_name): New.
(QGpgMEDecryptVerifyArchiveJob::start): Use
decrypt_verify_from_io_device instead of decrypt_verify.
(QGpgMEDecryptVerifyArchiveJobPrivate::startIt): Start the job with the
values from member variables.

* lang/qt/tests/run-decryptverifyarchivejob.cpp (createInput): Remove.
(main): Remove creation of input. Make the job read the archive directly
from the given archive name.
--

This makes it possible to tell gpgtar to read the signed/encrypted
archive directly from a specified file bypassing GpgME's Data IO.

GnuPG-bug-id: 6530
2023-06-21 15:25:11 +02:00
Ingo Klöcker
1a9f192ab4
core: Support reading the archive to decrypt/verify directly from a file
* src/engine-gpg.c (add_file_name_arg_or_data): New.
(gpg_decrypt): Use add_file_name_arg_or_data instead of add_data for the
ciphertext.
(gpg_verify): Use add_file_name_arg_or_data instead of add_data for the
signature and the signed text.

* tests/run-decrypt.c (show_usage): New option --direct-file-io.
(main): Parse new option. If option is given, then don't open input
file, create simple data object instead of data object from stream and
set input file name on input data.
* tests/run-verify.c (show_usage): New option --direct-file-io.
(main): Parse new option. If option is given, then don't open input
files, create simple data objects instead of data objects from stream
and set input file names on input data objects.
--

This change makes it possible to tell gpg (and gpgtar) to read the
input (i.e. the signed/encrypted data or the signature or the created
archive) directly from the files with given file names instead of from
streams piped through GpgME's Data IO.

GnuPG-bug-id: 6530
2023-06-21 14:38:50 +02:00
Ingo Klöcker
e608315392
qt: Support writing signed/encrypted archives directly to a file
* lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h
(EncryptArchiveJob): Add member functions setRecipients, recipients,
setInputPaths, inputPaths, setOutputFile, outputFile,
setEncryptionFlags, encryptionFlags.
* lang/qt/src/encryptarchivejob_p.h (EncryptArchiveJobPrivate): Add
members m_recipients, m_inputPaths, m_outputFilePath, m_encryptionFlags.
* lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Move creation of
outdata to encrypt_to_io_device.
(encrypt_to_io_device, encrypt_to_filename): New.
(QGpgMEEncryptArchiveJob::start): Use encrypt_to_io_device instead of
encrypt.
(QGpgMEEncryptArchiveJobPrivate::startIt): Start the job with the
values from member variables.
* lang/qt/src/qgpgmesignarchivejob.cpp (sign): Move creation of
outdata to sign_to_io_device.
(sign_to_io_device, sign_to_filename): New.
(QGpgMESignArchiveJob::start): Use sign_to_io_device instead of sign.
(QGpgMESignArchiveJobPrivate::startIt): Start the job with the
values from member variables.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Move
creation of outdata to sign_encrypt_to_io_device.
(sign_encrypt_to_io_device, sign_encrypt_to_filename): New.
(QGpgMESignEncryptArchiveJob::start): Use sign_encrypt_to_io_device
instead of sign_encrypt.
(QGpgMESignEncryptArchiveJobPrivate::startIt): Start the job with the
values from member variables.
* lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h
(SignArchiveJob): Add member functions setSigner, signers,
setInputPaths, inputPaths, setOutputFile, outputFile.
* lang/qt/src/signarchivejob_p.h (SignArchiveJobPrivate): Add
members m_signers, m_inputPaths, m_outputFilePath.
* lang/qt/src/signencryptarchivejob.cpp,
lang/qt/src/signencryptarchivejob.h (SignEncryptArchiveJob): Add
member functions setSigner, signers, setRecipients, recipients,
setInputPaths, inputPaths, setOutputFile, outputFile,
setEncryptionFlags, encryptionFlags.
* lang/qt/src/signencryptarchivejob_p.h (SignEncryptArchiveJobPrivate):
Add members m_signers, m_recipients, m_inputPaths, m_outputFilePath,
m_encryptionFlags.

* lang/qt/tests/run-encryptarchivejob.cpp (createOutput): Remove.
(checkOutputFilePath): New.
(main): Create file output writing to stdout if no archive name (or "-")
is given. Exit if file with given archive name already exists. Make
the jobs write the created archive directly to the given archive name.
* lang/qt/tests/run-signarchivejob.cpp (createOutput): Remove.
(checkOutputFilePath): New.
(main): Create file output writing to stdout if no archive name (or "-")
is given. Exit if file with given archive name already exists. Make
the jobs write the created archive directly to the given archive name.
--

This makes it possible to tell gpgtar to write the created archive
directly to a specified file bypassing GpgME's Data IO.

GnuPG-bug-id: 6530
2023-06-19 18:21:46 +02:00
Ingo Klöcker
8b9fabf5d5
qt: Add a generic hook to start a job
* lang/qt/src/job.cpp, lang/qt/src/job.h (Job::startIt): New method.
* lang/qt/src/job_p.h (JobPrivate::startIt): New pure virtual method.
* lang/qt/src/qgpgmechangeexpiryjob.cpp
(QGpgMEChangeExpiryJobPrivate::startIt): New.
* lang/qt/src/qgpgmedecryptverifyarchivejob.cpp
(QGpgMEDecryptVerifyArchiveJobPrivate::startIt): New.
* lang/qt/src/qgpgmeencryptarchivejob.cpp
(QGpgMEEncryptArchiveJobPrivate::startIt): New.
* lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJobPrivate::startIt):
New.
* lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJobPrivate::startIt):
New.
* lang/qt/src/qgpgmelistallkeysjob.cpp
(QGpgMEListAllKeysJobPrivate::startIt): New.
* lang/qt/src/qgpgmesignarchivejob.cpp
(QGpgMESignArchiveJobPrivate::startIt): New.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp
(QGpgMESignEncryptArchiveJobPrivate::startIt): New.
* lang/qt/src/qgpgmesignencryptjob.cpp
(QGpgMESignEncryptJobPrivate::startIt): New.
--

startIt() starts a job if the necessary values have been set before.
This makes it possible to extend jobs with additional ways to start them
without having to worry about overloading existing virtual start()
methods. This will be used first for the different archive jobs.

GnuPG-bug-id: 6530
2023-06-19 18:08:47 +02:00
Andre Heinecke
5811d069d3
qt, cpp: Support larger size-hint on 32 bit builds
* NEWS: Mention this.
* lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::setSizeHint): New.
* lang/qt/src/qgpgmedecryptjob.cpp,
 lang/qt/src/qgpgmedecryptverifyarchivejob.cpp,
 lang/qt/src/qgpgmedecryptverifyjob.cpp,
 lang/qt/src/qgpgmeencryptjob.cpp,
 lang/qt/src/qgpgmesignencryptjob.cpp,
 lang/qt/src/qgpgmesignjob.cpp,
 lang/qt/src/qgpgmeverifydetachedjob.cpp,
 lang/qt/src/qgpgmeverifyopaquejob.cpp: Set size for input IODevice.

--
This fixes the case where the old detection of the size of QIOdevice
using seek would overflow and instead explicitly uses QIODevice::size
to check for the size and pass it through as an uint64.

GnuPG-Bug-Id: T6534
2023-06-16 14:33:19 +02:00
Andre Heinecke
cbcea4a09b
cpp: Expose gpgme_data_set_flag through cpp API
* lang/cpp/src/data.cpp (Data::setFlag): New.
* lang/cpp/src/data.h: Update accordingly.
* NEWS: Mention this.

--
This exposes the generic flag mechanism for data to users
of the C++ library. It is similar to Context::setFlag but
has no getter.
2023-06-16 12:35:36 +02:00
Ingo Klöcker
7990f70107
doc,cpp: Treat GPG_ERR_FULLY_CANCELED as canceled
* doc/gpgme.texi (GPG_ERR_FULLY_CANCELED): New.
* lang/cpp/src/context.cpp (Error::isCanceled): Also return true for
GPG_ERR_FULLY_CANCELED.
--

For internal purposes, GnuPG sometimes uses the error code
GPG_ERR_FULLY_CANCELED instead of GPG_ERR_CANCELED. From a user
perspective both values mean the same thing and should therefore be
treated identically.

GnuPG-bug-id: 6510
2023-06-01 09:37:41 +02:00
Werner Koch
d99156ff08
Post release updates
--
2023-04-20 14:02:34 +02:00
Werner Koch
451ed47434
Release 1.20.0 2023-04-20 13:48:17 +02:00
Ingo Klöcker
e80bf34bf8
Update NEWS
* NEWS: Add news for recent changes
--

GnuPG-bug-id: 5960, 6456
2023-04-19 09:18:04 +02:00
Ingo Klöcker
d256ba7cc5
w32: Always use UTF-8 for localized texts
* configure.ac: Define GPG_ERR_ENABLE_GETTEXT_MACROS.
* src/version.c (do_subsystem_inits) [W32]: Switch gettext to UTF-8.
--

On Windows, applications using GpgME can now rely on localized texts
returned by GpgME, e.g. the texts for error codes, to be UTF-8 encoded.
In particular, this saves a useless and possibly lossy conversion to
native encoding and back to UTF-8. On other OSes, where we use the
system provided gettext, we assume that UTF-8 is used nowadays.

GnuPG-bug-id: 5960
2023-04-04 12:11:15 +02:00
Werner Koch
6d21256c92
core,cpp: Add new key flags to gpgme_subkey_t
* src/gpgme.h.in (struct _gpgme_subkey): Add bit flags can_renc,
can_timestamp, adn is_group_owned. Reduce size of _unused.
* src/keylist.c (set_subkey_capability): Set them.
* tests/run-keylist.c (main): Print them.

* lang/cpp/src/key.h (Subkey::canRenc): New.
(Subkey::canTimestamp): New.
(Subkey::isGroupOwned): New.
* lang/cpp/src/key.cpp: Implement new methods.
(Subkey::isQualified): Print them.
(std::ostream &operator<<): Print them.
--

GnuPG-bug-id: 6395
2023-03-21 08:37:47 +01:00
Werner Koch
18e09b15d5
Post release updates
--
2023-03-17 11:42:33 +01:00
Werner Koch
96a30fdf30
Release 1.19.0 2023-03-17 10:34:42 +01:00
Ingo Klöcker
ea6f15ed60
qt: Add simple and extended progress signals replacing old signal
* lang/qt/src/job.h (Job): Add signals jobProgress and rawProgress.
Deprecate signal progress.
* lang/qt/src/multideletejob.cpp (MultiDeleteJob::slotResult): Emit
new progress signals.
* lang/qt/src/qgpgmerefreshsmimekeysjob.cpp
(QGpgMERefreshSMIMEKeysJob::slotStatus): Ditto.
* lang/qt/src/threadedjobmixin.h (ThreadedJobMixin::showProgress): Use
modern overload of QMetaObject::invokeMethod to forward the progress
signal and add the value of what. Add forwarding of progress to the new
signals.

* lang/qt/tests/t-encrypt.cpp (EncryptionTest::testProgress): Test
the new signals instead of the deprecated one.
--

The new signal jobProgress omits the what value which is useless for
most consumers. The new signal rawProgress makes all information
provided by the backend available to consumers. The latter is not
really meant to be used by users of gpgme. It will be used by the
archive jobs to provide more user-friendly signals.

GnuPG-bug-id: 6342
2023-02-14 09:25:21 +01:00
Ingo Klöcker
e0778ed910
doc: Add new flags
--

GnuPG-bug-id: 6342
2023-02-02 12:22:00 +01:00
Ingo Klöcker
c407728064
qt: Add job for extracting encrypted and signed archives
* lang/qt/src/decryptverifyarchivejob.cpp,
lang/qt/src/decryptverifyarchivejob.h,
lang/qt/src/decryptverifyarchivejob_p.h,
lang/qt/src/qgpgmedecryptverifyarchivejob.cpp,
lang/qt/src/qgpgmedecryptverifyarchivejob.h: New.
* lang/qt/src/protocol.h (class Protocol): Add pure virtual member
function decryptVerifyArchiveJob
* lang/qt/src/protocol_p.h (Protocol::decryptVerifyArchiveJob): ... and
implement it.
* lang/qt/src/Makefile.am: Update accordingly.

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

GnuPG-bug-id: 6342
2023-02-02 12:11:29 +01:00
Ingo Klöcker
b3bdf14b37
cpp: Update decryption flags
* lang/cpp/src/context.h (DecryptArchive): New flag.
--

This flag corresponds to the GPGME_DECRYPT_ARCHIVE flag in gpgme.

GnuPG-bug-id: 6342
2023-02-02 09:56:22 +01:00
Ingo Klöcker
7b2188aca1
doc: Update NEWS
--

GnuPG-bug-id: 6342
2023-01-31 12:01:33 +01:00
Werner Koch
359378c5b3
json: New operation "identify" and convenience option --identify.
* src/gpgme-json.c (data_type_to_string): New.
(op_identify): New.
(process_request): Add to command list.
(cmd_identify): New.
(main): Add option --identify.
--
2023-01-31 09:52:04 +01:00
Werner Koch
577562dd4c
Update NEWS and set version to 1.19.0
--
2023-01-31 08:10:29 +01:00
Werner Koch
3cdcfa33f7
Merge branch 'ikloecker/t6342-gpgtar' into master
--
Solved conflicts:
	NEWS
	lang/cpp/src/context.cpp
	lang/cpp/src/context.h
2023-01-31 07:59:50 +01:00
Ingo Klöcker
7afd135cce
qt: Add job for creating encrypted archives
* lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h,
lang/qt/src/encryptarchivejob_p.h,
lang/qt/src/qgpgmeencryptarchivejob.cpp,
lang/qt/src/qgpgmeencryptarchivejob.h: New.
* lang/qt/src/protocol.h (class Protocol): Add pure virtual member
function encryptArchiveJob
* lang/qt/src/protocol_p.h (Protocol::encryptArchiveJob): ... and
implement it.
* lang/qt/src/Makefile.am: Update accordingly.

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

GnuPG-bug-id: 6342
2023-01-27 12:20:53 +01:00
Ingo Klöcker
275a3a2c16
qt: Add data provider for list of file names
* lang/qt/src/Makefile.am: Add new files and corresponding camel-case
header.
* lang/qt/src/dataprovider.h: Include interface from gpgme++ when
not building.
* lang/qt/src/filelistdataprovider.cpp,
lang/qt/src/filelistdataprovider.h: New.
--

The new data provider simplifies providing a nul-separated list of
UTF-8-encoded filenames, e.g. for creating signed or encrypted
archives. It is a simple read-only proxy for QByteArrayDataProvider.

GnuPG-bug-id: 6342
2023-01-27 12:17:09 +01:00
Ingo Klöcker
261245a2e0
cpp: Add convenience overload to set file name
* lang/cpp/src/data.h, lang/cpp/src/data.cpp (setFileName): Add
overload.
--

GnuPG-bug-id: 6342
2023-01-27 12:14:10 +01:00
Ingo Klöcker
3e31f648e5
cpp: Support all encryption flags
* lang/cpp/src/context.h (WantAddress): New flag.
* lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert
WantAddress to corresponding gpgme encrypt flags.
(operator<<): Add new flag to debug stream.
--

GnuPG-bug-id: 6359
2023-01-26 12:01:28 +01:00
Ingo Klöcker
ab7146aa61
doc: Update NEWS and API documentation
--

GnuPG-bug-id: 6342
2023-01-25 12:17:05 +01:00
Ingo Klöcker
95ea3bf831
core: Support usage of gpgtar for decrypting an encrypted archive
* src/gpgme.h.in (GPGME_DECRYPT_ARCHIVE): New decryption flag.
* src/engine-gpg.c (gpg_decrypt): Set use_gpgtar engine flag if
GPGME_DECRYPT_ARCHIVE flag is set. Check for new enough gpg and
incompatible flags. Use add_gpg_arg_with_value for gpg-only options
with a value and add_gpg_arg for gpg-only options without a value.
Set extra options for gpgtar and pass input data to stdin when using
gpgtar.

* tests/run-decrypt.c (show_usage): New options --archive and
--directory.
(main): Parse new options. Decrypt with gpgtar if --archive is given.
Set file name of output data to value of --directory option.
--

GnuPG-bug-id: 6342
2023-01-24 12:32:23 +01:00
Ingo Klöcker
4c872b6741
doc: Update NEWS and API documentation
--

GnuPG-bug-id: 6342
2023-01-19 12:08:35 +01:00
Ingo Klöcker
398375a0ab
qt: Allow deferred start of import job
* lang/qt/src/importjob.h (ImportJob::startLater): New pure virtual
method.
* lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmeimportjob.h
(QGpgMEImportJob::startLater): New method.

* lang/qt/tests/t-import.cpp (ImportTest::testDeferredStart): New.
--

This makes it possible to prepare an import job for a deferred start.

GnuPG-bug-id: 6323
2023-01-05 14:24:31 +01:00
Ingo Klöcker
18c2c0b250
qt: Support deferred start of jobs
* lang/qt/src/job.cpp, lang/qt/src/job.h (Job::startNow): New method.
* lang/qt/src/job_p.h (JobPrivate::start): New pure virtual method.
* lang/qt/src/qgpgmechangeexpiryjob.cpp
(QGpgMEChangeExpiryJobPrivate::start): New.
* lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJobPrivate::start):
New.
* lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJobPrivate::start): New.
* lang/qt/src/qgpgmelistallkeysjob.cpp
(QGpgMEListAllKeysJobPrivate::start): New.
* lang/qt/src/qgpgmesignencryptjob.cpp
(QGpgMESignEncryptJobPrivate::start): New.
* lang/qt/src/threadedjobmixin.h (Thread::hasFunction): New method.
(ThreadedJobMixin::run, ThreadedJobMixin::setWorkerFunction): New
methods.
--

startNow() starts a deferred job for which the worker function has been
set before.

GnuPG-bug-id: 6323
2023-01-04 12:16:04 +01:00
Ingo Klöcker
b6593bda1f
qt: Allow disabling automatic trust database check on key listing
* lang/qt/src/Makefile.am (qgpgme_sources): Add listallkeysjob.cpp.
* lang/qt/src/listallkeysjob.cpp: New.
* lang/qt/src/listallkeysjob.h (enum ListAllKeysJob::Option,
typedef ListAllKeysJob::Options, ListAllKeysJob::setOptions,
ListAllKeysJob::options): New.
* lang/qt/src/qgpgmelistallkeysjob.cpp (list_keys): Set context flag
"no-auto-check-trustdb" if requested.
(QGpgMEListAllKeysJob::start, QGpgMEListAllKeysJob::exec): Add options
to call of list_keys.
--

GnuPG-bug-id: 6261
2022-11-04 10:44:07 +01:00