aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: Tweak STATUS_FAILURE handling.gpgme-1.10-branchWerner Koch2018-04-131-1/+9
| | | | | | | | * src/op-support.c (_gpgme_parse_failure): Ignore failures with location "gpg-exit". -- Signed-off-by: Werner Koch <[email protected]>
* Post release updates.Werner Koch2017-12-122-1/+4
| | | | --
* Release 1.10.0.gpgme-1.10.0Werner Koch2017-12-124-34/+47
| | | | Signed-off-by: Werner Koch <[email protected]>
* Require libgpg-error 1.24 and libassuan 2.4.2Werner Koch2017-12-122-6/+2
| | | | | | | | | | | * src/util.h (GPG_ERR_FALSE): Remove due to newer libgpg-error. -- We require these over one year old versions to better allign with GnuPG's demand. Note that the required libassuan is acgtually 2 years old. Signed-off-by: Werner Koch <[email protected]>
* qt: Don't use QDateTime::toSecsSinceEpochAndre Heinecke2017-12-111-2/+2
| | | | | | | | * lang/qt/src/qgpgmequickjob.cpp (addSubkeyWorker) (createWorker): Use toMSecsSinceEpoch instead toSecsSinceEpoch. -- toSecsSinceEpoch was only introduced in Qt 5.8.
* core,w32: Fix popping up of console windows due to gpgconf.Werner Koch2017-12-111-1/+0
| | | | | | | | | | | | | | * src/gpgme-w32spawn.c (my_spawn): Create w/o DETACHED_PROCESS. -- The spawn helper is actually called with DETACHED_PROCESS and should not need to do a DETACHED_PROCESS of its own. Interestingly this patch removes the popups. See Andre's report GnuPG-bug-id: 3515 Signed-off-by: Werner Koch <[email protected]>
* Spelling fixes for comments and docAndre Heinecke2017-12-0815-34/+34
| | | | | | | -- Patch provided by ka7 in dev.gnupg.org Differential D423
* cpp: Fix handling of lsig promotionAndre Heinecke2017-12-071-0/+4
| | | | | | | | | | | | * src/gpgsignkeyeditinteractor.cpp (SignKeyState): Add second CONFIRM state. (makeTable): Properly handle local_promote_okay. (action): Handle CONFIRM2. -- This fixes changing a local signature to a "public" signature. GnuPG-Bug-Id: T1649
* tests: Print userid signatures in run-keylistAndre Heinecke2017-12-071-0/+10
| | | | | * tests/run-keylist.c (main): Print UID signatures if there are any.
* core: Also check for a failed selftest in gpgm_data_new.Werner Koch2017-12-045-30/+28
| | | | | | | | | | | | | | | | | | | | | | | * src/data.c (_gpgme_data_new): Check for failed selftest. * tests/run-support.h (make_filename): Print a message on mallooc failure. (init_gpgme_basic): New. * tests/run-identify.c (main): Call init_gpgme_basic becuase we do not need to setup a protocol. * tests/t-data.c: Define PGM and include run-support.h. (make_filename): Remove. (main): Call init_gpgme_basic. -- Note: This patch may break applications which used gpgme_data but no gpgme_new without having called the required gpgme_check_version. GPGME can be used without a protocol for example to work with the data object abstraction. Thus a call to gpgme_data_new also needs to check the result of the core selftests - including on whether gpgme_check_version has been called. Signed-off-by: Werner Koch <[email protected]>
* python: Default whence argument for Data() to SEEK_SET.Tobias Mueller2017-12-042-0/+11
| | | | | | | | | | | | | | * lang/python/gpgme.i: copied signature from gpgme.h and defaulted the value to SEEK_SET. * lang/python/tests/t-data.py: Added a test for no second argument -- Having to import the os package when wanting to read a Data object is a slight annoyance. With SWIG, we can define default parameters. This change defaults the whence argument to SEEK_SET which is how StringIO and BytesIO behave. Signed-off-by: Tobias Mueller <[email protected]>
* Register DCO for Tobias MuellerWerner Koch2017-12-031-0/+2
| | | | --
* qt: Add job for quick commandsAndre Heinecke2017-12-018-2/+316
| | | | | | | | | | | | | | | * lang/qt/src/qgpgmequickjob.cpp, lang/qt/src/qgpgmequickjob.h, lang/qt/src/quickjob.h: New. * lang/qt/src/Makefile.am, lang/qt/src/protocol.h, lang/qt/src/protocol_p.h, lang/qt/src/job.cpp: Update accordingly. -- Keeping it in line with the Job for everything pattern. Although it's reduced to one job for four commands as the commands all behave the same.
* cpp: Wrap create_key and create_subkeyAndre Heinecke2017-12-013-0/+80
| | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::startCreateKey) (Context::createKey, Context::createSubkey) (Context::startCreateSubkey): New.
* Fix uid parsing for ldap keyserverAndre Heinecke2017-12-011-3/+14
| | | | | | | | | | | * src/engine-gpg.c (gpg_keylist_preprocess): Check field count for uid and add fallback. -- This fixes accessing unintialized memory and resulting crashes in gpgrt_asprintf. GnuPG-Bug-Id: T3550
* tests: Add missing variable to gpgsm tests MakefileWerner Koch2017-11-301-0/+1
| | | | | | | | | | * tests/gpgsm/Makefile.am (GPG_AGENT): Set var. It is used later. -- Note that the var is used by the gpgsm.conf target. Reported-by: Alon Bar-Lev <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* tests: Make portability fix.NIIBE Yutaka2017-11-213-12/+12
| | | | | | | | | | | | | | * lang/python/tests/Makefile.am: Distinguish target and path. * tests/gpg/Makefile.am: Ditto. * tests/gpgsm/Makefile.am: Ditto. -- GNU Make is powerful enough to match path to target (and vice versa), but BSD make is not. GnuPG-bug-id: 3056 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Fix IODeviceDataProvider with ProcessAndre Heinecke2017-11-141-1/+5
| | | | | | | | | * lang/qt/src/dataprovider.cpp (blocking_read): Keep reading if process is not atEnd. -- This fixes a regression in Kleopatra that uses this dataprovider to chain the gpgtar process to the encryption / signing.
* core: use getdents64 syscall on linux instead of getdents.Daniel Kahn Gillmor2017-10-121-7/+8
| | | | | | | | | | | | * src/posix-io.c (get_max_fds): use getdents64 instead of getdents. -- getdents64 was introduced in linux 2.4, so it should be widely available. some Linux architectures which post-date 2.4 (e.g. arm64) appear to not have getdents at all, so it's probably better to use the more modern interface. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* core: Allow disabling the use of SYS_getdents for Linux.Werner Koch2017-10-042-6/+29
| | | | | | | | * configure.ac (USE_LINUX_GETDENTS): New ac_define. Add option --disable-linux-getdents. * src/posix-io.c: Make use of USE_LINUX_GETDENTS. Signed-off-by: Werner Koch <[email protected]>
* core: Restore get_max_fds optimization on LinuxColin Watson2017-10-041-33/+66
| | | | | | | | | | | | | | | | | * src/posix-io.c (get_max_fds): Restore Linux optimization, this time using open/getdents/close rather than opendir/readdir/closedir. -- opendir/readdir/closedir may allocate/free memory, and aren't required to do so in an async-signal-safe way. On the other hand, opening /proc/self/fd directly and iterating over it using getdents is safe. (getdents is not strictly speaking documented to be async-signal-safe because it's not in POSIX. However, the Linux implementation is essentially just a souped-up read. Python >= 3.2.3 makes the same assumption.) Signed-off-by: Colin Watson <[email protected]>
* Register DCO for Colin Watson.Werner Koch2017-10-041-0/+2
| | | | --
* qt: Add test for version infoAndre Heinecke2017-09-041-0/+13
| | | | | | | * lang/qt/tests/t-various.cpp (TestVarious::testVersion): New. -- If it's not tested it does not work ;-)
* cpp: Fix version info comparisonAndre Heinecke2017-09-042-9/+19
| | | | | | | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version::operator<): Fix logic. * lang/cpp/src/engineinfo.h (EngineInfo::Version::operator>): New. * NEWS: Mention added API -- This fixes a logic error that 2.2.0 < 2.1.19 would return true.
* core: New context flag "auto-key-retrieve"Werner Koch2017-08-2413-9/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "auto-key-retrieve". * src/context.h (gpgme_context): New field auto_key_retrieve. * src/engine-backend.h (struct engine_ops): Add arg auto_key_retrieve to field 'decrypt'. * src/engine-gpg.c (gpg_decrypt): Add arg auto_key_retrieve and pass option --auto-key-retrieve to gpg. Adjust all callers. (gpg_verify): Ditto. * src/engine-gpgsm.c (gpgsm_decrypt): Add dummy arg auto_key_retrieve. * src/engine-uiserver.c (uiserver_decrypt): Ditto. * tests/run-verify.c (main): Add option --auto-key-retrieve. -- This makes the --auto-key-retrieve option available in the GPGME API. Test plan: Run GPGME_DEBUG=9:out tests/run-verify SIGNEDFILE with and without its new option --auto-key-retrieve and check in the trace stored in "out" whether --auto-key-retrieve was passed to gpg. Signed-off-by: Werner Koch <[email protected]>
* Set next version to 1.10.0Werner Koch2017-08-243-17/+17
| | | | --
* core: New public enum gpgme_keyorg_t.Werner Koch2017-08-242-3/+37
| | | | | | | | | | | | * src/gpgme.h.in (gpgme_keyorg_t): New. * src/keylist.c (parse_keyorg): New. (keylist_colon_handler): Set key->ORIGIN. -- This finally set the key origin value form data supplied by recent gpg versions. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Add more comments.Marcus Brinkmann2017-08-241-1/+7
| | | | | | | | * src/engine-gpgconf.c (gpgconf_config_dir_cb, gpgconf_conf_dir): Add comments. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3018
* Fix a couple of bugs pointed out by clang compiler warnings.Marcus Brinkmann2017-08-232-2/+2
| | | | | | | * src/engine-gpgconf.c (gpgconf_config_dir_cb): Fix cast. * src/key.c (_gpgme_key_add_sig): Fix pointer reference. Signed-off-by: Marcus Brinkmann <[email protected]>
* python: Support parallel build in testsAlon Bar-Lev2017-08-211-1/+1
| | | | | | | * lang/python/tests/Makefile.am: Depend xcheck with all which was lost due to the check hack. Signed-off-by: Alon Bar-Lev <[email protected]>
* python: Improve keylist test.Justus Winter2017-08-211-0/+3
| | | | | | * lang/python/tests/t-keylist.py: Check a keylist matching no keys. Signed-off-by: Justus Winter <[email protected]>
* doc: Add version information.Marcus Brinkmann2017-08-161-1/+320
| | | | | | | | * doc/gpgme.texi (since): New macro. Use it to add version information to those APIs that are mentioned in the NEWS file. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3137
* doc: Clarify import keys operation further.Marcus Brinkmann2017-08-161-2/+8
| | | | | | | * doc/gpgme.texi (gpgme_op_import_keys): Further clarifications. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3215
* gpgconf: Fix some warnings.Marcus Brinkmann2017-08-152-23/+32
| | | | | | | | * tests/gpg/t-gpgconf.c (main): Fix warnings. * src/engine-gpgconf.c (struct gpgconf_config_dir_s): New struct. (gpgconf_config_dir_cb, gpgconf_conf_dir) Use it to fix warning. Signed-off-by: Marcus Brinkmann <[email protected]>
* gpgconf: Fix symbol export.Marcus Brinkmann2017-08-151-1/+1
| | | | | | | | | * gpgme.def: Fix last change. (gpgme_op_conf_save): Replace duplicate from c&p ... (gpgme_op_conf_dir): ... with this. Signed-off-by: Marcus Brinkmann <[email protected]> Fixes-commit: 9cd2b58dfb2c21cce64520cf4c726859b583d14e
* NEWS: Add missing entry.Marcus Brinkmann2017-08-151-0/+1
|
* gpgconf: Add access to --list-dirs for non-default engine.Marcus Brinkmann2017-08-1515-0/+111
| | | | | | | | | | | | | | | | | | | | | | | * src/engine-assuan.c (_gpgme_engine_ops_assuan): Add conf_dir. * src/engine-g13.c (_gpgme_engine_ops_g13): Likewise. * src/engine-gpg.c (_gpgme_engine_ops_gpg): Likewise. * src/engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Likewise. * src/engine-spawn.c (_gpgme_engine_ops_spawn): Likewise. * src/engine-uiserver.c (_gpgme_engine_ops_uiserver): Likewise. * src/engine-backend.h (struct engine_ops): Likewise. * src/engine-gpgconf.c (gpgconf_config_dir_cb, gpgconf_conf_dir): New functions. (struct engine_ops): Add gpgconf_conf_dir. * src/engine.c (_gpgme_engine_op_conf_dir): New function. * src/engine.h (_gpgme_engine_op_conf_dir): New prototype. * src/gpgconf.c (gpgme_op_conf_dir): New function. * src/gpgme.def (gpgme_op_conf_save): New symbol. * src/gpgme.h.in (gpgme_op_conf_dir): New prototype. * src/libgpgme.vers (gpgme_op_conf_dir): New symbol. * tests/gpg/t-gpgconf.c (main): Test gpgme_op_conf_dir. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3018
* g10: Add new delete operations that allow more flags.Marcus Brinkmann2017-08-1111-22/+110
| | | | | | | | | | | | | | | | | | | * NEWS: Document new interfaces. * doc/gpgme.texi: Document new interfaces. * src/gpgme.h.in (GPGME_DELETE_ALLOW_SECRET, GPGME_DELETE_FORCE, gpgme_op_delete_ext_start, gpgme_op_delete_ext): New. * src/delete.c (delete_start): Change allow_secret argument to flags. (gpgme_op_delete_ext, gpgme_op_delete_ext_start): New functions. * src/engine-backend.h (delete): Change allow_secret argument to flags. * src/engine.c (_gpgme_engine_op_delete): Likewise. * src/engine.h (_gpgme_engine_op_delete): Likewise (for prototype). * src/engine-gpgsm.c (gpgsm_delete): Likewise. * src/engine-gpg.c (gpg_delete): Likewise. Implement GPGME_DELETE_FORCE. * src/gpgme.def (gpgme_op_delete_ext, gpgme_op_delete_ext_start): New. * src/libgpgme.vers (gpgme_op_delete_ext, gpgme_op_delete_ext_start): New. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 2916
* doc: Clarify import keys operation.Marcus Brinkmann2017-08-102-22/+19
| | | | | | | | | * doc/gpgme.texi (gpgme_op_import_start): Fix grammar. (gpgme_op_import_keys): Clarify some wording and fix result. * src/import.c (gpgme_op_import_keys): Clarify comment. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 3215
* doc: Add more tofu documentation.Marcus Brinkmann2017-08-101-0/+72
| | | | | | | | * doc/gpgme.texi (gpgme_tofu_info_t): Document structure. (gpgme_sigsum_t): Document GPGME_SIGSUM_TOFU_CONFLICT. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 2816
* core: Fix status parsing for decrypt + verifyAndre Heinecke2017-07-271-3/+15
| | | | | | | | | | * src/decrypt.c (parse_status_error): Don't modify args. -- Otherwise chained status handlers will not see the full args which resulted in a parse error in the verify status handler. GnuPG-Bug-Id: T3310
* cpp: Fix Key::isDeVs for subkeysAndre Heinecke2017-07-261-1/+12
| | | | | | | * lang/cpp/src/key.cpp (Key::isDeVs): Check all subkeys. -- Previosly only the primary key was checked and not all subkeys.
* tests: Fix distcheck.Justus Winter2017-07-131-0/+1
| | | | | | | * tests/start-stop-agent: Remove backup file. Fixes-commit: 9cd2b58dfb2c21cce64520cf4c726859b583d14e Signed-off-by: Justus Winter <[email protected]>
* tests: Fix blunder.Justus Winter2017-07-131-1/+1
| | | | | | -- Fixes-commit: 9cd2b58dfb2c21cce64520cf4c726859b583d14e Signed-off-by: Justus Winter <[email protected]>
* tests: Make agent spawning more robust.Justus Winter2017-07-132-0/+13
| | | | | | | | | | | | * tests/gpgsm/Makefile.am (gpgsm.conf): Add agent-program directive. * tests/start-stop-agent: Update agent-program directive. -- Update the 'agent-program' configuration directive to point to the same agent that we are starting. Previously, it was possible that a different agent was started if 'make check' was run with a different PATH. Signed-off-by: Justus Winter <[email protected]>
* Sync 'autogen.sh'.Justus Winter2017-07-131-20/+116
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* tests: Fix printf compiler warning for an error case.Werner Koch2017-07-121-1/+1
| | | | | | * tests/gpg/t-keylist.c (main): Cast DIM to int. Signed-off-by: Werner Koch <[email protected]>
* core: Return NO_SECKEY error code on decryptionWerner Koch2017-07-122-3/+12
| | | | | | | | | | | | | | | * src/decrypt.c (op_data_t): Add flag any_no_seckey. (_gpgme_decrypt_status_handler): Consult that flag. (_gpgme_decrypt_status_handler): Set that flag. -- The NO_SECKEY is emitted instead of an "S ERROR pkdecrypt_failed" if gpg knowns that a key has been encrypted to that key (cf. "S ENC_TO"). it is not fool proffof but in the majority of cases we can provide a better error message than just DECRYPTION_FAILED. GnuPG-bug-id: 3270 Signed-off-by: Werner Koch <[email protected]>
* core: Return CANCELED and BAD_PASSPHRASE error code on decryption.Werner Koch2017-07-121-1/+32
| | | | | | | | | | | | | * src/decrypt.c (op_data_t): Add field pkdecrypt_failed. (_gpgme_decrypt_status_handler): Consult new field. (parse_status_error): Handle some error codes. -- The idea is to return only a limited set of error codes because a user won't be able to understand the more esoteric codes. GnuPG-bug-id: 3270 Signed-off-by: Werner Koch <[email protected]>
* core: Simplify parsing of STATUS_ERROR in decrypt.cWerner Koch2017-07-122-42/+40
| | | | | | | | * src/decrypt.c (_gpgme_decrypt_status_handler): Factor some code out to ... (parse_status_error): new. Modernize parsing. Signed-off-by: Werner Koch <[email protected]>