* 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.
* 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.
* 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.
* 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.
* 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 <wk@gnupg.org>
* 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.
* tests/gpg/start-stop-agent: New.
* tests/gpg/initial.test: New.
* tests/gpg/final.test: New.
* tests/gpg/Makefile.am (c_tests): New.
(TESTS): Move all to c_tests. Add initial.test, final.test, and
c_tests.
(TESTS_ENVIRONMENT): Add C_ALL=C
(private_keys): New.
(EXTRA_DIST): Add new files.
(./private-keys-v1.d/gpg-sample.stamp): Copy private keys.
(all-local): Depend on gpg-sample.stamp.
* tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F: New.
* tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD: New.
* tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66: New.
* tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C: New.
* tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
--
GnuPG 2.1 requires that the agent knows the private keys. Thus we
need to install them. The code should still work with GnuPG < 2.1.
To make the whole testing using a agent more robust, the way to start
the agent has also be changed.
* configure.ac: Move test for gpgconf before test for gpg.
(GPG, GPGSM, G13): Use gpgconf instead of AC_PATH_PROG if possible.
--
This change is required so that the t-engine-info test does not
fail. In any case, it is a good idea to use gpgconf for these test
because this is how it works at runtime.
* src/gpgme.h.in (gpgme_data_type_t): New.
(gpgme_data_identify): New prototype.
* src/data-identify.c: New.
* src/parsetlv.c, src/parsetlv.h: New. Take from gpa.
* src/libgpgme.vers, src/gpgme.def: Add gpgme_data_identify.
* src/gpgme-tool.c (status): Add STATUS_IDENTIFY_RESULT.
(gt_identify): New.
(cmd_identify): New.
(hlp_passwd): Move close to cmd_passwd.
--
It is often useful to have a way to identify the data which needs
processing. This is such a common task that it makes sense to
implement this in gpgme to avoid diverging implementations.
* src/util.h: Move some prototypes to ...
* src/sys-util.h: New.
* src/Makefile.am (main_sources): Add sys-util.h.
* configure.ac (AH_VERBATIM): Add DIRSEP_C and DIRSEP_S.
* src/dirinfo.c: Include sys-util.h.
(WANT_GPG_NAME, WANT_GPGSM_NAME, WANT_G13_NAME)
(WANT_UISRV_SOCKET): New.
(dirinfo): Add corresponding fields.
(parse_output): Add arg COMPONENTS and set new fields.
(read_gpgconf_dirs): Add arg components and act upon it.
(get_gpgconf_item): Call read_gpgconf_dirs two times. Add debug
output.
(_gpgme_get_default_gpg_name): New.
(_gpgme_get_default_gpgsm_name): New.
(_gpgme_get_default_g13_name): New.
(_gpgme_get_default_gpgconf_name): New.
(_gpgme_get_default_uisrv_socket): New.
* src/engine-gpg.c, src/engine-g13.c, src/engine-gpgconf.c
* src/engine-gpgsm.c, src/engine-uiserver.c: Change to use
_gpgme_get_default_ instead of those from sys-util.h.
* src/posix-util.c (_gpgme_get_gpg_path): Include sys-util.h.
(_gpgme_get_uiserver_socket_path): Remove.
* src/w32-util.c (_gpgme_get_gpg_path): Include sys-util.h.
(_gpgme_get_uiserver_socket_path): Remove.
--
The default engines names are now taken from the output of gpgconf.
If gpgconf is not installed gpg 1 is assumed and locate the same was
as gpgconf.
* build-aux/ltmain.sh (sed_uncomment_deffile): New.
(orig_export_symbols): Uncomment def file before testing for EXPORTS.
* m4/libtool.m4: Do the same for the generated code.
--
The old code was not correct in that it only looked at the first line
and puts an EXPORTS keyword in front if missing. Binutils 2.22
accepted a duplicated EXPORTS keyword but at least 2.23.2 is more
stringent and bails out without this fix.
There is no need to send this upstream. Upstream's git master has a
lot of changes including a similar fix for this problems. There are
no signs that a libtool 2.4.3 will be released to fix this problem and
thus we need to stick to our copy of 2.4.2 along with this patch.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/gpgme.h.in: Move gpgme_sssize_t and gpgme_off_t typedefs into
the extern "C" scope.
--
Frankly, this does not help very much because g++ still does not
interpret gpgme_data_seek_cb_t as compatible with the C++ ssize_t. I
am sorry for that API change but C and C++ are too different to always
get both of them under one umbrella. However, the ABI should now be
identical to older gpgme versions.
* configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t
and gpgme_ssize_t.
(API__OFF_T, API__SSIZE_T): New ac_subst.
* src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros.
* src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h
* src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c
* src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c
* src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t
by gpgme_off_t and sszie_t by gpgme_ssize_t.
* src/ath-pthread.c, src/ath.h: Include gpgme.h.
--
For a detailed description, see the gpgme.texi diff.
* src/w32-io.c (reader_context_s, create_reader)
(writer_context_s, create_writer): Rename STOPPED to CLOSE_EV.
(reader, writer): Remove setting of STOPPED. Wait for CLOSE_EV and
then release the context.
(destroy_reader, destroy_writer): Do not wait but set the CLOSE_EV.
(kill_reader, kill_writer): Remove.
(_gpgme_io_close): Add code from kill_reader and kill_writer.
--
The old code was prone to deadlocks which were actually exhibited at
Kleopatra startup. The new code is much more straightforward and
easier to understand. The reason for the complex old code was
probably due to our former idea to allow re-use of the I/O threads.
However we have long given up on this.
* configure.ac: Disable fd-passing by default for Apple.
--
We have not yet tracked down the problem, thus we revert to the
pre-1.4 behaviour for Apple.
GnuPG-bug-id: 1483