[git] GnuPG - branch, master, updated. gnupg-2.1.9-187-gda5a232

by Werner Koch cvs at cvs.gnupg.org
Fri Nov 27 12:26:16 CET 2015


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 "The GNU Privacy Guard".

The branch, master has been updated
       via  da5a232199ef93be219e933a7eaf4ccfc6d24d61 (commit)
      from  82f6abb4807c89388052ab442368d9e09fb84aea (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 da5a232199ef93be219e933a7eaf4ccfc6d24d61
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 27 12:21:45 2015 +0100

    dirmngr: Allow testing for a running Tor via "getinfo tor".
    
    * dirmngr/server.c (cmd_getinfo): Print an S line if Tor is not
    running.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/server.c b/dirmngr/server.c
index 8954ba8..e08afd4 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2123,8 +2123,25 @@ cmd_getinfo (assuan_context_t ctx, char *line)
     {
       if (opt.use_tor)
         {
-          err = 0;
-          assuan_set_okay_line (ctx, " - Tor mode is enabled");
+#if ASSUAN_VERSION_NUMBER >= 0x020402
+          /* Check whether we can connect to the proxy.  We use a
+             special feature introduced with libassuan 2.4.2.  */
+          int sock = assuan_sock_connect_byname (NULL, 0, 0, NULL,
+                                                 ASSUAN_SOCK_TOR);
+          if (sock == ASSUAN_INVALID_FD)
+            {
+              err = assuan_write_status
+                (ctx, "NO_TOR",
+                 errno == ECONNREFUSED? "Tor not running" : strerror (errno));
+            }
+          else
+            {
+              assuan_sock_close (sock);
+              err = 0;
+            }
+          if (!err)
+#endif /* Libassuan >= 2.4.2 */
+            assuan_set_okay_line (ctx, "- Tor mode is enabled");
         }
       else
         err = set_error (GPG_ERR_FALSE, "Tor mode is NOT enabled");

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

Summary of changes:
 dirmngr/server.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list