diff options
author | Werner Koch <[email protected]> | 2013-08-02 13:25:23 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-08-02 13:25:23 +0000 |
commit | a4c80126ae4754c8478c69a8a24a6ffd975485fc (patch) | |
tree | 7d8ba4f2d05b6cf2ef911486a5ebd3a82570988b /src/engine-gpg.c | |
parent | w32: Try to locate gpg in the gpgme installation dir. (diff) | |
download | gpgme-a4c80126ae4754c8478c69a8a24a6ffd975485fc.tar.gz gpgme-a4c80126ae4754c8478c69a8a24a6ffd975485fc.zip |
Prefer GnuPG-2 engines over GnuPG-1.
* 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.
Diffstat (limited to 'src/engine-gpg.c')
-rw-r--r-- | src/engine-gpg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 72d3ad14..3bc9f660 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -296,7 +296,7 @@ static char * gpg_get_version (const char *file_name) { return _gpgme_get_program_version (file_name ? file_name - : _gpgme_get_gpg_path ()); + : _gpgme_get_default_gpg_name ()); } @@ -1296,7 +1296,7 @@ start (engine_gpg_t gpg) if (!gpg) return gpg_error (GPG_ERR_INV_VALUE); - if (!gpg->file_name && !_gpgme_get_gpg_path ()) + if (!gpg->file_name && !_gpgme_get_default_gpg_name ()) return trace_gpg_error (GPG_ERR_INV_ENGINE); if (gpg->lc_ctype) @@ -1352,7 +1352,7 @@ start (engine_gpg_t gpg) fd_list[n].dup_to = -1; status = _gpgme_io_spawn (gpg->file_name ? gpg->file_name : - _gpgme_get_gpg_path (), gpg->argv, + _gpgme_get_default_gpg_name (), gpg->argv, IOSPAWN_FLAG_ALLOW_SET_FG, fd_list, NULL, NULL, &pid); { @@ -2401,7 +2401,7 @@ gpg_set_pinentry_mode (void *engine, gpgme_pinentry_mode_t mode) struct engine_ops _gpgme_engine_ops_gpg = { /* Static functions. */ - _gpgme_get_gpg_path, + _gpgme_get_default_gpg_name, NULL, gpg_get_version, gpg_get_req_version, |