aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: Implement SYSROOT feature.origin/bjk/masterWerner Koch2014-10-024-17/+116
| | | | | | * configure.ac: Document SYSROOT. * m4/gpg-error.m4: Update from libgpg-error master. * src/gpgme.m4: Implement SYSROOT stuff.
* Use --no-sk-comments, not --no-sk-comment.Daniel Kahn Gillmor2014-10-021-2/+2
| | | | | | | -- The --no-sk-comments flag is (or should be) a no-op in modern versions of gnupg, but gpgme should still use its full form rather than the (slightly) abbreviated --no-sk-comment
* Register DCO for Daniel Kahn Gillmor.Werner Koch2014-09-241-1/+9
| | | | --
* Add ftp and git URLs to AUTHORS.Werner Koch2014-09-241-0/+2
| | | | --
* tests: Delay some test file extraction until "make check".Werner Koch2014-09-242-2/+3
| | | | | * tests/gpg/Makefile.am (all-local): Change to check-local. * tests/gpgsm/Makefile.am (all-local): Ditto.
* Clean up gpgme's tests/gpg when gpg2.1 is availableDaniel Kahn Gillmor2014-09-242-1/+2
| | | | | | | * tests/gpg/Makefile.am: Clean up .gpg-v21-migrated -- We also need to gitignore this file.
* gpgme-tool: Print fingerprint and keyid with keyservers.Werner Koch2014-08-121-1/+3
| | | | | * src/gpgme-tool.c (cmd_keylist): Print keyid. Print FPR only if available.
* Handle modern keyserver output which may emit the fingerprint.Werner Koch2014-08-121-9/+44
| | | | | * src/engine-gpg.c (read_colon_line): Split preprocessed lines. (gpg_keylist_preprocess): Limit keyid field and print fingerprint.
* gpgme-tool: Install gpgme-tool.Werner Koch2014-08-122-4/+8
| | | | | * src/Makefile.am (bin_PROGRAMS): New. Add gpgme-tools. (noinst_PROGRAMS): Remove.
* gpgme-tool: Fix segv for external key listing.Werner Koch2014-08-121-7/+10
| | | | * src/gpgme-tool.c (result_xml_escape): Allow for DATA being NULL.
* Post release updates.Werner Koch2014-07-302-1/+5
| | | | --
* Release 1.5.1gpgme-1.5.1Werner Koch2014-07-302-6/+6
| | | | * configure.ac: Change LT version to C24/A13/R0.
* Fix possible realloc overflow for gpgsm and uiserver engines.Werner Koch2014-07-303-2/+5
| | | | | | | | | | | | | | | | * src/engine-gpgsm.c (status_handler): * src/engine-uiserver.c (status_handler): -- After a realloc (realloc is also used for initial alloc) the allocated size if the buffer is not correctly recorded. Thus an overflow can be introduced by receiving data with different line lengths in a specific order. This is not easy exploitable because libassuan constructs the line. However a crash has been reported and thus it might be possible to constructs an exploit. CVE-id: CVE-2014-3564 Reported-by: Tomáš Trnka
* w32: Get IOSPAWN flag back in sync with spawn helper.Werner Koch2014-06-262-18/+8
| | | | * src/gpgme-w32spawn.c: Include priv-io.h.
* w32: Add comment about a compiler warningWerner Koch2014-06-261-0/+6
| | | | --
* Add new reason codes to the INV_RECP status code.Werner Koch2014-06-101-0/+8
| | | | * src/op-support.c (_gpgme_parse_inv_recp): Add codes 13 and 14.
* Add new keylist mode GPGME_KEYLIST_MODE_WITH_SECRET.Werner Koch2014-06-047-13/+64
| | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_SECRET): New. * src/engine-gpg.c (gpg_keylist_build_options): Handle new mode. * src/engine-gpgsm.c (gpgsm_keylist, gpgsm_keylist_ext): Ditto. * src/keylist.c (parse_sec_field15): Add arg key and take care of --with-secret output. * src/gpgme-tool.c (gt_get_keylist_mode, cmd_keylist_mode): Add "with_secret". Print card info and and secret flag for subkeys. -- Note: This mode may only be used with GnuPG >= 2.1.
* Post release updatesWerner Koch2014-05-212-1/+5
| | | | --
* Release 1.5.0.gpgme-1.5.0Werner Koch2014-05-213-23/+25
| | | | * configure.ac: Change LT version to C22/A11/R0.
* Add 6 new GPGME_STATUS_ codes.Werner Koch2014-05-133-18/+37
| | | | * src/status-table.c: Also add missing DECRYPTION_INFO entry.
* Add field CURVE to the key info.Werner Koch2014-05-086-1/+31
| | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_subkey): Add field CURVE. * src/key.c (gpgme_key_unref): Free CURVE. * src/keylist.c (keylist_colon_handler): Set CURVE. * src/gpgme.c (gpgme_release): For failsafe reasons reset engine and engine info after freeing. -- The engine hack is useful in case the other release functions accidently call engine release.
* Fix a memory access and a double slash bug.Werner Koch2014-05-082-2/+2
| | | | | | | | | | | | | | | | | * src/engine-spawn.c (engspawn_start): Allocate space for list terminator. * src/posix-util.c (walk_path): Fix trailing slash detection. -- Kudos to Valgrind for pointing out these two problems. The first is a plain allocation bug in a code pattern I have written thousands of times - this time it went wrong. The allocation is not user controlled thus not directly exploitable. The second is missed to do what it intended to do. Found due to the access of malloced but not initialized memory. Not using calloc again proved to be helpful to detect logical error.
* Map public key algos returned by gpg to gpgme values.Werner Koch2014-05-0810-23/+60
| | | | | | | | | | | | | | | | | | | * src/conversion.c (_gpgme_map_pk_algo): New. * src/decrypt.c (parse_enc_to): Add arg PROTOCOL and map pubkey algo. (_gpgme_decrypt_status_handler): Map pubkey algo. * src/keylist.c (keylist_colon_handler): Map pubkey algo. * src/sign.c (parse_sig_created): Add arg PROTOCOL and map pubkey algo. * src/verify.c (parse_new_sig): Ditto. (parse_valid_sig): Ditto. * src/gpgme.h.in (GPGME_PK_ECC): New. (GPGME_MD_SHA224): New. * src/gpgme.c (gpgme_pubkey_algo_name): Add GPGME_PK_ECC case. (gpgme_hash_algo_name): Add GPGME_MD_SHA224. -- This affects only the not yet released ECC code of GnuPG 2.1.
* Add GPGME_ENCRYPT_NO_COMPRESS flag.Werner Koch2014-05-085-3/+30
| | | | | | * src/gpgme.h.in (GPGME_ENCRYPT_NO_COMPRESS): New. * src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign): Implement it. * src/gpgme-tool.c (_cmd_sign_encrypt): Add option --no-compress.
* w32: Fix another memleak on error.Werner Koch2014-04-162-0/+5
| | | | | | | * src/w32-io.c (create_reader): free CTX. -- Found by Hans-Christoph Steiner with cppcheck.
* w32: Fix memleak in an error code paths.Werner Koch2014-04-152-1/+5
| | | | | | | | | * src/w32-io.c (create_writer): Free CTX in cased of bad FD. * src/w32-util.c (_gpgme_mkstemp): Free TMPNAME in case of a failed mkstemp. -- Found by Hans-Christoph Steiner with cppcheck.
* Fix possible zombie processes.Werner Koch2014-04-151-3/+14
| | | | | | | | | * src/posix-io.c (_gpgme_io_waitpid): Protect waitpid agains EINTR. (_gpgme_io_dup): Likewise. (_gpgme_io_connect): Likewise. -- GnuPG-bug-id: 1630
* Actually implement flags for gpgme_op_spawn.Werner Koch2014-04-106-14/+26
| | | | | | | * src/spawn.c (gpgme_op_spawn_start, gpgme_op_spawn): Pass FLAGS dow to spawn_start and add FLAGS args along the call path. * src/engine-spawn.c (engspawn_start): Hack to automagically provide argv[0].
* Add GPGME_PROTOCOL_SPAWN and gpgme_op_spawn.Werner Koch2014-04-1019-19/+804
| | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_PROTOCOL_SPAWN): New. (GPGME_SPAWN_DETACHED, GPGME_SPAWN_ALLOW_SET_FG): New. * src/gpgme.c (gpgme_set_protocol): Add new protocol. (gpgme_get_protocol_name): Ditto. * src/spawn.c: New. * src/libgpgme.vers, src/gpgme.def: Add new public functions. * src/engine-spawn.c: New. * src/Makefile.am: Add new files. * src/engine-backend.h (struct engine_ops): Add OPSPAWN. * src/engine.c (engine_ops): Add _gpgme_engine_ops_spawn. (gpgme_get_engine_info): Add Spawn to the list of protocols. (_gpgme_engine_op_spawn): New. * src/gpgme-tool.c (gt_protocol_from_name): Add new protocol. (gt_spawn, cmd_spawn): New.
* Add gpgme_get_dirinfo.Werner Koch2014-04-107-4/+89
| | | | | * src/dirinfo.c (gpgme_get_dirinfo): New. * tests/t-engine-info.c (main): Print results from that function.
* Remove compiler warning from testWerner Koch2014-04-101-12/+9
| | | | --
* Make use of internal iospawn flags more flexible.Werner Koch2014-04-1010-35/+43
| | | | | | | | | | | | | * src/priv-io.h (IOSPAWN_FLAG_DETACHED): New. Renumber the others. * src/w32-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS process only if IOSPAWN_FLAG_DETACHED is given. * src/w32-qt-io.cpp (_gpgme_io_spawn): Ditto. * src/w32-glib-io.c (_gpgme_io_spawn): Ditto. * src/assuan-support.c (my_spawn): Pass IOSPAWN_FLAG_DETACHED flags. * src/dirinfo.c (read_gpgconf_dirs): Ditto. * src/engine-gpg.c (start): Ditto. * src/engine-gpgconf.c (gpgconf_read, gpgconf_write): Ditto. * src/version.c (_gpgme_get_program_version): Ditto.
* Make sure a spawned process has all standard fds connected.Werner Koch2014-04-101-33/+18
| | | | | | | | | | | * src/posix-io.c (_gpgme_io_spawn): dup /dev/null also to unsued stdout. -- Better be sure that stdout of a spawned process is connected to stdout so that the process does not run into a write error if it writes to stdout. AFAICS we always use a connected stdout; thus this is only for correctness.
* Add configure option --enable-fixed-path.Werner Koch2014-03-132-1/+16
| | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add option --enable-fixed-path. (FIXED_SEARCH_PATH): New ac_define. * src/posix-util.c (walk_path): Make use of the option. Remove current directory from fallback PATH. -- Note that using this option PATH is entirely ignored by GPGME and only the given value is used instead to locate the GnuPG binaries. On Android the use of PATH is not desirable. Instead the GnuPG tools are expected in a fixed directory. By using ./configure --enable-fixed-path="/foo/bar" gpg et al are expected to be installed as /foo/bar/gpg. With ./configure --enable-fixed-path="/foo/bar:/bin" gpg is expected as /foo/bar/gpg or /bin/gpg.
* Avoid pointer arithmetic on void pointer.Werner Koch2014-03-111-1/+2
| | | | | | | * src/gpgme.c (gpgme_io_writen): Use new var buffer. -- Reported-by: Albert Chin
* Change implementation return type to match the definition.Werner Koch2014-03-111-1/+1
| | | | | | | | | | * src/gpgme.c (gpgme_get_sub_protocol): Change return type to gpgme_protocol_t. -- Yet another enum/int mismatch. Reported-by: Albert Chin.
* doc: Fix documentation of struct data typesDaiki Ueno2014-03-051-11/+17
| | | | | | | | | | | * gpgme.texi (Key Management): Document is_cardkey and card_number members of gpgme_subkey_t. (Decrypt): Remove description of the non-existent wrong_key_usage member of gpgme_recipient_t. (Verify): Document pka_address member of gpgme_signature_t. (Creating a Signature): Add missing member names in gpgme_new_signature_t. (Registering I/O Callbacks): Fix reference of gpgme_io_cbs struct.
* Always pass correct name to argv[0]. Ignore GPG_AGENT_INFO for gpg2.Werner Koch2014-02-215-31/+72
| | | | | | | | | | | | | | | * src/dirinfo.c (WANT_GPG_ONE_MODE): New. (struct dirinfo): Add field "gpg_one_mode". (get_gpgconf_item): Set that field and return it if requested. (_gpgme_in_gpg_one_mode): New. * src/engine-gpg.c (build_argv): Check GPG_AGENT_INFO only in gpg-1 mode. * src/dirinfo.c (_gpgme_get_basename): New. * src/engine-g13.c (g13_new): Take argv[0] from the pgmname. * src/engine-gpgsm.c (gpgsm_new): Ditto. * src/engine-gpg.c (build_argv): Ditto. Add arg PGMNAME. (start): Pass PGMNAME to buildargv.
* Fix type inconsistency between gpgme.h and gpgme.c.Werner Koch2014-02-121-1/+1
| | | | | | | * src/gpgme.c (gpgme_set_pinentry_mode): Fix type of MODE. -- GnuPG-bug-id: 1617
* Use the generic autogen.sh script.Werner Koch2014-01-104-83/+208
| | | | | | | | * autogen.rc: New. * Makefile.am (EXTRA_DIST): Add it. * autogen.sh: Update from GnuPG. * configure.ac (AM_SILENT_RULES): New.
* Set next version to 1.5.0Werner Koch2014-01-071-2/+2
| | | | --
* Make gpgconf engine work again - fixes 02ba35c1.Werner Koch2014-01-072-32/+13
| | | | | | | | * src/gpgconf.c: Remove ENABLE_GPGCONF and move prototypes to ... * src/engine-backend.h: ... here. -- gpgconf is a required part for gpgme.
* Make gpgme_new return a proper error if no engines are installed.Werner Koch2014-01-072-15/+34
| | | | | | * src/engine.c (gpgme_get_engine_info): Improve error handling. (_gpgme_engine_info_copy): Ditto. * src/gpgme.c (gpgme_new): Return error GPG_ERR_NO_ENGINE.
* Print the full PATH in the log if gpg was not found.Werner Koch2014-01-071-6/+7
| | | | * src/posix-util.c (walk_path): Keep a copy of PATH.
* Add global flags disable-gpgconf, gpgconf-name, and gpg-name.Werner Koch2014-01-068-31/+269
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.c (gpgme_set_global_flag): Add names "disable-gpgconf", "gpgconf-name", and "gpg-name". * src/dirinfo.c (_gpgme_dirinfo_disable_gpgconf): New. (get_gpgconf_item): Minor debug info change. * src/posix-util.c (default_gpg_name, default_gpgconf_name): Add vars. (_gpgme_set_default_gpg_name): New. (_gpgme_set_default_gpgconf_name): New. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use new vars. (walk_path): Add debug output on failure. * src/w32-util.c (default_gpg_name, default_gpgconf_name): Add vars. (replace_slashes): New. (get_basename): New. (_gpgme_set_default_gpg_name): New. (_gpgme_set_default_gpgconf_name): New. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use new vars. * tests/t-engine-info.c (main): Add --verbose and --set-global-flag options. -- Note that the Windows part has not been tested.
* Locate engine names only at runtime and prefer GnuPG-2.Werner Koch2013-12-2718-703/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (NEED_GPG_VERSION, NEED_GPGSM_VERSION) (NEED_G13_VERSION, NEED_GPGCONF_VERSION): Remove vars and all related checks. Do not check for any engine version. (HAVE_ASSUAN): Remove AM conditional. * src/Makefile.am: Remove separate component vars and always build all engines but uiserver. * src/dirinfo.c (WANT_GPGCONF_NAME): New. (struct dirinfo): Add field gpgconf_name. (_gpgme_get_default_gpgconf_name): Use WANT_GPGCONF_NAME. (get_gpgconf_item): Set gpgconf name and adjust for _gpgme_get_*_path now returning a malloced string. * src/engine.c (engine_ops): Always init all engines except for uiserver. * src/posix-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path): Remove unused functions. (walk_path): New. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path ): Re-implement using walk_path. * src/w32-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path): Remove unused functions. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Return a malloced string. * src/engine-g13.c (g13_get_req_version): Use a hardwired string with the required version. This info belongs into this file. * src/engine-gpg.c (gpg_get_req_version): Ditto. * src/engine-gpgconf.c (gpgconf_get_req_version): Ditto. * src/engine-gpgsm.c (gpgsm_get_req_version): Ditto. * tests/t-engine-info.c: Replace now useless test by an info output. * tests/gpg/Makefile.am (GPG, GPG_AGENT): Hardwire gpg and gpg-agent. * tests/gpgsm/Makefile.am (GPGSM): Hardwire gpgsm. Signed-off-by: Werner Koch <[email protected]>
* Document API change for GPGME_EVENT_DONE from 2009.Werner Koch2013-08-191-3/+3
| | | | | | | | | | | | * doc/gpgme.texi (I/O Callback Interface): Fix description for the event arg. -- With commit c8e934b2 (2009-10-26) gpgme_io_event_done_data_t was introduced to replace the use of gpg_error_t with GPGME_EVENT_DONE. Unfortunately this was not documented. Maybe at that time the event code was considered internal and its use in GPA was not known. Too bad.
* Fix possible segv in the gpgme_op_card_edit.Werner Koch2013-08-191-4/+4
| | | | | * src/edit.c (gpgme_op_edit_start, gpgme_op_card_edit_start): Do not deref a NULL KEY in TRACE_BEG.
* tests: Fix NULL ptr deref in gpgsm/t-verify.Werner Koch2013-08-191-1/+3
| | | | | * tests/gpgsm/t-verify.c (check_result): Do not dereference a sig or sig->fpr if NULL.
* Release 1.4.3.gpgme-1.4.3Werner Koch2013-08-122-3/+3
| | | | * configure.ac: Change LT version to C22/A11/R0.