aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* cpp: Add support for multiple keysigs in editAndre Heinecke2019-10-293-1/+26
| | | | | | | | | | | | | | | | * lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::setDupeOk): New. (makeTable): Add new tansitions. (SignKeyState): Add DUPE_OK Status. (GpgSignKeyEditInteractor::action): Handle DUPE_OK. (GpgSignKeyEditInteractor::Private::Private): Carry flag. -- When extended-edit is enabled this can be used to answer the "dupe_ok" query from the edit-key with yes. This is for: GnuPG-Bug-Id: T4734
* cpp: Add convenience API to obtain remarksAndre Heinecke2019-10-292-0/+67
| | | | | | | | | | | * lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::remark): New. -- A remark made by one key on another is a signature notation on a user id certification signature with the name "[email protected]". This helps with: GnuPG-Bug-Id: T4734
* core: Add cert-notation support and extended-editAndre Heinecke2019-10-295-5/+38
| | | | | | | | | | | | | | | | | | | | | * src/context.h (gpgme_context): Add new flag for extended-edit. * src/engine-gpg.c (append_args_from_sig_notations): Add flags to control the kind of notations. (gpg_edit): Respect extended-edit and notations. (gpg_encrypt_sign, gpg_sign): Update call to append_args_from_sig_notations. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Support extended-edit. * NEWS, doc/gpgme.texi: Mention extended-edit. -- This provides a way to get the extended key-edit interface without breaking bad state machines that rely on the current command flow. A use case for this is to enable multiple local signatures, which can be used together with annotations for: GnuPG-Bug-Id: T4734
* cpp: Minor coding style fixAndre Heinecke2019-10-291-3/+2
| | | | --
* core,w32: Initialize dbg_help for socket debuggingAndre Heinecke2019-10-281-1/+1
| | | | | | | | * src/w32-io.c (_gpgme_io_select): Initialize dbg_help. -- This fixes a crash on Windows because dbg_help might be used unitialized.
* doc: Remove cruft from a doc entry.Werner Koch2019-10-011-1/+1
| | | | | | -- Reported-by: [email protected]
* json: Fix t-decrypt-verify.out for GnuPG >= 2.3.NIIBE Yutaka2019-08-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | * tests/json/t-decrypt-verify.out.json: Remove check with key of 04071FB807287134. -- GnuPG 2.3 changes how public key decryption works; It collects list of PUBKEY_ENC packets and then processes an ENCRYPTED* packet. At the stage of processing an ENCRYPTED* packet, it checks if private keys can decrypt any of PUBKEY_ENC packets. It does not necessarily examine all of PUBKEY_ENC packets. Only when it finds a PUBKEY_ENC packet cannot be decrypted, it reports STATUS_NO_SECKEY with keyid of that packet. GnuPG 2.2 or older tries PUBKEY_ENC packets in order, and the first successful PUBKEY_ENC packet is used. Rest of PUBKEY_ENC packets are not examined, but STATUS_NO_SECKEY with keyid is reported even when there is a valid private key. Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Fix arg counting in enginge-gpgAndre Heinecke2019-07-161-4/+26
| | | | | | | | | | | | | | | | * src/engine-gpg.c (build_argv): Properly check for all arguments and allocate memory for them. -- This fixes a potential buffer overflow which could be created by using unusual and partially contradictory options. Like offline and auto-key-locate together while using ignore-mdc-error. As the list of arguments should not be user controlled the impact of this is very low. To ensure that this does not happen in the future an assert is also added with this patch.
* python: doc: Remove generated files, put rules in Makefile.NIIBE Yutaka2019-07-1213-8017/+39
| | | | | | | | | | | * lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not distributed like files under meta. * Add rules to generate .rst and .texi files. * lang/python/doc/rst: Remove .rst files to be generated. * lang/python/doc/texinfo: Remove .texi files to be generated. GnuPG-bug-id: 4275 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: doc: Add suffix for org files.NIIBE Yutaka2019-07-126-0/+0
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* js: improve connection checkMaximilian Krambach2019-07-032-25/+47
| | | | | | | | | -- * Connection.js: In some cases, the browser disconnect does not happen inmediately (e.g. wrong extension for the app). I added a delay of 25 ms to see if the connection was closed by the browser. Also, I tried to make the checkConnection more readable.
* js: Error handling for browser errorsMaximilian Krambach2019-06-194-27/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | -- * Connection.js - Add some meaningful nativeMessaging feedback for failing communication due to misconfiguration or other browser-originated fails - add an "isDisconnected" property - "isNativeHostUnknown" tries to match browser's feedback string if the browser does not find gpgme-json * init.js - initialization will now reject with a more meaningful error if the configuration is not set up or other browser-based errors (chrome.runtime.lastError) are present. This should speed up the normal initialization (not having to waiting for a timeout any more in case of improper setup) * errors.js - CONN_NATIVEMESSAGE: New error that passes the browser's nativeMessaging error - CONN_NO_CONFIG: native messaging error indicating that the nativeMessaging host was not set up properly * unittests.js: - added the "isDisconnected" property to the startup tests - added tests for proper behavior of connection checks
* Post release updatesgpgme-1.14-baseWerner Koch2019-06-132-2/+10
| | | | --
* Release 1.13.1gpgme-1.13.1Werner Koch2019-06-132-21/+21
| | | | | | | * configure.ac: Bump LT versions to c=C33/A22/R1 cpp=C16/A10/R0 qt=C10/A3/R4. Signed-off-by: Werner Koch <[email protected]>
* python: Fix regression in t-decrypt-verify test.Werner Koch2019-06-131-11/+11
| | | | | | | | * lang/python/tests/t-decrypt-verify.py: Comment recent changes. -- Fixes-commit: bd2d282e572b5d02669238c9e087259b85638477 GnuPG-bug-id: 4276
* python: Set a default-key into gpg.conf for the tests.Werner Koch2019-06-131-2/+1
| | | | | | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am (gpg.conf): Set a default key. -- It seems we need to set a default key because at least t-sign.py does not specify the key to use and we do not want to rely on the order of keys in the keyring. Also Fixes-commit: f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 gpg 2.0 is end-of-life and we don't need these extra options anymore. In fact they for the use of some gpg version and don't use the version gpgconf knows about. This also aligns the python tests to what we use for the C test suite. Signed-off-by: Werner Koch <[email protected]>
* core: At debug levels up to 9 print only an ascii dump.Werner Koch2019-06-131-27/+59
| | | | | | | | | | | | * src/debug.c (_gpgme_debug_buffer): Switch between two output formats. -- The new format is much more practical than the bunch of hex digits followed by just 16 ascii chars. To get the old behaviour use a debug level of 10. Signed-off-by: Werner Koch <[email protected]>
* tests: Minor fix to run-threaded.c.Werner Koch2019-06-061-1/+5
| | | | | | | | | | * tests/run-threaded.c (random_data_close): Correct FD test. -- An invalid DS is -1 and not 0; this fix is for correctness and does not chnage anything in the real world. Signed-off-by: Werner Koch <[email protected]>