[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-230-gef6a6d9

by Werner Koch cvs at cvs.gnupg.org
Thu Aug 1 12:02:50 CEST 2013


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  ef6a6d973c2bcc54006c04dc41f978ff01005c97 (commit)
       via  9ff72e4e7e4f56c241a525479a94ed4c95efc23f (commit)
       via  db4651734fe91935b17876dc9194329b00066eff (commit)
       via  6ce54a18c2a625b89d5453129d5b9d1ad9d59473 (commit)
       via  ef2e2e54020c3475bf2129c3ec8360c7bad3a6c9 (commit)
       via  25b0357bf0a4861a751cfbc3e0335ae05c8b2b1b (commit)
       via  ffa7472db551f12f66b9789c31fabb5fc80cc13a (commit)
       via  f101f34fffee4a02e7a5f62b59667e45e50e8325 (commit)
       via  2830fcb83c99289a49da0e111766daf2d9a1fa3b (commit)
       via  f254497e09fa4e0e24e63d14f7316fc31c938844 (commit)
      from  82c25e67a1669febb5332b3e9bc4652e6855fdca (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 ef6a6d973c2bcc54006c04dc41f978ff01005c97
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:32:05 2013 +0200

    agent: Include missing prototype.
    
    * agent/protect.c: Include cvt-openpgp.h.

diff --git a/agent/protect.c b/agent/protect.c
index cb2c098..b29f494 100644
--- a/agent/protect.c
+++ b/agent/protect.c
@@ -36,6 +36,7 @@
 
 #include "agent.h"
 
+#include "cvt-openpgp.h"
 #include "sexp-parse.h"
 
 #define PROT_CIPHER        GCRY_CIPHER_AES

commit 9ff72e4e7e4f56c241a525479a94ed4c95efc23f
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:20:48 2013 +0200

    w32: Add code to support a portable use of GnuPG.
    
    * common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New.
    (check_portable_app) [W32]: New.
    (standard_homedir, default_homedir) [W32]: Support the portable flag.
    (w32_rootdir, w32_commondir) [W32]: Ditto.
    (gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto.
    * common/logging.h (JNLIB_LOG_NO_REGISTRY): New.
    * common/logging.c (no_registry): New variable.
    (log_set_prefix, log_get_prefix): Set/get that variable.
    (do_logv): Do not check the registry if that variable is set.
    --
    
    Beware: This code has not been tested because it is not yet possible
    to build GnuPG 2.1 for Windows.  However, the code will be the base
    for an implementation in 2.0.
    
    A portable use of GnuPG under Windows means that GnuPG uses a home
    directory depending on the location of the actual binary.  No registry
    variables are considered.  The portable mode is enabled if in the
    installation directory of the the binary "gpgconf.exe" and a
    file "gpgconf.ctl" are found.  The latter file is empty or consists
    only of empty or '#' comment lines.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/NEWS b/NEWS
index 370d9c4..3b2016f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Noteworthy changes in version 2.1.0beta4 (unreleased)
+Noteworthy changes in version 2.1.0-betaN (unreleased)
 -----------------------------------------------------
 
  * GPG now accepts a space separated fingerprint as a user ID.  This
@@ -20,6 +20,8 @@ Noteworthy changes in version 2.1.0beta4 (unreleased)
  * Better support fo CCID readers.  Now, internal CCID driver supports
    readers with no auto configuration feature.
 
+ * Support installation as portable application under Windows.
+
 
 Noteworthy changes in version 2.1.0beta3 (2011-12-20)
 -----------------------------------------------------
diff --git a/common/homedir.c b/common/homedir.c
index 28e5c9a..9fec78f 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -1,5 +1,6 @@
 /* homedir.c - Setup the home directory.
  * Copyright (C) 2004, 2006, 2007, 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2013 Werner Koch
  *
  * This file is part of GnuPG.
  *
@@ -33,6 +34,9 @@
 #include <fcntl.h>
 
 #ifdef HAVE_W32_SYSTEM
+#include <winsock2.h>   /* Due to the stupid mingw64 requirement to
+                           include this header before windows.h which
+                           is often implicitly included.  */
 #include <shlobj.h>
 #ifndef CSIDL_APPDATA
 #define CSIDL_APPDATA 0x001a
@@ -53,6 +57,33 @@
 #include "util.h"
 #include "sysutils.h"
 
+#ifdef HAVE_W32_SYSTEM
+/* A flag used to indicate that a control file for gpgconf has been
+   detected.  Under Windows the presence of this file indicates a
+   portable installations and triggers several changes:
+
+   - The GNUGHOME directory is fixed relative to installation
+     directory.  All other means to set the home directory are ignore.
+
+   - All registry variables will be ignored.
+
+   This flag is not used on Unix systems.
+ */
+static int w32_portable_app;
+#endif /*HAVE_W32_SYSTEM*/
+
+#ifdef HAVE_W32_SYSTEM
+/* This flag is true if this process' binary has been installed under
+   bin and not in the root directory. */
+static int w32_bin_is_bin;
+#endif /*HAVE_W32_SYSTEM*/
+
+
+#ifdef HAVE_W32_SYSTEM
+static const char *w32_rootdir (void);
+#endif
+
+
 
 #ifdef HAVE_W32_SYSTEM
 static void
@@ -124,28 +155,39 @@ standard_homedir (void)
 
   if (!dir)
     {
-      char path[MAX_PATH];
+      const char *rdir;
 
-      /* It might be better to use LOCAL_APPDATA because this is
-         defined as "non roaming" and thus more likely to be kept
-         locally.  For private keys this is desired.  However, given
-         that many users copy private keys anyway forth and back,
-         using a system roaming services might be better than to let
-         them do it manually.  A security conscious user will anyway
-         use the registry entry to have better control.  */
-      if (w32_shgetfolderpath (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
-                               NULL, 0, path) >= 0)
+      rdir = w32_rootdir ();
+      if (w32_portable_app)
         {
-          char *tmp = xmalloc (strlen (path) + 6 +1);
-          strcpy (stpcpy (tmp, path), "\\gnupg");
-          dir = tmp;
-
-          /* Try to create the directory if it does not yet exists.  */
-          if (access (dir, F_OK))
-            w32_try_mkdir (dir);
+          dir = xstrconcat (rdir, DIRSEP_S "home", NULL);
         }
       else
-        dir = GNUPG_DEFAULT_HOMEDIR;
+        {
+          char path[MAX_PATH];
+
+          /* It might be better to use LOCAL_APPDATA because this is
+             defined as "non roaming" and thus more likely to be kept
+             locally.  For private keys this is desired.  However,
+             given that many users copy private keys anyway forth and
+             back, using a system roaming services might be better
+             than to let them do it manually.  A security conscious
+             user will anyway use the registry entry to have better
+             control.  */
+          if (w32_shgetfolderpath (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
+                                   NULL, 0, path) >= 0)
+            {
+              char *tmp = xmalloc (strlen (path) + 6 +1);
+              strcpy (stpcpy (tmp, path), "\\gnupg");
+              dir = tmp;
+
+              /* Try to create the directory if it does not yet exists.  */
+              if (access (dir, F_OK))
+                w32_try_mkdir (dir);
+            }
+          else
+            dir = GNUPG_DEFAULT_HOMEDIR;
+        }
     }
   return dir;
 #else/*!HAVE_W32_SYSTEM*/
@@ -160,6 +202,13 @@ default_homedir (void)
 {
   const char *dir;
 
+#ifdef HAVE_W32_SYSTEM
+  /* For a portable application we only use the standard homedir.  */
+  w32_rootdir ();
+  if (w32_portable_app)
+    return standard_homedir ();
+#endif /*HAVE_W32_SYSTEM*/
+
   dir = getenv ("GNUPGHOME");
 #ifdef HAVE_W32_SYSTEM
   if (!dir || !*dir)
@@ -197,6 +246,37 @@ default_homedir (void)
 
 
 #ifdef HAVE_W32_SYSTEM
+/* Check whether gpgconf is installed and if so read the gpgconf.ctl
+   file. */
+static void
+check_portable_app (const char *dir)
+{
+  char *fname;
+
+  fname = xstrconcat (dir, DIRSEP_S "gpgconf.exe", NULL);
+  if (access (fname, F_OK))
+    log_error ("required binary '%s' is not installed\n", fname);
+  else
+    {
+      strcpy (fname + strlen (fname) - 3, ".ctl");
+      if (!access (fname, F_OK))
+        {
+          /* gpgconf.ctl file found.  Record this fact.  */
+          w32_portable_app = 1;
+          {
+            unsigned int flags;
+            log_get_prefix (&flags);
+            log_set_prefix (NULL, (flags | JNLIB_LOG_NO_REGISTRY));
+          }
+          /* FIXME: We should read the file to detect special flags
+             and print a warning if we don't understand them  */
+        }
+    }
+  xfree (fname);
+}
+
+
+/* Determine the root directory of the gnupg installation on Windows.  */
 static const char *
 w32_rootdir (void)
 {
@@ -229,11 +309,17 @@ w32_rootdir (void)
       if (p)
         {
           *p = 0;
+
+          check_portable_app (dir);
+
           /* If we are installed below "bin" we strip that and use
              the top directory instead.  */
           p = strrchr (dir, DIRSEP_C);
           if (p && !strcmp (p+1, "bin"))
-            *p = 0;
+            {
+              *p = 0;
+              w32_bin_is_bin = 1;
+            }
         }
       if (!p)
         {
@@ -255,8 +341,17 @@ w32_commondir (void)
 
   if (!dir)
     {
+      const char *rdir;
       char path[MAX_PATH];
 
+      /* Make sure that w32_rootdir has been called so that we are
+         able to check the portable application flag.  The common dir
+         is the identical to the rootdir.  In that case there is also
+         no need to strdup its value.  */
+      rdir = w32_rootdir ();
+      if (w32_portable_app)
+        return rdir;
+
       if (w32_shgetfolderpath (NULL, CSIDL_COMMON_APPDATA,
                                NULL, 0, path) >= 0)
         {
@@ -270,7 +365,7 @@ w32_commondir (void)
         {
           /* Ooops: Not defined - probably an old Windows version.
              Use the installation directory instead.  */
-          dir = xstrdup (w32_rootdir ());
+          dir = xstrdup (rdir);
         }
     }
 
@@ -315,7 +410,19 @@ gnupg_bindir (void)
     name = xstrconcat (w32_rootdir (), DIRSEP_S "bin", NULL);
   return name;
 #elif defined(HAVE_W32_SYSTEM)
-  return w32_rootdir ();
+  const char *rdir;
+
+  rdir = w32_rootdir ();
+  if (w32_bin_is_bin)
+    {
+      static char *name;
+
+      if (!name)
+        name = xstrconcat (rdir, DIRSEP_S "bin", NULL);
+      return name;
+    }
+  else
+    return rdir;
 #else /*!HAVE_W32_SYSTEM*/
   return GNUPG_BINDIR;
 #endif /*!HAVE_W32_SYSTEM*/
@@ -390,41 +497,54 @@ gnupg_cachedir (void)
 
   if (!dir)
     {
-      char path[MAX_PATH];
-      const char *s1[] = { "GNU", "cache", "gnupg", NULL };
-      int s1_len;
-      const char **comp;
-
-      s1_len = 0;
-      for (comp = s1; *comp; comp++)
-        s1_len += 1 + strlen (*comp);
+      const char *rdir;
 
-      if (w32_shgetfolderpath (NULL, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE,
-                               NULL, 0, path) >= 0)
+      rdir = w32_rootdir ();
+      if (w32_portable_app)
+        {
+          dir = xstrconcat (rdir,
+                            DIRSEP_S, "var",
+                            DIRSEP_S, "cache",
+                            DIRSEP_S, "gnupg", NULL);
+        }
+      else
         {
-          char *tmp = xmalloc (strlen (path) + s1_len + 1);
-	  char *p;
+          char path[MAX_PATH];
+          const char *s1[] = { "GNU", "cache", "gnupg", NULL };
+          int s1_len;
+          const char **comp;
 
-	  p = stpcpy (tmp, path);
+          s1_len = 0;
           for (comp = s1; *comp; comp++)
-	    {
-	      p = stpcpy (p, "\\");
-	      p = stpcpy (p, *comp);
+            s1_len += 1 + strlen (*comp);
 
-	      if (access (tmp, F_OK))
-		w32_try_mkdir (tmp);
-	    }
+          if (w32_shgetfolderpath (NULL, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE,
+                                   NULL, 0, path) >= 0)
+            {
+              char *tmp = xmalloc (strlen (path) + s1_len + 1);
+              char *p;
 
-          dir = tmp;
-        }
-      else
-        {
-          dir = "c:\\temp\\cache\\gnupg";
+              p = stpcpy (tmp, path);
+              for (comp = s1; *comp; comp++)
+                {
+                  p = stpcpy (p, "\\");
+                  p = stpcpy (p, *comp);
+
+                  if (access (tmp, F_OK))
+                    w32_try_mkdir (tmp);
+                }
+
+              dir = tmp;
+            }
+          else
+            {
+              dir = "c:\\temp\\cache\\gnupg";
 #ifdef HAVE_W32CE_SYSTEM
-          dir += 2;
-	  w32_try_mkdir ("\\temp\\cache");
-	  w32_try_mkdir ("\\temp\\cache\\gnupg");
+              dir += 2;
+              w32_try_mkdir ("\\temp\\cache");
+              w32_try_mkdir ("\\temp\\cache\\gnupg");
 #endif
+            }
         }
     }
   return dir;
@@ -449,16 +569,21 @@ dirmngr_socket_name (void)
 
       s1 = default_homedir ();
 # else
-      char s1[MAX_PATH];
-      const char *s2;
-
-      /* We need something akin CSIDL_COMMON_PROGRAMS, but local
-	 (non-roaming).  This is becuase the file needs to be on the
-	 local machine and makes only sense on that machine.
-	 CSIDL_WINDOWS seems to be the only location which guarantees
-	 that. */
-      if (w32_shgetfolderpath (NULL, CSIDL_WINDOWS, NULL, 0, s1) < 0)
-	strcpy (s1, "C:\\WINDOWS");
+      char s1buf[MAX_PATH];
+      const char *s1, *s2;
+
+      s1 = default_homedir ();
+      if (!w32_portable_app)
+        {
+          /* We need something akin CSIDL_COMMON_PROGRAMS, but local
+             (non-roaming).  This is because the file needs to be on
+             the local machine and makes only sense on that machine.
+             CSIDL_WINDOWS seems to be the only location which
+             guarantees that. */
+          if (w32_shgetfolderpath (NULL, CSIDL_WINDOWS, NULL, 0, s1buf) < 0)
+            strcpy (s1buf, "C:\\WINDOWS");
+          s1 = s1buf;
+        }
 # endif
       s2 = DIRSEP_S "S.dirmngr";
       name = xmalloc (strlen (s1) + strlen (s2) + 1);
diff --git a/common/logging.c b/common/logging.c
index 73b0dbe..f78df91 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -96,6 +96,9 @@ static char prefix_buffer[80];
 static int with_time;
 static int with_prefix;
 static int with_pid;
+#ifdef HAVE_W32_SYSTEM
+static int no_registry;
+#endif
 static int (*get_pid_suffix_cb)(unsigned long *r_value);
 static int running_detached;
 static int force_prefixes;
@@ -561,6 +564,9 @@ log_set_prefix (const char *text, unsigned int flags)
   with_time = (flags & JNLIB_LOG_WITH_TIME);
   with_pid  = (flags & JNLIB_LOG_WITH_PID);
   running_detached = (flags & JNLIB_LOG_RUN_DETACHED);
+#ifdef HAVE_W32_SYSTEM
+  no_registry = (flags & JNLIB_LOG_NO_REGISTRY);
+#endif
 }
 
 
@@ -578,6 +584,10 @@ log_get_prefix (unsigned int *flags)
         *flags |= JNLIB_LOG_WITH_PID;
       if (running_detached)
         *flags |= JNLIB_LOG_RUN_DETACHED;
+#ifdef HAVE_W32_SYSTEM
+      if (no_registry)
+        *flags |= JNLIB_LOG_NO_REGISTRY;
+#endif
     }
   return prefix_buffer;
 }
@@ -624,8 +634,10 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
 #ifdef HAVE_W32_SYSTEM
       char *tmp;
 
-      tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
-                                            "DefaultLogFile");
+      tmp = (no_registry
+             ? NULL
+             : read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
+                                         "DefaultLogFile"));
       log_set_file (tmp && *tmp? tmp : NULL);
       jnlib_free (tmp);
 #else
diff --git a/common/logging.h b/common/logging.h
index 89913e6..3b38f73 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -42,6 +42,7 @@
 #define JNLIB_LOG_WITH_TIME    2
 #define JNLIB_LOG_WITH_PID     4
 #define JNLIB_LOG_RUN_DETACHED 256
+#define JNLIB_LOG_NO_REGISTRY  512
 
 int  log_get_errorcount (int clear);
 void log_inc_errorcount (void);
diff --git a/doc/opt-homedir.texi b/doc/opt-homedir.texi
index e382f63..033a901 100644
--- a/doc/opt-homedir.texi
+++ b/doc/opt-homedir.texi
@@ -5,6 +5,18 @@ Set the name of the home directory to @var{dir}. If this option is not
 used, the home directory defaults to @file{~/.gnupg}.  It is only
 recognized when given on the command line.  It also overrides any home
 directory stated through the environment variable @env{GNUPGHOME} or
-(on W32 systems) by means of the Registry entry
+(on Windows systems) by means of the Registry entry
 @var{HKCU\Software\GNU\GnuPG:HomeDir}.
 
+On Windows systems it is possible to install GnuPG as a portable
+application.  In this case only this command line option is
+considered, all other ways to set a home directory are ignored.
+
+To install GnuPG as a portable application under Windows, create an
+empty file name @file{gpgconf.ctl} in the same directory as the tool
+ at file{gpgconf.exe}.  The root of the installation is than that
+directory; or, if @file{gpgconf.exe} has been installed directly below
+a directory named @file{bin}, its parent directory.  You also need to
+make sure that the following directories exist and are writable:
+ at file{ROOT/home} for the GnuPG home and @file{ROOT/var/cache/gnupg}
+for internal cache files.

commit db4651734fe91935b17876dc9194329b00066eff
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:06:22 2013 +0200

    Silence compiler warning about deprecated Libgcrypt symbols
    
    * configure.ac (AH_BOTTOM): Define GCRYPT_NO_DEPRECATED.
    --
    
    Some gcc versions emit deprecated warning for such flagged Libgcrypt
    symbols; even if they are not used.

diff --git a/configure.ac b/configure.ac
index 01530e0..5a5e9f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -500,6 +500,9 @@ AH_BOTTOM([
 /* Tell libgcrypt not to use its own libgpg-error implementation. */
 #define USE_LIBGPG_ERROR 1
 
+/* Tell Libgcrypt not to include deprecated definitions.  */
+#define GCRYPT_NO_DEPRECATED 1
+
 /* We use jnlib, so tell other modules about it.  */
 #define HAVE_JNLIB_LOGGING 1
 

commit 6ce54a18c2a625b89d5453129d5b9d1ad9d59473
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:03:24 2013 +0200

    w32: Change autogen.sh to use npth.
    
    --

diff --git a/autogen.sh b/autogen.sh
index dcb3834..935a456 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -170,7 +170,7 @@ if [ "$myhost" = "w32" ]; then
 	     --with-libassuan-prefix=${w32root} \
 	     --with-zlib=${w32root} \
 	     --with-regex=${w32root} \
-             --with-pth-prefix=${w32root} \
+             --with-npth-prefix=${w32root} \
              --with-adns=${w32root} \
              ${extraoptions} --disable-g13 "$@"
     rc=$?

commit ef2e2e54020c3475bf2129c3ec8360c7bad3a6c9
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:02:03 2013 +0200

    dirmngr: Define missing LDAP constant
    
    * dirmngr/ldap-url.c (LDAP_SCOPE_DEFAULT): Define if missing.

diff --git a/dirmngr/ldap-url.c b/dirmngr/ldap-url.c
index 2dc186b..e5a7d94 100644
--- a/dirmngr/ldap-url.c
+++ b/dirmngr/ldap-url.c
@@ -96,6 +96,11 @@ software is provided `'as is'' without express or implied warranty.  */
 void ldap_pvt_hex_unescape( char *s );
 
 
+#ifndef LDAP_SCOPE_DEFAULT
+# define LDAP_SCOPE_DEFAULT -1
+#endif
+
+
 

 /* $OpenLDAP: pkg/ldap/libraries/libldap/charray.c,v 1.9.2.2 2003/03/03 17:10:04 kurt Exp $ */
 /*

commit 25b0357bf0a4861a751cfbc3e0335ae05c8b2b1b
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 11:01:01 2013 +0200

    scd: Fix a syntax error for Apple and Windows.
    
    * scd/apdu.c (pcsc_dword_t) [W32]: Fix syntax error.

diff --git a/scd/apdu.c b/scd/apdu.c
index 92c9864..133058d 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -83,7 +83,7 @@
 #endif
 
 #if defined(__APPLE__) || defined(_WIN32) || defined(__CYGWIN__)
-typedef unsinged int pcsc_dword_t;
+typedef unsigned int pcsc_dword_t;
 #else
 typedef unsigned long pcsc_dword_t;
 #endif

commit ffa7472db551f12f66b9789c31fabb5fc80cc13a
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 1 10:30:27 2013 +0200

    common: Fix a build error when using adns.
    
    * common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.
    --
    
    (fixes commit 31f548a18aed729c05ea367f2d8a8104480430d5)
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/dns-cert.c b/common/dns-cert.c
index 114e61d..dca15b1 100644
--- a/common/dns-cert.c
+++ b/common/dns-cert.c
@@ -148,7 +148,7 @@ get_dns_cert (const char *name, estream_t *r_key,
           goto leave;
         }
       else if (ctype == CERTTYPE_IPGP && datalen && datalen < 1023
-               && datalen >= data[0] + 1 && fpr && fpr_len && url)
+               && datalen >= data[0] + 1 && r_fpr && r_fprlen && r_url)
         {
           /* CERT type is IPGP.  We made sure that the data is
              plausible and that the caller requested this
@@ -170,7 +170,7 @@ get_dns_cert (const char *name, estream_t *r_key,
 
           if (datalen > *r_fprlen + 1)
             {
-              *url = xtrymalloc (datalen - (*r_fprlen + 1) + 1);
+              *r_url = xtrymalloc (datalen - (*r_fprlen + 1) + 1);
               if (!*r_url)
                 {
                   err = gpg_err_make (default_errsource,
@@ -179,8 +179,9 @@ get_dns_cert (const char *name, estream_t *r_key,
                   *r_fpr = NULL;
                   goto leave;
                 }
-              memcpy (*url, data + (*r_fprlen + 1), datalen - (*r_fprlen + 1));
-              (*url)[datalen - (*r_fprlen + 1)] = '\0';
+              memcpy (*r_url,
+                      data + (*r_fprlen + 1), datalen - (*r_fprlen + 1));
+              (*r_url)[datalen - (*r_fprlen + 1)] = '\0';
             }
           else
             *r_url = NULL;

commit f101f34fffee4a02e7a5f62b59667e45e50e8325
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jul 31 16:15:01 2013 +0200

    common: Comment out unused code.
    
    * common/w32-reg.c (write_w32_registry_string): Comment out.

diff --git a/common/w32-reg.c b/common/w32-reg.c
index d3cb815..3ef7a0a 100644
--- a/common/w32-reg.c
+++ b/common/w32-reg.c
@@ -225,6 +225,7 @@ read_w32_registry_string (const char *root, const char *dir, const char *name)
 
 /* Note: This code is not well tested.  However, it is not used in
    GnuPG.  */
+#if 0
 int
 write_w32_registry_string (const char *root, const char *dir,
                            const char *name, const char *value)
@@ -319,5 +320,5 @@ write_w32_registry_string (const char *root, const char *dir,
   return 0;
 #endif /*!HAVE_W32CE_SYSTEM*/
 }
-
+#endif /*0*/
 #endif /*HAVE_W32_SYSTEM*/
diff --git a/common/w32help.h b/common/w32help.h
index 50eda67..b9b7c44 100644
--- a/common/w32help.h
+++ b/common/w32help.h
@@ -35,9 +35,6 @@
 /*-- w32-reg.c --*/
 char *read_w32_registry_string (const char *root,
 				const char *dir, const char *name );
-int write_w32_registry_string (const char *root, const char *dir,
-                               const char *name, const char *value);
-
 
 /* Other stuff.  */
 #ifdef HAVE_W32CE_SYSTEM

commit 2830fcb83c99289a49da0e111766daf2d9a1fa3b
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jul 31 16:14:00 2013 +0200

    dirmngr: Remove unused file.
    
    * dirmngr/get-path.c: Remove.

diff --git a/dirmngr/get-path.c b/dirmngr/get-path.c
deleted file mode 100644
index e5a1fdf..0000000
--- a/dirmngr/get-path.c
+++ /dev/null
@@ -1,620 +0,0 @@
-/* get-path.c - Utility functions for the W32 API
-   Copyright (C) 1999 Free Software Foundation, Inc
-   Copyright (C) 2001 Werner Koch (dd9jn)
-   Copyright (C) 2001, 2002, 2003, 2004, 2007 g10 Code GmbH
-
-   This file is part of DirMngr.
-
-   DirMngr is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   DirMngr is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA  */
-
-#error Code has been replaced by common/homedir.c
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <fcntl.h>
-#ifdef HAVE_W32_SYSTEM
-#include <windows.h>
-#include <shlobj.h>
-#include <io.h>
-#endif
-
-#include "util.h"
-
-#ifdef HAVE_W32_SYSTEM
-#define GNUPG_DEFAULT_HOMEDIR "c:/gnupg"
-#elif defined(__VMS)
-#define GNUPG_DEFAULT_HOMEDIR "/SYS\$LOGIN/gnupg"
-#else
-#define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
-#endif
-
-#ifdef HAVE_DOSISH_SYSTEM
-#define DIRSEP_C '\\'
-#define DIRSEP_S "\\"
-#else
-#define DIRSEP_C '/'
-#define DIRSEP_S "/"
-#endif
-
-

-#ifdef HAVE_W32_SYSTEM
-#define RTLD_LAZY 0
-
-static __inline__ void *
-dlopen (const char * name, int flag)
-{
-  void * hd = LoadLibrary (name);
-  return hd;
-}
-
-static __inline__ void *
-dlsym (void * hd, const char * sym)
-{
-  if (hd && sym)
-    {
-      void * fnc = GetProcAddress (hd, sym);
-      if (!fnc)
-        return NULL;
-      return fnc;
-    }
-  return NULL;
-}
-
-static __inline__ int
-dlclose (void * hd)
-{
-  if (hd)
-    {
-      FreeLibrary (hd);
-      return 0;
-    }
-  return -1;
-}
-
-
-/* Return a string from the W32 Registry or NULL in case of error.
-   Caller must release the return value.  A NULL for root is an alias
-   for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. */
-static char *
-read_w32_registry_string (const char *root, const char *dir, const char *name)
-{
-  HKEY root_key, key_handle;
-  DWORD n1, nbytes, type;
-  char *result = NULL;
-
-  if ( !root )
-    root_key = HKEY_CURRENT_USER;
-  else if ( !strcmp( root, "HKEY_CLASSES_ROOT" ) )
-    root_key = HKEY_CLASSES_ROOT;
-  else if ( !strcmp( root, "HKEY_CURRENT_USER" ) )
-    root_key = HKEY_CURRENT_USER;
-  else if ( !strcmp( root, "HKEY_LOCAL_MACHINE" ) )
-    root_key = HKEY_LOCAL_MACHINE;
-  else if ( !strcmp( root, "HKEY_USERS" ) )
-    root_key = HKEY_USERS;
-  else if ( !strcmp( root, "HKEY_PERFORMANCE_DATA" ) )
-    root_key = HKEY_PERFORMANCE_DATA;
-  else if ( !strcmp( root, "HKEY_CURRENT_CONFIG" ) )
-    root_key = HKEY_CURRENT_CONFIG;
-  else
-    return NULL;
-
-  if ( RegOpenKeyEx ( root_key, dir, 0, KEY_READ, &key_handle ) )
-    {
-      if (root)
-        return NULL; /* no need for a RegClose, so return direct */
-      /* It seems to be common practise to fall back to HKLM. */
-      if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) )
-        return NULL; /* still no need for a RegClose, so return direct */
-    }
-
-  nbytes = 1;
-  if ( RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes ) )
-    {
-      if (root)
-        goto leave;
-      /* Try to fallback to HKLM also vor a missing value.  */
-      RegCloseKey (key_handle);
-      if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) )
-        return NULL; /* Nope.  */
-      if (RegQueryValueEx ( key_handle, name, 0, NULL, NULL, &nbytes))
-        goto leave;
-    }
-  result = malloc ( (n1=nbytes+1) );
-  if ( !result )
-    goto leave;
-  if ( RegQueryValueEx ( key_handle, name, 0, &type, result, &n1 ) )
-    {
-      free(result); result = NULL;
-      goto leave;
-    }
-  result[nbytes] = 0; /* Make sure it is really a string.  */
-  if (type == REG_EXPAND_SZ && strchr (result, '%'))
-    {
-      char *tmp;
-
-      n1 += 1000;
-      tmp = malloc (n1+1);
-      if (!tmp)
-        goto leave;
-      nbytes = ExpandEnvironmentStrings (result, tmp, n1);
-      if (nbytes && nbytes > n1)
-        {
-          free (tmp);
-          n1 = nbytes;
-          tmp = malloc (n1 + 1);
-          if (!tmp)
-            goto leave;
-          nbytes = ExpandEnvironmentStrings (result, tmp, n1);
-          if (nbytes && nbytes > n1) {
-            free (tmp); /* Oops - truncated, better don't expand at all. */
-            goto leave;
-          }
-          tmp[nbytes] = 0;
-          free (result);
-          result = tmp;
-        }
-      else if (nbytes)  /* Okay, reduce the length. */
-        {
-          tmp[nbytes] = 0;
-          free (result);
-          result = malloc (strlen (tmp)+1);
-          if (!result)
-            result = tmp;
-          else
-            {
-              strcpy (result, tmp);
-              free (tmp);
-            }
-        }
-      else  /* Error - don't expand. */
-        {
-          free (tmp);
-        }
-    }
-
- leave:
-  RegCloseKey( key_handle );
-  return result;
-}
-
-
-/* This is a helper function to load and run a Windows function from
-   either of one DLLs. */
-static HRESULT
-w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e)
-{
-  static int initialized;
-  static HRESULT (WINAPI * func)(HWND,int,HANDLE,DWORD,LPSTR);
-
-  if (!initialized)
-    {
-      static char *dllnames[] = { "shell32.dll", "shfolder.dll", NULL };
-      void *handle;
-      int i;
-
-      initialized = 1;
-
-      for (i=0, handle = NULL; !handle && dllnames[i]; i++)
-        {
-          handle = dlopen (dllnames[i], RTLD_LAZY);
-          if (handle)
-            {
-              func = dlsym (handle, "SHGetFolderPathA");
-              if (!func)
-                {
-                  dlclose (handle);
-                  handle = NULL;
-                }
-            }
-        }
-    }
-
-  if (func)
-    return func (a,b,c,d,e);
-  else
-    return -1;
-}
-
-
-#if 0
-static char *
-find_program_in_inst_dir (const char *name)
-{
-  char *result = NULL;
-  char *tmp;
-
-  tmp = read_w32_registry_string ("HKEY_LOCAL_MACHINE",
-				  "Software\\GNU\\GnuPG",
-				  "Install Directory");
-  if (!tmp)
-    return NULL;
-
-  result = malloc (strlen (tmp) + 1 + strlen (name) + 1);
-  if (!result)
-    {
-      free (tmp);
-      return NULL;
-    }
-
-  strcpy (stpcpy (stpcpy (result, tmp), "\\"), name);
-  free (tmp);
-  if (access (result, F_OK))
-    {
-      free (result);
-      return NULL;
-    }
-
-  return result;
-}
-
-
-static char *
-find_program_at_standard_place (const char *name)
-{
-  char path[MAX_PATH];
-  char *result = NULL;
-
-  if (w32_shgetfolderpath (NULL, CSIDL_PROGRAM_FILES, NULL, 0, path) >= 0)
-    {
-      result = malloc (strlen (path) + 1 + strlen (name) + 1);
-      if (result)
-        {
-          strcpy (stpcpy (stpcpy (result, path), "\\"), name);
-          if (access (result, F_OK))
-            {
-              free (result);
-              result = NULL;
-            }
-        }
-    }
-  return result;
-}
-#endif
-#endif
-
-
-const char *
-get_dirmngr_ldap_path (void)
-{
-  static char *pgmname;
-
-#ifdef HAVE_W32_SYSTEM
-  if (! pgmname)
-    {
-      const char *dir = dirmngr_libexecdir ();
-      const char *exe = "\\dirmngr_ldap.exe";
-      pgmname = malloc (strlen (dir) + strlen (exe) + 1);
-      if (pgmname)
-	strcpy (stpcpy (pgmname, dir), exe);
-    }
-#endif
-  if (!pgmname)
-    pgmname = DIRMNGR_LIBEXECDIR "/dirmngr_ldap";
-  return pgmname;
-}
-
-
-

-/* Home directory.  */
-
-#ifdef HAVE_W32_SYSTEM
-#ifndef CSIDL_APPDATA
-#define CSIDL_APPDATA 0x001a
-#endif
-#ifndef CSIDL_LOCAL_APPDATA
-#define CSIDL_LOCAL_APPDATA 0x001c
-#endif
-#ifndef CSIDL_COMMON_APPDATA
-#define CSIDL_COMMON_APPDATA 0x0023
-#endif
-#ifndef CSIDL_FLAG_CREATE
-#define CSIDL_FLAG_CREATE 0x8000
-#endif
-#endif /*HAVE_W32_SYSTEM*/
-
-/* Get the standard home directory.  In general this function should
-   not be used as it does not consider a registry value (under W32) or
-   the GNUPGHOME environment variable.  It is better to use
-   default_homedir(). */
-const char *
-standard_homedir (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  static const char *dir;
-
-  if (!dir)
-    {
-      char path[MAX_PATH];
-
-      /* It might be better to use LOCAL_APPDATA because this is
-         defined as "non roaming" and thus more likely to be kept
-         locally.  For private keys this is desired.  However, given
-         that many users copy private keys anyway forth and back,
-         using a system roaming services might be better than to let
-         them do it manually.  A security conscious user will anyway
-         use the registry entry to have better control.  */
-      if (w32_shgetfolderpath (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
-                               NULL, 0, path) >= 0)
-        {
-          char *tmp = xmalloc (strlen (path) + 6 +1);
-          strcpy (stpcpy (tmp, path), "\\gnupg");
-          dir = tmp;
-
-          /* Try to create the directory if it does not yet exists.  */
-          if (access (dir, F_OK))
-            CreateDirectory (dir, NULL);
-        }
-      else
-        dir = GNUPG_DEFAULT_HOMEDIR;
-    }
-  return dir;
-#else/*!HAVE_W32_SYSTEM*/
-  return GNUPG_DEFAULT_HOMEDIR;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-/* Set up the default home directory.  The usual --homedir option
-   should be parsed later. */
-const char *
-default_homedir (void)
-{
-  const char *dir;
-
-  dir = getenv ("GNUPGHOME");
-#ifdef HAVE_W32_SYSTEM
-  if (!dir || !*dir)
-    {
-      static const char *saved_dir;
-
-      if (!saved_dir)
-        {
-          if (!dir || !*dir)
-            {
-              char *tmp;
-
-              tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
-                                              "HomeDir");
-              if (tmp && *tmp)
-                {
-                  xfree (tmp);
-                  tmp = NULL;
-                }
-               if (tmp)
-                saved_dir = tmp;
-            }
-
-          if (!saved_dir)
-            saved_dir = standard_homedir ();
-        }
-      dir = saved_dir;
-    }
-#endif /*HAVE_W32_SYSTEM*/
-  if (!dir || !*dir)
-    dir = GNUPG_DEFAULT_HOMEDIR;
-
-  return dir;
-}
-
-
-#ifdef HAVE_W32_SYSTEM
-static const char *
-w32_rootdir (void)
-{
-  static int got_dir;
-  static char dir[MAX_PATH+5];
-
-  if (!got_dir)
-    {
-      char *p;
-
-      if ( !GetModuleFileName ( NULL, dir, MAX_PATH) )
-        {
-          log_debug ("GetModuleFileName failed: %s\n", w32_strerror (0));
-          *dir = 0;
-        }
-      got_dir = 1;
-      p = strrchr (dir, DIRSEP_C);
-      if (p)
-        *p = 0;
-      else
-        {
-          log_debug ("bad filename '%s' returned for this process\n", dir);
-          *dir = 0;
-        }
-    }
-
-  if (*dir)
-    return dir;
-  /* Fallback to the hardwired value. */
-  return DIRMNGR_LIBEXECDIR;
-}
-
-static const char *
-w32_commondir (void)
-{
-  static char *dir;
-
-  if (!dir)
-    {
-      char path[MAX_PATH];
-
-      if (w32_shgetfolderpath (NULL, CSIDL_COMMON_APPDATA,
-                               NULL, 0, path) >= 0)
-        {
-          char *tmp = xmalloc (strlen (path) + 4 +1);
-          strcpy (stpcpy (tmp, path), "\\GNU");
-          dir = tmp;
-          /* No auto create of the directory.  Either the installer or
-             the admin has to create these directories.  */
-        }
-      else
-        {
-          /* Ooops: Not defined - probably an old Windows version.
-             Use the installation directory instead.  */
-          dir = xstrdup (w32_rootdir ());
-        }
-    }
-
-  return dir;
-}
-#endif /*HAVE_W32_SYSTEM*/
-
-
-
-
-/* Return the name of the sysconfdir.  This is a static string.  This
-   function is required because under Windows we can't simply compile
-   it in.  */
-const char *
-dirmngr_sysconfdir (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  static char *name;
-
-  if (!name)
-    {
-      const char *s1, *s2;
-      s1 = w32_commondir ();
-      s2 = DIRSEP_S "etc" DIRSEP_S "dirmngr";
-      name = xmalloc (strlen (s1) + strlen (s2) + 1);
-      strcpy (stpcpy (name, s1), s2);
-    }
-  return name;
-#else /*!HAVE_W32_SYSTEM*/
-  return DIRMNGR_SYSCONFDIR;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-
-/* Return the name of the libexec directory.  The name is allocated in
-   a static area on the first use.  This function won't fail. */
-const char *
-dirmngr_libexecdir (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  return w32_rootdir ();
-#else /*!HAVE_W32_SYSTEM*/
-  return DIRMNGR_LIBEXECDIR;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-
-const char *
-dirmngr_datadir (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  static char *name;
-
-  if (!name)
-    {
-      const char *s1, *s2;
-      s1 = w32_commondir ();
-      s2 = DIRSEP_S "lib" DIRSEP_S "dirmngr";
-      name = xmalloc (strlen (s1) + strlen (s2) + 1);
-      strcpy (stpcpy (name, s1), s2);
-    }
-  return name;
-#else /*!HAVE_W32_SYSTEM*/
-  return DIRMNGR_DATADIR;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-
-const char *
-dirmngr_cachedir (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  static const char *dir;
-
-  if (!dir)
-    {
-      char path[MAX_PATH];
-      const char *s1[] = { "GNU", "cache", "dirmngr", NULL };
-      int s1_len;
-      const char **comp;
-
-      s1_len = 0;
-      for (comp = s1; *comp; comp++)
-	{
-	  /* Take account for the separator.  */
-	  s1_len += 1 + strlen (*comp);
-	}
-
-      if (w32_shgetfolderpath (NULL, CSIDL_LOCAL_APPDATA|CSIDL_FLAG_CREATE,
-                               NULL, 0, path) >= 0)
-        {
-          char *tmp = xmalloc (strlen (path) + s1_len + 1);
-	  char *p;
-
-	  p = stpcpy (tmp, path);
-          for (comp = s1; *comp; comp++)
-	    {
-	      p = stpcpy (p, "\\");
-	      p = stpcpy (p, *comp);
-
-	      if (access (tmp, F_OK))
-		CreateDirectory (tmp, NULL);
-	    }
-
-          dir = tmp;
-        }
-      else
-        dir = "c:\\temp\\cache\\dirmngr";
-    }
-  return dir;
-#else /*!HAVE_W32_SYSTEM*/
-  return DIRMNGR_CACHEDIR;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-
-const char *
-default_socket_name (void)
-{
-#ifdef HAVE_W32_SYSTEM
-  static char *name;
-
-  if (!name)
-    {
-      char s1[MAX_PATH];
-      const char *s2;
-
-      /* We need something akin CSIDL_COMMON_PROGRAMS, but local
-	 (non-roaming).  This is becuase the file needs to be on the
-	 local machine and makes only sense on that machine.
-	 CSIDL_WINDOWS seems to be the only location which guarantees
-	 that. */
-      if (w32_shgetfolderpath (NULL, CSIDL_WINDOWS, NULL, 0, s1) < 0)
-	strcpy (s1, "C:\\WINDOWS");
-      s2 = DIRSEP_S "S.dirmngr";
-      name = xmalloc (strlen (s1) + strlen (s2) + 1);
-      strcpy (stpcpy (name, s1), s2);
-    }
-  return name;
-#else /*!HAVE_W32_SYSTEM*/
-  return DIRMNGR_SOCKETDIR "/socket";
-#endif /*!HAVE_W32_SYSTEM*/
-}

commit f254497e09fa4e0e24e63d14f7316fc31c938844
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jun 27 11:40:12 2013 +0200

    sm: Remove cruft from source files.
    
    * sm/keydb.c, sm/keydb.h: Remove disabled code parts.

diff --git a/sm/keydb.c b/sm/keydb.c
index 6912b42..de9c95c 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -477,113 +477,6 @@ unlock_all (KEYDB_HANDLE hd)
 }
 
 

-#if 0
-/*
- * Return the last found keybox.  Caller must free it.
- * The returned keyblock has the kbode flag bit 0 set for the node with
- * the public key used to locate the keyblock or flag bit 1 set for
- * the user ID node.
- */
-int
-keydb_get_keyblock (KEYDB_HANDLE hd, KBNODE *ret_kb)
-{
-    int rc = 0;
-
-    if (!hd)
-        return G10ERR_INV_ARG;
-
-    if ( hd->found < 0 || hd->found >= hd->used)
-        return -1; /* nothing found */
-
-    switch (hd->active[hd->found].type) {
-      case KEYDB_RESOURCE_TYPE_NONE:
-        rc = G10ERR_GENERAL; /* oops */
-        break;
-      case KEYDB_RESOURCE_TYPE_KEYBOX:
-        rc = keybox_get_keyblock (hd->active[hd->found].u.kr, ret_kb);
-        break;
-    }
-
-    return rc;
-}
-
-/*
- * update the current keyblock with KB
- */
-int
-keydb_update_keyblock (KEYDB_HANDLE hd, KBNODE kb)
-{
-    int rc = 0;
-
-    if (!hd)
-        return G10ERR_INV_ARG;
-
-    if ( hd->found < 0 || hd->found >= hd->used)
-        return -1; /* nothing found */
-
-    if( opt.dry_run )
-	return 0;
-
-    if (!hd->locked)
-      return gpg_error (GPG_ERR_NOT_LOCKED);
-
-    switch (hd->active[hd->found].type) {
-      case KEYDB_RESOURCE_TYPE_NONE:
-        rc = G10ERR_GENERAL; /* oops */
-        break;
-      case KEYDB_RESOURCE_TYPE_KEYBOX:
-        rc = keybox_update_keyblock (hd->active[hd->found].u.kr, kb);
-        break;
-    }
-
-    unlock_all (hd);
-    return rc;
-}
-
-
-/*
- * Insert a new KB into one of the resources.
- */
-int
-keydb_insert_keyblock (KEYDB_HANDLE hd, KBNODE kb)
-{
-    int rc = -1;
-    int idx;
-
-    if (!hd)
-        return G10ERR_INV_ARG;
-
-    if( opt.dry_run )
-	return 0;
-
-    if ( hd->found >= 0 && hd->found < hd->used)
-        idx = hd->found;
-    else if ( hd->current >= 0 && hd->current < hd->used)
-        idx = hd->current;
-    else
-        return G10ERR_GENERAL;
-
-    rc = lock_all (hd);
-    if (rc)
-        return rc;
-
-    switch (hd->active[idx].type) {
-      case KEYDB_RESOURCE_TYPE_NONE:
-        rc = G10ERR_GENERAL; /* oops */
-        break;
-      case KEYDB_RESOURCE_TYPE_KEYBOX:
-        rc = keybox_insert_keyblock (hd->active[idx].u.kr, kb);
-        break;
-    }
-
-    unlock_all (hd);
-    return rc;
-}
-
-#endif /*disabled code*/
-
-
-

 /*
   Return the last found object.  Caller must free it.  The returned
   keyblock has the kbode flag bit 0 set for the node with the public
diff --git a/sm/keydb.h b/sm/keydb.h
index 33876ce..6e432f8 100644
--- a/sm/keydb.h
+++ b/sm/keydb.h
@@ -39,12 +39,6 @@ int keydb_set_ephemeral (KEYDB_HANDLE hd, int yes);
 const char *keydb_get_resource_name (KEYDB_HANDLE hd);
 gpg_error_t keydb_lock (KEYDB_HANDLE hd);
 
-#if 0 /* pgp stuff */
-int keydb_get_keyblock (KEYDB_HANDLE hd, KBNODE *ret_kb);
-int keydb_update_keyblock (KEYDB_HANDLE hd, KBNODE kb);
-int keydb_insert_keyblock (KEYDB_HANDLE hd, KBNODE kb);
-#endif
-
 gpg_error_t keydb_get_flags (KEYDB_HANDLE hd, int which, int idx,
                              unsigned int *value);
 gpg_error_t keydb_set_flags (KEYDB_HANDLE hd, int which, int idx,

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

Summary of changes:
 NEWS                 |    4 +-
 agent/protect.c      |    1 +
 autogen.sh           |    2 +-
 common/dns-cert.c    |    9 +-
 common/homedir.c     |  241 +++++++++++++++-----
 common/logging.c     |   16 ++-
 common/logging.h     |    1 +
 common/w32-reg.c     |    3 +-
 common/w32help.h     |    3 -
 configure.ac         |    3 +
 dirmngr/get-path.c   |  620 --------------------------------------------------
 dirmngr/ldap-url.c   |    5 +
 doc/opt-homedir.texi |   14 +-
 scd/apdu.c           |    2 +-
 sm/keydb.c           |  107 ---------
 sm/keydb.h           |    6 -
 16 files changed, 232 insertions(+), 805 deletions(-)
 delete mode 100644 dirmngr/get-path.c


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




More information about the Gnupg-commits mailing list