summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-08-14 18:50:27 +0200
committerWerner Koch <wk@gnupg.org>2007-08-14 18:50:27 +0200
commitd20d11a0eeb306feb9c256eadd1b4b606b15934e (patch)
tree9d5671631dc8599fa44aafd9572b1c282ddb4110 /common
parentImplemented the chain model for X.509 validation. (diff)
downloadgnupg2-d20d11a0eeb306feb9c256eadd1b4b606b15934e.tar.xz
gnupg2-d20d11a0eeb306feb9c256eadd1b4b606b15934e.zip
Documentaion updates.
Support doe Dirmngr under W32. Fixed a yat2m bug.
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog4
-rw-r--r--common/homedir.c23
-rw-r--r--common/util.h1
3 files changed, 28 insertions, 0 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index f963e5282..3a54c8683 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-14 Werner Koch <wk@g10code.com>
+
+ * homedir.c (dirmngr_socket_name): New.
+
2007-08-07 Werner Koch <wk@g10code.com>
* tlv.c, tlv.h: Move from ../scd/.
diff --git a/common/homedir.c b/common/homedir.c
index 212c3509d..52206191e 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -290,6 +290,29 @@ gnupg_datadir (void)
}
+/* Return the default socket name used by DirMngr. */
+const char *
+dirmngr_socket_name (void)
+{
+#ifdef HAVE_W32_SYSTEM
+ static char *name;
+
+ if (!name)
+ {
+ const char *s1, *s2;
+ s1 = w32_rootdir ();
+ s2 = DIRSEP_S "S.dirmngr";
+ name = xmalloc (strlen (s1) + strlen (s2) + 1);
+ strcpy (stpcpy (name, s1), s2);
+ }
+ return name;
+#else /*!HAVE_W32_SYSTEM*/
+ return "/var/run/dirmngr/socket";
+#endif /*!HAVE_W32_SYSTEM*/
+}
+
+
+
/* Return the file name of a helper tool. WHICH is one of the
GNUPG_MODULE_NAME_foo constants. */
const char *
diff --git a/common/util.h b/common/util.h
index 9821d6ab6..ad398ac97 100644
--- a/common/util.h
+++ b/common/util.h
@@ -178,6 +178,7 @@ const char *gnupg_bindir (void);
const char *gnupg_libexecdir (void);
const char *gnupg_libdir (void);
const char *gnupg_datadir (void);
+const char *dirmngr_socket_name (void);
#define GNUPG_MODULE_NAME_AGENT 1
#define GNUPG_MODULE_NAME_PINENTRY 2