diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 4a705b1c..ef9eb756 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -990,6 +990,21 @@ Return the file name of the CMS engine. @item g13-name Return the name of the file container encryption engine. +@item keyboxd-name +Return the name of the key database daemon. + +@item agent-name +Return the name of gpg-agent. + +@item scdaemon-name +Return the name of the smart card daemon. + +@item dirmngr-name +Return the name of dirmngr. + +@item pinentry-name +Return the name of the pinentry program. + @item gpg-wks-client-name Return the name of the Web Key Service tool. diff --git a/src/dirinfo.c b/src/dirinfo.c index c6b7d718..8ea15d81 100644 --- a/src/dirinfo.c +++ b/src/dirinfo.c @@ -53,6 +53,11 @@ enum WANT_GPG_NAME, WANT_GPGSM_NAME, WANT_G13_NAME, + WANT_KEYBOXD_NAME, + WANT_AGENT_NAME, + WANT_SCDAEMON_NAME, + WANT_DIRMNGR_NAME, + WANT_PINENTRY_NAME, WANT_GPG_WKS_CLIENT_NAME, WANT_GPG_ONE_MODE }; @@ -77,6 +82,11 @@ static struct { char *gpg_name; char *gpgsm_name; char *g13_name; + char *keyboxd_name; + char *agent_name; + char *scdaemon_name; + char *dirmngr_name; + char *pinentry_name; char *gpg_wks_client_name; int gpg_one_mode; /* System is in gpg1 mode. */ } dirinfo; @@ -137,6 +147,16 @@ parse_output (char *line, int components) dirinfo.gpgsm_name = strdup (value); else if (!strcmp (line, "g13") && !dirinfo.g13_name) dirinfo.g13_name = strdup (value); + else if (!strcmp (line, "keyboxd") && !dirinfo.keyboxd_name) + dirinfo.keyboxd_name = strdup (value); + else if (!strcmp (line, "gpg-agent") && !dirinfo.agent_name) + dirinfo.agent_name = strdup (value); + else if (!strcmp (line, "scdaemon") && !dirinfo.scdaemon_name) + dirinfo.scdaemon_name = strdup (value); + else if (!strcmp (line, "dirmngr") && !dirinfo.dirmngr_name) + dirinfo.dirmngr_name = strdup (value); + else if (!strcmp (line, "pinentry") && !dirinfo.pinentry_name) + dirinfo.pinentry_name = strdup (value); } else { @@ -310,6 +330,26 @@ get_gpgconf_item (int what) _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, "gpgme-dinfo: gpgsm='%s'\n", dirinfo.gpgsm_name); + if (dirinfo.keyboxd_name) + _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, + "gpgme-dinfo: keyboxd='%s'\n", + dirinfo.keyboxd_name); + if (dirinfo.agent_name) + _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, + "gpgme-dinfo: gpg-agent='%s'\n", + dirinfo.agent_name); + if (dirinfo.scdaemon_name) + _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, + "gpgme-dinfo: scdaemon='%s'\n", + dirinfo.scdaemon_name); + if (dirinfo.dirmngr_name) + _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, + "gpgme-dinfo: dirmngr='%s'\n", + dirinfo.dirmngr_name); + if (dirinfo.pinentry_name) + _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, + "gpgme-dinfo: pinentry='%s'\n", + dirinfo.pinentry_name); if (dirinfo.homedir) _gpgme_debug (NULL, DEBUG_INIT, -1, NULL, NULL, NULL, "gpgme-dinfo: homedir='%s'\n", @@ -352,6 +392,11 @@ get_gpgconf_item (int what) case WANT_GPG_NAME: result = dirinfo.gpg_name; break; case WANT_GPGSM_NAME: result = dirinfo.gpgsm_name; break; case WANT_G13_NAME: result = dirinfo.g13_name; break; + case WANT_KEYBOXD_NAME: result = dirinfo.keyboxd_name; break; + case WANT_AGENT_NAME: result = dirinfo.agent_name; break; + case WANT_SCDAEMON_NAME: result = dirinfo.scdaemon_name; break; + case WANT_DIRMNGR_NAME: result = dirinfo.dirmngr_name; break; + case WANT_PINENTRY_NAME: result = dirinfo.pinentry_name; break; case WANT_UISRV_SOCKET: result = dirinfo.uisrv_socket; break; case WANT_GPG_ONE_MODE: result = dirinfo.gpg_one_mode? "1":NULL; break; case WANT_GPG_WKS_CLIENT_NAME: @@ -467,6 +512,16 @@ gpgme_get_dirinfo (const char *what) return get_gpgconf_item (WANT_GPGSM_NAME); else if (!strcmp (what, "g13-name")) return get_gpgconf_item (WANT_G13_NAME); + else if (!strcmp (what, "keyboxd-name")) + return get_gpgconf_item (WANT_KEYBOXD_NAME); + else if (!strcmp (what, "agent-name")) + return get_gpgconf_item (WANT_AGENT_NAME); + else if (!strcmp (what, "scdaemon-name")) + return get_gpgconf_item (WANT_SCDAEMON_NAME); + else if (!strcmp (what, "dirmngr-name")) + return get_gpgconf_item (WANT_DIRMNGR_NAME); + else if (!strcmp (what, "pinentry-name")) + return get_gpgconf_item (WANT_PINENTRY_NAME); else if (!strcmp (what, "gpg-wks-client-name")) return get_gpgconf_item (WANT_GPG_WKS_CLIENT_NAME); else if (!strcmp (what, "agent-ssh-socket")) diff --git a/tests/t-engine-info.c b/tests/t-engine-info.c index 654cf843..3f8d0037 100644 --- a/tests/t-engine-info.c +++ b/tests/t-engine-info.c @@ -127,6 +127,11 @@ main (int argc, char **argv ) "gpg-name", "gpgsm-name", "g13-name", + "keyboxd-name", + "agent-name", + "scdaemon-name", + "dirmngr-name", + "pinentry-name", "gpg-wks-client-name", NULL }; const char *s;