[git] GPGME - branch, master, updated. gpgme-1.8.0-110-g55ac5ee

by Werner Koch cvs at cvs.gnupg.org
Tue Mar 21 11:19:39 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  55ac5eed9f59081283d34098a9e0ada753d61d59 (commit)
      from  fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 55ac5eed9f59081283d34098a9e0ada753d61d59
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Mar 21 11:16:16 2017 +0100

    core: Extend gpgme_get_dirinfo to return the gpg-wks-client name.
    
    * src/dirinfo.c (WANT_GPG_WKS_CLIENT_NAME): New const.
    (struct dirinfo): New field 'gpg_wks_client_name'.
    (get_gpgconf_item): Build it on demand.
    (gpgme_get_dirinfo): New value "gpg-wks-client-name" for WHAT.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index a4ab5c4..9846299 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -979,6 +979,9 @@ Return the file name of the CMS engine.
 @item g13-name
 Return the name of the file container encryption engine.
 
+ at item gpg-wks-client-name
+Return the name of the Web Key Service tool.
+
 @end table
 
 @end deftypefun
diff --git a/src/dirinfo.c b/src/dirinfo.c
index a0cbc03..7374412 100644
--- a/src/dirinfo.c
+++ b/src/dirinfo.c
@@ -51,6 +51,7 @@ enum
     WANT_GPG_NAME,
     WANT_GPGSM_NAME,
     WANT_G13_NAME,
+    WANT_GPG_WKS_CLIENT_NAME,
     WANT_GPG_ONE_MODE
   };
 
@@ -73,6 +74,7 @@ static struct {
   char *gpg_name;
   char *gpgsm_name;
   char *g13_name;
+  char *gpg_wks_client_name;
   int  gpg_one_mode;  /* System is in gpg1 mode.  */
 } dirinfo;
 
@@ -333,6 +335,14 @@ get_gpgconf_item (int what)
     case WANT_G13_NAME:   result = dirinfo.g13_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:
+      if (!dirinfo.gpg_wks_client_name && dirinfo.libexecdir)
+        dirinfo.gpg_wks_client_name = _gpgme_strconcat (dirinfo.libexecdir,
+                                                        "/",
+                                                        "gpg-wks-client",
+                                                        NULL);
+      result = dirinfo.gpg_wks_client_name;
+      break;
     }
   UNLOCK (dirinfo_lock);
   return result;
@@ -438,6 +448,8 @@ 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, "gpg-wks-client-name"))
+    return get_gpgconf_item (WANT_GPG_WKS_CLIENT_NAME);
   else if (!strcmp (what, "agent-ssh-socket"))
     return get_gpgconf_item (WANT_AGENT_SSH_SOCKET);
   else if (!strcmp (what, "dirmngr-socket"))
diff --git a/tests/t-engine-info.c b/tests/t-engine-info.c
index 8f617f9..43257eb 100644
--- a/tests/t-engine-info.c
+++ b/tests/t-engine-info.c
@@ -125,7 +125,9 @@ main (int argc, char **argv )
                           "gpgconf-name",
                           "gpg-name",
                           "gpgsm-name",
-                          "g13-name", NULL };
+                          "g13-name",
+                          "gpg-wks-client-name",
+                          NULL };
     const char *s;
     int i;
 

-----------------------------------------------------------------------

Summary of changes:
 doc/gpgme.texi        |  3 +++
 src/dirinfo.c         | 12 ++++++++++++
 tests/t-engine-info.c |  4 +++-
 3 files changed, 18 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list