diff options
| author | Andre Heinecke <[email protected]> | 2016-03-01 12:11:13 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2016-07-05 19:51:24 +0000 | 
| commit | 72b83ffc4d7581f4efef3bd7c261d7d7424bcf0e (patch) | |
| tree | e1a0a9cad2f1dd4e0ed5f75d22cb23e546bd430a /src | |
| parent | Doc: Document pinentry mode (diff) | |
| download | gpgme-72b83ffc4d7581f4efef3bd7c261d7d7424bcf0e.tar.gz gpgme-72b83ffc4d7581f4efef3bd7c261d7d7424bcf0e.zip | |
w32: Fallback to 2.1 reg key for gpgconf search
* src/w32-util.c (_gpgme_get_gpgconf_path): Fallback to 2.1 installer
 registry key.
--
Finding gpgconf is utterly important so we should be as compatible
as possible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32-util.c | 17 | 
1 files changed, 14 insertions, 3 deletions
| diff --git a/src/w32-util.c b/src/w32-util.c index a27955b5..0086fe39 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -563,15 +563,26 @@ _gpgme_get_gpgconf_path (void)        gpgconf = find_program_at_standard_place (name2);      } -  /* 3. Try to find gpgconf.exe using that ancient registry key.  This -        should eventually be removed.  */ +  /* 3. Try to find gpgconf.exe using the Windows registry. */    if (!gpgconf)      {        char *dir; -      dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", +      dir = read_w32_registry_string (NULL,                                        "Software\\GNU\\GnuPG",                                        "Install Directory"); +      if (!dir) +        { +          char *tmp = read_w32_registry_string (NULL, +                                                "Software\\GnuPG", +                                                "Install Directory"); +          if (tmp) +            { +              if (gpgrt_asprintf (&dir, "%s\\bin", tmp) == -1) +                return NULL; +              free (tmp); +            } +        }        if (dir)          {            gpgconf = find_program_in_dir (dir, name); | 
