aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* qt: Extend SignKeyJob to create trust signaturesIngo Klöcker2021-05-055-5/+629
| | | | | | | | | | | | | | | * lang/qt/src/signkeyjob.h (SignKeyJob::setTrustSignature): New. * lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmesignkeyjob.cpp (QGpgMESignKeyJob::setTrustSignature): New. * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Handle trust signatures. (QGpgMESignKeyJob::start): Pass trust signature attributes to sign_key. (QGpgMESignKeyJob::setTrustSignature): New. -- This allows Kleopatra to create trust signatures for trusted introducers. GnuPG-bug-id: 5245, 5421
* qt: Pimpl QGpgMESignKeyJobIngo Klöcker2021-05-052-43/+41
| | | | | | | | | | | | | | | | | | | * 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
* qt: Add method for getting config entries for components by entry nameIngo Klöcker2021-03-052-7/+35
| | | | | | | | | | | | | | | | * 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
* Qt: Undeprecate QByteArray based start functsAndre Heinecke2021-01-042-2/+2
| | | | | | | | | | | | * 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.
* Revert "cpp: Use portable off_t size_t"Andre Heinecke2020-11-202-2/+2
| | | | | | | | | This reverts commit 88294023c196497cfa6737be262c8b0c09d2a3ce. -- 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.
* cpp: Use portable off_t size_tAndre Heinecke2020-11-182-2/+2
| | | | | | | | | | | | | | | | | * 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
* qt: Avoid empty "[email protected]" signature notationsIngo Klöcker2020-11-181-1/+1
| | | | | | | | | * 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
* qt: Fix export of qDebug GpgME::Error overloadAndre Heinecke2020-11-121-0/+1
| | | | * lang/qt/src/debug.cpp: Include debug.h to get the export decl.
* qt: Add export macro for QDebug operatorAndre Heinecke2020-11-111-1/+3
| | | | | | | | | | * 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.
* qt: Allow build with older GnuPG (< 2.2.18).NIIBE Yutaka2020-11-111-1/+4
| | | | | | | * lang/qt/tests/t-remarks.cpp (initTestCase): Check gpg for allow-weak-key-signatures option. Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Make audit parameters of result signal optionalIngo Klöcker2020-11-031-1/+1
| | | | | | | | | | | 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
* qt: Add support for revoke signature quick commandIngo Klöcker2020-10-293-2/+38
| | | | | | | | | | * lang/qt/src/quickjob.h (QuickJob::startRevokeSignature): New. * lang/qt/src/qgpgmequickjob.h, lang/qt/src/qgpgmequickjob.cpp (QGpgMEQuickJob::startRevokeSignature): New. * lang/qt/src/qgpgmequickjob.cpp (revokeSignatureWorker): New. -- GnuPG-bug-id: 5094
* qt: Some minor cleanupsIngo Klöcker2020-10-291-13/+3
| | | | | | | | | * 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.
* qt: Add QDebug stream operator for GpgME::ErrorIngo Klöcker2020-10-233-1/+99
| | | | | | | | | | * 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.
* cpp, qt: Add missing comparison operators for version info comparisonIngo Klöcker2020-10-231-0/+32
| | | | | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version::operator<=, EngineInfo::Version::operator>=, EngineInfo::Version::operator!=): New. * lang/qt/tests/t-various.cpp (TestVarious::testVersion): Add tests for new comparison operators. * NEWS: Mention added API
* cpp, qt: Fix version info comparisonIngo Klöcker2020-10-231-0/+1
| | | | | | | | | | | | * 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.
* qt: Update the documentation of ListAllKeysJobIngo Klöcker2020-09-081-2/+3
| | | | | | | | * lang/qt/src/listallkeysjob.h (ListAllKeysJob::start): Document that the mergeKeys argument is ignored with gpg >= 2.1. -- GnuPG-bug-id: 4794
* qt: List keys once with --with-secret instead of twiceIngo Klöcker2020-09-072-9/+116
| | | | | | | | | | | | | | | | | * 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
* qt: Fix an rfc2253 parser flawWerner Koch2020-08-281-3/+2
| | | | | | | | | | | | | | * 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
* core: Add error handling to setexpireIngo Klöcker2020-08-141-0/+9
| | | | | | | | | | | | | | | | | | | * 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
* qt: Support changing expiry of subkeysIngo Klöcker2020-08-113-4/+39
| | | | | | | | | | | | | * 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
* qt: Port to new setExpire()Ingo Klöcker2020-08-051-18/+6
| | | | | | | | | | | | * 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
* qt: Add test for setExpireIngo Klöcker2020-08-041-0/+54
| | | | | | | * lang/qt/tests/t-various.cpp (TestVarious::testSetExpire): New. -- GnuPG-bug-id: 5003
* qt, cpp: Support export modesAndre Heinecke2020-07-163-4/+22
| | | | | | | | | | | | | * 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.
* tests: Remove/change tests for GnuPG 2.3 with no gpg.keyserver.NIIBE Yutaka2020-05-111-30/+0
| | | | | | | * lang/qt/tests/t-config.cpp (testKeyserver): Remove. * tests/gpg/t-gpgconf.c (main): Test with dirmngr.keyserver. Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Change logging categoryaheinecke/json-testAndre Heinecke2020-02-1910-55/+55
| | | | | | | | | * 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.
* qt: Log execution args of gpg-cardAndre Heinecke2020-02-191-3/+5
| | | | * lang/qt/src/qgpgmegpgcardjob.cpp (do_work): Log call.
* qt: Add dummy context to make mixin happyAndre Heinecke2020-02-121-1/+2
| | | | | | * lang/qt/qgpgmegpgcardjob.cpp (QGpgMEGpgCardJob): Add context. -- Otherwise it fails with an assert.
* qt: Add GpgCardJob following the job patternAndre Heinecke2020-02-128-2/+319
| | | | | | | | | | | | | | | | | | | * 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
* cpp, qt: Use uidhash to select uids for signingAndre Heinecke2019-12-131-0/+1
| | | | | | | | | | | | | | | | * 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.
* qt,tests: Take care for old DSA key using deprecated digest algo.NIIBE Yutaka2019-11-071-0/+4
| | | | | | | | * 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 <[email protected]>
* qt, tests: Add check for supported versionsAndre Heinecke2019-11-064-21/+41
| | | | | | | | | | | * 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
* qt, tests: Replace accidentally commited assertAndre Heinecke2019-11-061-1/+1
| | | | | | | | | | | * 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.
* qt,tests: Add test to add an exportable certifyAndre Heinecke2019-11-061-0/+88
| | | | | | | | * lang/qt/test/t-remarks.cpp (testRemarkReplaceSingleUIDExportable): New. -- Just checking in case the edit-key offers new states for that.
* qt, tests: Add testcase for multiple remarskAndre Heinecke2019-11-041-0/+88
| | | | * lang/qt/tests/t-remarks.cpp (testMultipleRemarks): New.
* qt,tests: Move remarks test out and extend itAndre Heinecke2019-11-043-114/+325
| | | | | | | | | | | * 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.
* qt: Allow adding empty remarksAndre Heinecke2019-11-011-1/+1
| | | | | * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Allow empty remarks.
* qt,tests: Add test for remarksAndre Heinecke2019-10-291-0/+111
| | | | * lang/qt/tests/t-various.cpp (testRemark): New.
* qt: Extend signkeyjob to handle remarks and dupsAndre Heinecke2019-10-293-3/+56
| | | | | | | | | | | * 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
* qt: Handle diagnostic audit log for CMSAndre Heinecke2019-03-201-1/+7
| | | | | * lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html): Handle CMS audit log.
* build: With LD_LIBRARY_PATH defined, use --disable-new-dtags.NIIBE Yutaka2019-01-161-1/+1
| | | | | | | | | | | | | * configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags. * tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE. * lang/cpp/tests/Makefile.am, lang/qt/tests/Makefile.am: Likewise. * tests/gpg/Makefile.am, tests/gpgsm/Makefile.am: Likewise. * tests/json/Makefile.am, tests/opassuan/Makefile.am: Likewise. -- GnuPG-bug-id: 4298 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Use tofu conflict test keys without expiryAndre Heinecke2019-01-091-28/+30
| | | | | | | | | | * lang/qt/tests/t-tofuinfo.cpp: Use new test keys without expiry. -- The old keys expired on 2019-01-06. GnuPG-Bug-Id: T3815
* qt,cpp: Consistently use nullptr and overrideAndre Heinecke2018-12-0319-83/+84
| | | | | | | | | | | | | | | * 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.
* Add SPDX identifiers to most source filesWerner Koch2018-11-161-4/+3
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* spelling: fix misspellingsDaniel Kahn Gillmor2018-11-085-10/+10
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* doc: use https:// for www.gnu.orgDaniel Kahn Gillmor2018-10-183-5/+5
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* qt, tests: Add test for single get keyAndre Heinecke2018-10-091-0/+33
| | | | | | | * lang/qt/tests/t-keylist.cpp (testGetKey): New. -- Added this to check if there was a memleak in that function.
* Release 1.12.0gpgme-1.12.0Werner Koch2018-10-081-1/+1
| | | | | | | | | | * 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 <[email protected]>
* Make GNUPGHOME for tests overridableAndre Heinecke2018-08-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* qt: Handle encoding for diagnosticsAndre Heinecke2018-07-181-1/+53
| | | | | | | | | | | | | | | | | | | | * 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.