[git] GPGME - branch, master, updated. gpgme-1.11.1-9-ge04b814

by Andre Heinecke cvs at cvs.gnupg.org
Thu May 17 17:46:19 CEST 2018


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  e04b8142df21a49e6c4a3f8234cc14bfec217222 (commit)
      from  8a0c8c52510d9c2d934f85159f04b666286b1786 (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 e04b8142df21a49e6c4a3f8234cc14bfec217222
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 17:41:53 2018 +0200

    core, w32: Add w64 handling for regkeys
    
    * src/w32-util.c (_gpgme_get_gpg_path): Use new defines.
    (GNUPG_REGKEY_2): x64 aware regkey as used by GnuPG in Gpg4win 2.x
    (GNUPG_REGKEY_3): x64 aware regkey as used by GnuPG in Gpg4win 3.x
    (_gpgme_get_gpgconf_path): Use new regkeys. Add another fallback.
    
    --
    This should fix more "unsupported protocol" issues if Gpg4win /
    GnuPG is installed in a non standard path on 64bit systems.
    
    The regkey handling is similar to that of gpgex and gpgol.
    
    GnuPG-Bug-Id: T3988

diff --git a/src/w32-util.c b/src/w32-util.c
index 5b02c7e..30dd081 100644
--- a/src/w32-util.c
+++ b/src/w32-util.c
@@ -72,6 +72,17 @@
 # define F_OK 0
 #endif
 
+/* The Registry key used by GNUPG.  */
+#ifdef _WIN64
+# define GNUPG_REGKEY_2  "Software\\Wow6432Node\\GNU\\GnuPG"
+#else
+# define GNUPG_REGKEY_2  "Software\\GNU\\GnuPG"
+#endif
+#ifdef _WIN64
+# define GNUPG_REGKEY_3  "Software\\Wow6432Node\\GnuPG"
+#else
+# define GNUPG_REGKEY_3  "Software\\GnuPG"
+#endif
 
 DEFINE_STATIC_LOCK (get_path_lock);
 
@@ -513,7 +524,7 @@ _gpgme_get_gpg_path (void)
       char *dir;
 
       dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE",
-                                      "Software\\GNU\\GnuPG",
+                                      GNUPG_REGKEY_2,
                                       "Install Directory");
       if (dir)
         {
@@ -568,12 +579,12 @@ _gpgme_get_gpgconf_path (void)
       char *dir;
 
       dir = read_w32_registry_string (NULL,
-                                      "Software\\GNU\\GnuPG",
+                                      GNUPG_REGKEY_2,
                                       "Install Directory");
       if (!dir)
         {
           char *tmp = read_w32_registry_string (NULL,
-                                                "Software\\GnuPG",
+                                                GNUPG_REGKEY_3,
                                                 "Install Directory");
           if (tmp)
             {
@@ -596,6 +607,14 @@ _gpgme_get_gpgconf_path (void)
       gpgconf = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe");
     }
 
+  /* 5. Try to find gpgconf.exe relative to us.  */
+  if (!gpgconf && inst_dir)
+    {
+      char *dir = _gpgme_strconcat (inst_dir, "\\..\\..\\GnuPG\\bin");
+      gpgconf = find_program_in_dir (dir, name);
+      free (dir);
+    }
+
   /* 5. Print a debug message if not found.  */
   if (!gpgconf)
     _gpgme_debug (DEBUG_ENGINE, "_gpgme_get_gpgconf_path: '%s' not found",name);

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

Summary of changes:
 src/w32-util.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list