aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.14.0gpgme-1.14.0Werner Koch2020-07-162-9/+13
| | | | | | | * configure.ac: Bump LT versions to c=C34/A23/R0 cpp=C17/A11/R0 qt=C11/A4/R0. -- GnuPG-bug-id: 4996
* qt, cpp: Support export modesAndre Heinecke2020-07-166-14/+72
| | | | | | | | | | | | | * 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.
* core: Also allow GPGME_EXPORT_MODE_SSH for gpgme_op_export.Werner Koch2020-07-161-0/+1
| | | | | | | | | * src/export.c (export_start): Allow that mode. -- The test tools uses gpgme_op-export_ext and thus did not caught it. Signed-off-by: Werner Koch <[email protected]>
* core: New export mode to export as OpenSSH public key.Werner Koch2020-07-166-37/+97
| | | | | | | | | | | | * src/gpgme.h.in (GPGME_EXPORT_MODE_SSH): New. * src/export.c (export_ext_start): Allow for new mode. * src/engine-gpg.c (export_common): Implement. * tests/run-export.c (status_cb): New. (main): New options --status and --ssh. -- GnuPG-bug-id: 4310 Signed-off-by: Werner Koch <[email protected]>
* core: Deprecate the non-working trustlist functions.Werner Koch2020-07-1516-374/+17
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in: Clarify that the trustlist function should not be used. * src/engine.c (_gpgme_engine_op_trustlist): Always return an error. * src/engine-backend.h (struct engine_ops): Remove trustlist member. * src/engine-gpg.c (gpg_trustlist): Remove. (struct engine_ops): Remove that member. Also in all other engines. * tests/gpg/t-trustlist.c: Remove. * lang/python/tests/t-trustlist.py: Remove. -- This never worked in reality because the required feature has been removed from GnuPG version 1.3.2 soon after introduction of this feature in gpgme - 17 years ago. It was anyway marked as experimental. We keep the API and ABI, though. GnuPG-bug-id: 4834 Signed-off-by: Werner Koch <[email protected]>
* core: New keylist mode GPGME_KEYLIST_MODE_WITH_KEYGRIP.Werner Koch2020-07-1510-4/+33
| | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_KEYGRIP): New. * src/gpgme-json.c (op_keylist): New flag "keygrip". * src/engine-gpg.c (gpg_keylist_build_options): Pass the options. * lang/cpp/src/global.h (WithKeygrip): New. * lang/cpp/src/context.cpp: Add check. * lang/cpp/src/key.cpp (Key::update): Handle WithKeygrip. * lang/cpp/src/verificationresult.cpp: Ditto. * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Ditto. -- GnuPG-bug-id: 4939 Signed-off-by: Werner Koch <[email protected]>
* python: Workaround for a regression in GnuPG 2.2.21Werner Koch2020-07-142-2/+16
| | | | | | | | | * lang/python/tests/support.py (is_gpg_version): New. * lang/python/tests/t-encrypt-sym.py: Add workaround. -- GnuPG-bug-id: 4991 Signed-off-by: Werner Koch <[email protected]>
* doc: Explain verify_result_t.status == 0 moreAndre Heinecke2020-06-091-2/+9
| | | | | | | | | | | | * doc/gpgme.texi (gpgme_verify_result_t): Explain GPGME_STATUS_NO_ERROR more clearly. -- This might help to avoid misunderstandings how the status can be interpreted and explains why a verify of unsigned PGP Data returns no error. As a reaction to CVE-2020-10759 discovered by Justin Steven.
* core: Fix setting of the chain_model signature result.Werner Koch2020-06-051-1/+1
| | | | | | | | | | | | | * src/verify.c (parse_trust): Fix detection of "chain" keyword. -- Fixes-commit: da6f3dc0c53f11f7432b3c258702db07d6c37f9a from 2007 shortly after introducing this. I doubt that this info has ever been used (it is for qualified signatures, which are only supported using the legacy German RegTP rules for them which were soon overturned by the commercial CAs). Signed-off-by: Werner Koch <[email protected]>
* tests: Remove/change tests for GnuPG 2.3 with no gpg.keyserver.NIIBE Yutaka2020-05-112-34/+4
| | | | | | | * 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]>
* w32: Explicitly link ws2_32Andre Heinecke2020-05-081-2/+3
| | | | | | | | | * src/Makefile.am (gpgme_w32_extra_libs): New. (libgpgme_la_LIBADD, libgpgme_glib_la_LIBADD): Use it. -- Since w32-io.c directly uses functions from ws2_32 it should not rely on libgpg-error to pull in this dependency.
* GPGME_CREATE_NOEXPIRE is only available since 1.9.0dupgit2020-05-081-1/+1
| | | | | | | | * doc/gpgme.texi: Fixes version number from 1.8.0 to 1.9.0 for GPGME_CREATE_NOEXPIRE. GnuPG-Bug-Id: T4922 Signed-off-by: dupgit <[email protected]>
* core: Make sure the keygrip is available in WITH_SECRET mode.Werner Koch2020-05-082-2/+6
| | | | | | | | | | | | | * src/engine-gpg.c (gpg_keylist_build_options): Send --with-keygrip if --with-secret is used. -- Since GnuPG 2.2.19 the keygrip was not anymore send if only --with-secret was used in a public key listing. Given that --with-secret requires computation of the keygrip anyway, there is no point in not requesting the keyrip in this case. GnuPG-bug-id: 4820
* tests, json: Do not check for keygrip of pubkeysAndre Heinecke2020-05-081-2/+0
| | | | | | | | | | | | | | | | | | | * tests/json/t-keylist-secret.out.json: Do not check for keygrip of bravo key. -- Since GnuPG 2.2.19 the keygrip is not emitted for public keys in a keylisting --with-secret. As the GPGME test suite should pass with several versions the json test cannot test this as the suite does not allow version checks for different output. What the intended behavior is might still be up for discussion, always adding --with-keygip is not a good solution because it slows down keylistings for large keyrings. GnuPG-Bug-Id: T4820
* tests: Add ECC key generation for tests/gpgsm.NIIBE Yutaka2020-03-272-33/+65
| | | | | | * tests/gpgsm/t-genkey.c (check_result): New. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Fix library dependency.NIIBE Yutaka2020-03-271-1/+1
| | | | | | | | | | | * src/Makefile.am (gpgme_tool_LDADD): Add @GPG_ERROR_LIBS@. -- Since gpgme-tool uses gpg_strerror, it should be linked to -lgpg-error. Signed-off-by: NIIBE Yutaka <[email protected]>
* core: New context flags "include-key-block" and "auto-key-import".Werner Koch2020-03-176-2/+92
| | | | | | | | | | | | | | | | | | | | | | * src/gpgme.c (gpgme_set_ctx_flag): Add flags "include-key-block" and "auto-key-import". (gpgme_get_ctx_flag): Ditto. * src/context.h (struct gpgme_context): Add flags include_key_block and auto_key_import. * src/engine-gpg.c (struct engine_gpg): Likewise. (gpg_set_engine_flags): Set the flags for gpg versions >= 2.2.20. (gpg_decrypt): Set option according to the new flags. (gpg_encrypt): Ditto. (gpg_encrypt_sign): Ditto. (gpg_sign): Ditto. (gpg_verify): Ditto. tests/run-verify: Add option --auto-key-import. tests/run-sign: add option --include-key-block. -- GnuPG-bug-id: 4856 Signed-off-by: Werner Koch <[email protected]>
* python: fix minor typo in howtoBernhard Reiter2020-03-031-1/+1
|
* qt: Change logging categoryaheinecke/json-testAndre Heinecke2020-02-1911-55/+58
| | | | | | | | | * 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.
* python: Also detect python 3.9.Werner Koch2020-02-143-5/+5
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* 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-129-2/+322
| | | | | | | | | | | | | | | | | | | * 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
* Do not test for a bug in older GnuPG versionsAndre Heinecke2020-01-291-1/+0
| | | | | | | | | | | * tests/json/t-keylist-secret.out.json -- Since at least 2.2.19 GnuPG no longer emits secret = true for keys where it does not have a secret. To avoid failures with older versions we remove the check altogether. GnuPG-Bug-Id: T4820
* m4/python: Scan for python 3.8 as welldkg/fix-4821Daniel Kahn Gillmor2020-01-231-1/+1
| | | | | | | | | | | | * m4/python.m4: Scan for python 3.8 as well. -- It's not clear to me why python3.8 should be commented out of the python path search. This change simplifies and normalizes the search for modern versions of python 3. Signed-Off-By: Daniel Kahn Gillmor <[email protected]>
* core: Add MacOS fallbacks to look for binariesAndre Heinecke2020-01-171-20/+49
| | | | | | | | | | | | | | | * src/posix-util.c (find_executable): New. (walk_path_str): Factored out from walk_path. (walk_path): Replaced by find_executable. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use find_executable. -- This should help to locate GnuPG on MacOS systems where it is not part of the PATH environment variable and should reduce the need to have fixed path known at GPGME compile time. mailvelope/issue699
* cpp, qt: Use uidhash to select uids for signingAndre Heinecke2019-12-135-1/+24
| | | | | | | | | | | | | | | | * 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.
* core: Extend gpgme_user_id_t with uidhash member.Werner Koch2019-12-136-0/+19
| | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_user_id): Add field 'uidhash'. * src/key.c (gpgme_key_unref): Free it. * src/keylist.c (keylist_colon_handler): Set it. * tests/run-keylist.c (main): Print it. -- The uidhash value is part of gpg's output since the year 2005. This now adds support to gpgme. The application for uidhash is to select a user id in an edit interactor: Instead of giving the number of the user id, the uidhash value can be be used to avoid tracking the user id numbers. Signed-off-by: Werner Koch <[email protected]>
* Revert "doc: Remove UI Server documentation"Andre Heinecke2019-12-113-1/+639
| | | | | | | | This reverts commit 1b2ad3b73c37d0583b8e438b4707dca60e26ae7e. -- Just removing the documentation was not the right way as this is still in use.
* gpg: Avoid error diagnostics with --override-session-key when verifyingDaniel Kahn Gillmor2019-12-061-3/+6
| | | | | | | | | | | | | | | | * src/engine-gpg.c (gpg_decrypt): only send --no-keyring when we are not verifying. -- Without this change, the signature verification would fail. This problem was introduced in bded8ebc59c7fdad2617f4c9232a58047656834c in an attempt to avoid an error when *not* verifying. Clearly more test suite coverage is needed to avoid introducing this sort of problem in the future. GnuPG-bug-id: 3464 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpgme-tool: Fix help text for INCLUDE_CERTS.Daniel Kahn Gillmor2019-12-031-1/+1
| | | | | | * src/gpgme-tool.c (hlp_include_certs): added missing newline. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* core,w32: Silence compiler warnings.Werner Koch2019-11-271-2/+3
| | | | | | | * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): Add some casts. -- Signed-off-by: Werner Koch <[email protected]>
* doc: Remove UI Server documentationAndre Heinecke2019-11-123-639/+1
| | | | | | | | | | | | | | | * doc/Makefile.am: Remove uiserver.texi * doc/gpgme.texi: Remove UI-Server mentions. * doc/uiserver.texi: Removed. -- This prepares the removal of UI Server from implementing applications like Kleopatra. The only user of the UI Server is GpgEX and even that does not need it at all and is better served with process calls. GnuPG-Bug-Id: T4030
* 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.
* python: Fix how to generate documentation.NIIBE Yutaka2019-11-061-46/+35
| | | | | | | | * lang/python/doc/Makefile.am: Explicitly write rules to generate rst and texinfo files. Fixes-commit: 36428d8cf153a33faac6a951752cdc76e23f9737 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt, tests: Add testcase for multiple remarskAndre Heinecke2019-11-041-0/+88
| | | | * lang/qt/tests/t-remarks.cpp (testMultipleRemarks): New.
* cpp: Add API to obtain mutliple remarksAndre Heinecke2019-11-043-0/+21
| | | | | | | | | | | * lang/cpp/src/key.cpp, lang/cpp/src/key.h (UserID::remarks): New. * NEWS: Mention this. -- This can be useful if we want to show remarks made by others, too. For: GnuPG-Bug-Id: T4734
* 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.
* cpp: Fix dupe_ok state for single uidAndre Heinecke2019-11-041-0/+1
| | | | | * lang/cpp/src/gpgsignkeyeditinteractor.cpp (makeTable): Add transition from command to dupe_ok
* doc: Note the need for a base tag.Werner Koch2019-11-041-3/+5
| | | | --
* qt: Allow adding empty remarksAndre Heinecke2019-11-011-1/+1
| | | | | * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Allow empty remarks.
* cpp: Minor optimization in remark lookupAndre Heinecke2019-11-011-2/+6
| | | | | | | | * lang/cpp/src/key.cpp (UserID::remark): Use C-API. -- The other parts of that function already use the C API so we can also avoid function calls for the keyListMode.
* cpp: Fix adding duplicated sigs on multiple uidsAndre Heinecke2019-11-011-0/+5
| | | | | | | | | | | | * lang/cpp/src/gpgsignkeyeditinteractor.cpp: Add another state DUPE_OK2 to allow gpg looping over all uids. -- When duplicated signatures should be added to multiple user ids GnuPG will ask for each uid so we have to add a transition for that. GnuPG-Bug-Id: T4734
* cpp: Add env var to control editinteractor debugAndre Heinecke2019-11-011-2/+17
| | | | | | | | | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::Private::Private): Read "GPGMEPP_INTERACTOR_DEBUG" env var. (EditInteractor::Private::~Private): Close debug file. -- While it was possible for the application to control the debug through setDebugChannel it is often times helpful to just debug without changing the application using GPGME
* core: Fix parsing of userid sigs after a subpkgAndre Heinecke2019-10-291-2/+3
| | | | | | | | | | * src/keylist.c (keylist_colon_handler): Do not clear out the tmp_uid when a subpacket line is encountered. -- When the uid is cleared no more signatures following the subpacket are parsed, so we now no longer clear it when a subpacket is encountered.
* 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-294-3/+61
| | | | | | | | | | | * 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