aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Post release updates.Werner Koch2014-12-113-4/+10
| | | | --
* Release 1.5.3.gpgme-1.5.3Werner Koch2014-12-112-2/+5
| | | | * configure.ac: Set LT version to C24/A13/R2.
* Return an error for some export key operations.Werner Koch2014-12-082-4/+127
| | | | | | | | | | | | | | | | * src/context.h (OPDATA_EXPORT): New. * src/export.c (op_data_t): New. (release_op_data): New. (parse_error): New. (export_status_handler): New. (export_start, export_ext_start): Prepare op_data. (gpgme_op_export_ext, gpgme_op_export_keys): Return an error from the status handler. -- To support an error return also for the async functions we need to extend the API. Until we have done that this new features helps at least in some cases; in particular for --send-keys.
* Post release updatesWerner Koch2014-11-213-3/+7
| | | | --
* Release 1.5.2.gpgme-1.5.2Werner Koch2014-11-212-2/+6
| | | | * configure.ac: Set LT version to C24/A13/R1.
* Update the previous commitWerner Koch2014-11-211-58/+54
| | | | | | | | | | | * src/sign.c (gpgme_op_sign_result): Reformat and take care of failed malloc. -- Although _gpgme_debug_trace() is current always true, the code should be run always and not just in trace mode. Also added error checking to malloc and strdup. And while at replace some while by for loop for easier readability.
* Fix returning new signatures when there are none.Ben Kibbey2014-11-211-8/+54
| | | | | | | | | | | | | | | | | | * src/sign.c (gpgme_op_sign_result): Test that invalid and valid signatures add up to gpgme_signers_count(). -- When invalid and valid signatures do not equal gpgme_signers_count() it means that there was a bad passphrase during signing after the first signer. This leaves the result.signatures from previous signers intact which isn't correct since gpg will report: gpg: number of one-pass packets does not match number of signature packets gpg: can't handle this ambiguous signature data during verify. So when this happens append the valid signatures to the .invalid_signers list with .reason set to GPG_ERR_GENERAL.
* doc: Clarify the FILE command.Werner Koch2014-11-191-4/+9
| | | | --
* Improve the debug output a bit.Werner Koch2014-11-062-3/+4
| | | | * src/debug.h (TRACE_ERR): Include the line number in the output.
* 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
| | | | --