aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qt: Rely on the bad passphrase error reported by gpgIngo Klöcker2022-04-251-17/+2
| | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyjob.cpp (patch_decryption_result): Removed. (decrypt_verify): Remove usage of patch_decryption_result. -- This reverts most of revision d8e5871dca9425811873058150677a158235613d. GnuPG-bug-id: 5939
* core: Return BAD_PASSPHRASE error code on symmetric decryption.Ingo Klöcker2022-04-251-2/+21
| | | | | | | | | | | | | * src/decrypt.c (op_data_t): Add field symdecrypt_failed. (parse_status_error): Handle BAD_PASSPHRASE error code. (_gpgme_decrypt_status_handler): Consult new field. -- Return a bad passphrase error if the failure during symmetric decryption is likely caused by the user entering a wrong passphrase. The special error code of a failed public key decryption takes precedence. GnuPG-bug-id: 5939
* qt: Report better error if decryption failed because of bad passphraseIngo Klöcker2022-04-221-7/+20
| | | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyjob.cpp (patch_decryption_result): New. (decrypt_verify): Call patch_decryption_result. -- Replace the generic "decryption failed" error with the more specific "bad passphrase" error if the audit log indicates that a wrong symmetric password caused the decryption to fail. GnuPG-bug-id: 5939
* cpp: Allow changing the error of a resultIngo Klöcker2022-04-222-0/+9
| | | | | | | | | | * lang/cpp/src/result.h (class Result): Add member function setError. -- This can be used to replace the error of a result with a more suitable error. GnuPG-bug-id: 5939
* doc: Remove explanation about AM_PATH_GPGME_PTH for GNU Pth.NIIBE Yutaka2022-04-081-4/+0
| | | | | | | | | -- The commit 3ddf4c3d4000a9b0b52180c3aa3acf1387a193bf in 2011 removed the support. Signed-off-by: NIIBE Yutaka <[email protected]>
* qt,doc: Fix typo and grammar in API documentationIngo Klöcker2022-04-051-5/+2
| | | | --
* cpp: Handle canceling of an edit operationIngo Klöcker2022-04-051-2/+2
| | | | | | | | | | | * lang/cpp/src/editinteractor.cpp (CallbackHelper::edit_interactor_callback_impl): Check for error _or_ canceled state. -- Without this canceling an edit operation resulted in a "General error". GnuPG-bug-id: 5904
* cpp: Return actual error if revocation failsIngo Klöcker2022-04-053-0/+22
| | | | | | | | | | | | | | | * lang/cpp/src/editinteractor.cpp, lang/cpp/src/editinteractor.h (EditInteractor::parseStatusError): New. * lang/cpp/src/gpgrevokekeyeditinteractor.cpp (GpgRevokeKeyEditInteractor::Private::nextState): Handle status error. -- With this change the interactor returns a proper error like "Bad Passphrase" or "Empty Passphrase" instead of an unspecific "General Error" if a status error occurred. GnuPG-bug-id: 5904
* cpp: Add internal utility function for splitting stringsIngo Klöcker2022-04-051-0/+13
| | | | | | | | | | * lang/cpp/src/util.h (split): New. -- This function splits a given string using the given delimiter into several strings. GnuPG-bug-id: 5904
* cpp: Do not export symbols of the Private classIngo Klöcker2022-04-051-1/+1
| | | | | | | | * lang/cpp/src/gpgrevokekeyeditinteractor.h (class GpgRevokeKeyEditInteractor): Mark nested class Private as hidden. -- GnuPG-bug-id: 5904
* core: Don't use internal __assuan functions.NIIBE Yutaka2022-04-052-5/+29
| | | | | | | | | | * configure.ac (nanosleep): Detect. * src/assuan-support.c: Don't use __assuan_usleep. (my_socketpair): Don't use __assuan_socketpair. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Don't keep using deprecated ath_ API.NIIBE Yutaka2022-04-052-11/+23
| | | | | | | | | | | | | | | | | * src/posix-io.c: Don't include ath.h. (_gpgme_io_read): Call read directly. (_gpgme_io_write): Call write directly. (_gpgme_io_waitpid): Call waitpid directly. (_gpgme_io_select_select): Call select directly. (_gpgme_io_recvmsg): Call recvmsg directly. (_gpgme_io_sendmsg): Call sendmsg directly. (_gpgme_io_connect): Call connect directly. * src/assuan-support.c: Don't include ath.h. (my_waitpid): Call waitpid directly. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Check arguments passed to the revoke key jobIngo Klöcker2022-03-312-5/+98
| | | | | | | | | | | | | | | | * lang/qt/src/qgpgmerevokekeyjob.cpp (check_arguments): New. (QGpgMERevokeKeyJob::start, QGpgMERevokeKeyJob::exec): Call check_arguments. * lang/qt/tests/t-revokekey.cpp (RevokeKeyJobTest): Add member functions testErrorHandling_nullKey, testErrorHandling_invalidReason, testErrorHandling_invalidDescription. -- Check that the key is not a null key, that the reason has a valid value, and that the description lines do not contain endline characters and are not empty. GnuPG-bug-id: 5904
* qt,tests: Verify reason code and description of revocationIngo Klöcker2022-03-301-0/+66
| | | | | | | | | | | | | | | * lang/qt/tests/t-revokekey.cpp (RevokeKeyJobTest::testRevokeKeyAsync, RevokeKeyJobTest::testRevokeKeySync_noReasonDescription, RevokeKeyJobTest::testRevokeKeySync_oneLineReasonDescription, RevokeKeyJobTest::testRevokeKeySync_twoLinesReasonDescription): Call verifyReason. (class RevokeKeyJobTest): Add private member function verifyReason. -- gpgme doesn't parse the information, so we run gpg manually to verify the revocation reason and the description. GnuPG-bug-id: 5904
* qt: Add job to revoke own OpenPGP keysIngo Klöcker2022-03-3010-5/+495
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/revokekeyjob.h, lang/qt/src/qgpgmerevokekeyjob.h, lang/qt/src/qgpgmerevokekeyjob.cpp: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function revokeKeyJob. * lang/qt/src/protocol_p.h (Protocol::revokeKeyJob): New. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/Makefile.am (the_tests, moc_files, noinst_PROGRAMS): Add new test. (t_revokekey_SOURCES): New. * lang/qt/tests/t-revokekey.cpp: New. -- The new job allows revoking own OpenPGP keys as with the "revkey" edit-key command of gpg. GnuPG-bug-id: 5904
* cpp: Add interactor to revoke a keyIngo Klöcker2022-03-305-0/+290
| | | | | | | | | | * lang/cpp/src/global.h (enum class RevocationReason): New. * lang/cpp/src/gpgrevokekeyeditinteractor.cpp, lang/cpp/src/gpgrevokekeyeditinteractor.h: New. * lang/cpp/src/Makefile.am: Add new files. -- GnuPG-bug-id: 5904
* doc: Update NEWSIngo Klöcker2022-03-291-0/+2
| | | | | | -- GnuPG-bug-id: 5906
* qt: Set default visibility of all symbols to hiddenIngo Klöcker2022-03-281-0/+10
| | | | | | | | | | | | * configure.ac: Add -fvisibility=hidden to GPGME_QT_CFLAGS if gcc supports the flag. -- With this change all defined symbols are hidden by default, so that they are not exported anymore. All symbols that are part of the ABI and that shall still be exported are already marked as having default visibility. GnuPG-bug-id: 5906
* cpp: Set default visibility of all symbols to hiddenIngo Klöcker2022-03-283-3/+254
| | | | | | | | | | | | | | | | | * configure.ac: Add -fvisibility=hidden to GPGME_CPP_CFLAGS if gcc supports the flag. * lang/cpp/src/Makefile.am (AM_CPPFLAGS): Add GPGME_CPP_CFLAGS. * m4/ax_gcc_func_attribute.m4: New. -- With this change all defined symbols are hidden by default, so that they are not exported anymore. All symbols that are part of the ABI and that shall still be exported are already marked as having default visibility. The m4 macro was taken from the website mentioned in the License header of the file. GnuPG-bug-id: 5906
* cpp: Put local helper function into unnamed namespaceIngo Klöcker2022-03-281-0/+2
| | | | | | | lang/cpp/src/context.cpp (to_auditlog_flags): Wrap in unnamed namespace. -- GnuPG-bug-id: 5906
* doc: Remove bogus documentationIngo Klöcker2022-03-281-16/+0
| | | | | | | | -- These lines were accidentally added with the documentation for gpgme_op_setexpire. The actual documentation for gpgme_op_revuid_start is a bit further down.
* core: Support keylist mode for op_keylist_from_data.NIIBE Yutaka2022-03-165-5/+11
| | | | | | | | | | | | | | * src/engine-backend.h (keylist_data): Add MODE argument. * src/engine-gpg.c (gpg_keylist_data): Add MODE argument. * src/engine.c (_gpgme_engine_op_keylist_data): Likewise. * src/engine.h (_gpgme_engine_op_keylist_data): Declaration. * src/keylist.c (gpgme_op_keylist_from_data_start): Call _gpgme_engine_op_keylist_data with ctx->keylist_mode. -- GnuPG-bug-id: 5438 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Add missing include of config.hIngo Klöcker2022-03-071-0/+4
| | | | | | | * lang/qt/src/util.cpp: Include config.h. -- GnuPG-bug-id: 5871
* qt,doc: Remove comments about throwing exceptionsIngo Klöcker2022-03-077-17/+0
| | | | | | -- The jobs do not throw GpgME::Exception anymore since a long time.
* doc: Update NEWSIngo Klöcker2022-03-071-1/+14
| | | | | | -- Add a few more changes in version 1.17.0.
* Post release updatesWerner Koch2022-03-062-2/+8
|
* Release 1.17.1gpgme-1.17.1Werner Koch2022-03-062-3/+9
| | | | * configure.ac: Bump QT LT version to C15/A0/R0.
* qt: Fix ABI compatibility with 1.16.0Ingo Klöcker2022-02-171-6/+7
| | | | | | | | | | | * lang/qt/src/protocol.h (class Protocol): Move new virtual methods to the end of the class. -- This makes the vtable offsets of the old virtual methods match those in 1.16.0 again. GnuPG-bug-id: 5834
* Post release updatesWerner Koch2022-02-072-1/+5
| | | | --
* Release 1.17.0gpgme-1.17.0Werner Koch2022-02-073-10/+35
|
* qt: Fix build for older Qt versions.Werner Koch2022-02-071-0/+1
| | | | * lang/qt/src/util.cpp: Include <functional>.
* qt: Add job to import keys given by key idsIngo Klöcker2022-02-039-1/+316
| | | | | | | | | | | | | | | | | | * lang/qt/src/receivekeysjob.h, lang/qt/src/qgpgmereceivekeysjob.h, lang/qt/src/qgpgmereceivekeysjob.cpp: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function receiveKeysJob. * lang/qt/src/protocol_p.h (Protocol::receiveKeysJob): Implement it. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-receivekeysjob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- This job allows importing keys that are given by their key ids (or fingerprints) from keyservers as with gpg's recv-keys command. GnuPG-bug-id: 5808
* qt: Add helper for converting QStringList to vector of stringsIngo Klöcker2022-02-033-2/+101
| | | | | | | | | | | | | * lang/qt/src/util.h, lang/qt/src/util.cpp: New. * lang/qt/src/Makefile.am (qgpgme_sources, private_qgpgme_headers): Add new files. -- Additionally to the internal helper function toStrings(), this adds a copy of the internal make_error helper of GpgME++ which is used in a few places by QGpgME. We use the same error source id as GpgME++. GnuPG-bug-id: 5808
* cpp: Allow import of keys given by key idsIngo Klöcker2022-02-032-0/+20
| | | | | | | | | * lang/cpp/src/context.h (class Context): Add overloads of member functions importKeys and startKeyImport * lang/cpp/src/context.cpp (class Context): ... and implement them. -- GnuPG-bug-id: 5808
* cpp: Add internal adapter for passing a vector of strings to gpgmeIngo Klöcker2022-02-033-2/+73
| | | | | | | | | | | | * lang/cpp/src/util.h (class StringsToCStrings): New. * lang/cpp/src/util.cpp: New. * lang/cpp/src/Makefile.am: Add new file. -- This adapter simplifies passing a vector of strings as NULL-terminated array of const char* to the C-interface of gpgme. GnuPG-bug-id: 5808
* core: New function gpgme_op_receive_keysIngo Klöcker2022-02-0313-13/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_receive_keys_start, gpgme_op_receive_keys): New. * src/gpgme.def, src/libgpgme.vers: Add them. * src/engine-backend.h (struct engine_ops): Add arg keyids to field 'import'. * src/engine.h, src/engine.c (_gpgme_engine_op_import): Add arg keyids. * src/engine.c (_gpgme_engine_op_import): Forward new arg keyids. * src/import.c: (_gpgme_op_import_start, _gpgme_op_import_keys_start): Pass NULL to new arg of _gpgme_op_import_start. (_gpgme_op_receive_keys_start, gpgme_op_receive_keys_start, gpgme_op_receive_keys): New. * src/engine-gpg.c (gpg_import): Add arg keyids. Extend check for valid arguments. Build command line if keyids are given. * src/engine-gpgsm.c (gpgsm_import): Add arg keyids. Return error if keyids is not NULL. tests/run-receive-keys.c: New. tests/Makefile.am (noinst_PROGRAMS): Add new test runner. -- The new function allows importing keys given by their key ids or fingerprints from a keyserver (like gpg's --recv-keys command). GnuPG-bug-id: 5808
* doc: Fixed type of an object memberWerner Koch2022-01-201-1/+1
| | | | | | -- GnuPG-bug-id: 5719
* qt: Remove superfluous includeIngo Klöcker2022-01-171-2/+0
| | | | | | | | * lang/qt/src/importjob.h: Remove include of QByteArray. -- QByteArray is included by other headers already. Besides: Qt headers shouldn't be included with the package/module prefixes.
* qt: Fix build without installed GpgME++ headersIngo Klöcker2022-01-176-10/+18
| | | | | | | | | * lang/qt/src/importjob.h, lang/qt/src/wkdlookupresult.h: Include headers of GpgME++ without "gpgme++/" prefix when building QGpgme. * lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmewkdlookupjob.cpp, lang/qt/src/wkdlookupresult.cpp, lang/qt/tests/t-import.cpp: Include headers of GpgME++ without "gpgme++/" prefix. --
* tests: Fix generation of keys without expirationIngo Klöcker2022-01-131-8/+16
| | | | | | | | | | | * tests/run-genkey.c (parse_expire_string): Support default expiration and no expiration. Set flag for no expiration. (main): Allow update of flags when generating new key. -- This makes the parsing of different values for expiration match the parsing done by gpg's --quick-gen-key. In particular, this makes it possible again to generate keys without expiration.
* tests: Remove unsupported option --status from usage helpIngo Klöcker2022-01-131-1/+0
| | | | | | | * tests/run-swdb.c (show_usage): Remove option --status. -- run-swdb does not support the option --status.
* qt: Add job to add existing subkeys to other keysIngo Klöcker2022-01-1312-9/+601
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/addexistingsubkeyjob.h, lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp, lang/qt/src/qgpgmeaddexistingsubkeyjob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function addExistingSubkeyJob. * lang/qt/src/protocol_p.h (Protocol::addExistingSubkeyJob): Implement. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/Makefile.am (the_tests, moc_files, noinst_PROGRAMS): Add new test. (t_addexistingsubkey_SOURCES): New. * lang/qt/tests/t-addexistingsubkey.cpp: New. * lang/qt/tests/t-support.h (VERIFY_OR_RETURN_VALUE, COMPARE_OR_RETURN_VALUE, VERIFY_OR_OBJECT, COMPARE_OR_OBJECT, VERIFY_OR_FALSE, COMPARE_OR_FALSE): New. * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp (class QQGpgMETest): New member function importSecretKeys. -- The new job allows adding existing subkeys to other keys as with the "addkey" edit-key command of gpg. The added subkey will have the same expiration date (+/- 1 second) as the original subkey. GnuPG-bug-id: 5770
* qt,tests: Add helper to hook up the test passphrase providerIngo Klöcker2022-01-138-179/+69
| | | | | | | | | | | | | | | * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp (class QGpgMETest): Add member function hookUpPassphraseProvider. Add member mPassphraseProvider. * lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-remarks.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp: Use new helper. -- GnuPG-bug-id: 5770
* qt,tests: Add asyncDone signal to base class of all testsIngo Klöcker2022-01-1313-35/+4
| | | | | | | | | | | | | | | | | | | | | | | * lang/qt/tests/t-support.h (class QGpgMETest): Add signal asyncDone. * lang/qt/tests/t-changeexpiryjob.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-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp, lang/qt/tests/t-wkdlookup.cpp, lang/qt/tests/t-wkspublish.cpp: Remove signal asyncDone from the test classes. -- This reduces duplication and makes it possible to use the signal in the base class. GnuPG-bug-id: 5770
* cpp: Add interactor to add existing subkeys to other keysIngo Klöcker2022-01-124-0/+273
| | | | | | | | | * lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp, lang/cpp/src/gpgaddexistingsubkeyeditinteractor.h: New. * lang/cpp/src/Makefile.am: Add new files. -- GnuPG-bug-id: 5770
* core: Return an error for secret key export operationsIngo Klöcker2022-01-102-1/+4
| | | | | | | | | | | src/export.c (export_status_handler): Handle "export_keys.secret". -- This allows callers of the synchronous export operations to react properly to errors (e.g. wrong passphrase) during the export of secret keys. GnuPG-bug-id: 5766
* doc: Update NEWSIngo Klöcker2022-01-041-0/+11
| | | | | | -- GnuPG-bug-id: 5757
* qt: Add factory function for secret subkey export jobIngo Klöcker2022-01-043-1/+19
| | | | | | | | | | | | | | * lang/qt/src/protocol.h (class Protocol): Add member function secretSubkeyExportJob. * lang/qt/src/protocol_p.h (Protocol::secretSubkeyExportJob): Implement. * lang/qt/tests/run-exportjob.cpp (showUsageAndExitWithCode): Print new option. (createExportJob): Create secret subkey export job if requested. (main): New option --secret-subkey. -- GnuPG-bug-id: 5757
* cpp: Allow export of secret subkeysIngo Klöcker2022-01-042-4/+30
| | | | | | | | | | | | | | | * lang/cpp/src/context.h (enum Context::ExportMode): Add value ExportSecretSubkey. (class Context): Add member functions exportSecretSubkeys and startSecretSubkeyExport. * lang/cpp/src/context.cpp (Context::exportPublicKeys, Context::startPublicKeyExport): Return error if ExportSecretSubkey mode flag is set. (Context::exportSecretSubkeys, Context::startSecretSubkeyExport): Implement. -- GnuPG-bug-id: 5757
* qt: Remove obsolete QGpgMESecretKeyExportJobIngo Klöcker2022-01-043-232/+1
| | | | | | | | | | | | | * lang/qt/src/Makefile.am: Remove all occurrences of qgpgmesecretkeyexportjob.*. * lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.h: Remove. -- QGpgMESecretKeyExportJob is an internal class, so that we can safely remove it. GnuPG-bug-id: 5757