aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon-tkm
diff options
context:
space:
mode:
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>2012-12-18 17:15:58 +0100
committerTobias Brunner <tobias@strongswan.org>2013-03-19 15:23:50 +0100
commit140a6b7b34f5f0f7694da74195fd90454298c9a6 (patch)
tree424da8dbca81e254294ce0083283e343ab5af0cd /src/charon-tkm
parentf47ea969f88ad0d8a827cf99bf73472a7f29f07c (diff)
downloadstrongswan-140a6b7b34f5f0f7694da74195fd90454298c9a6.tar.bz2
strongswan-140a6b7b34f5f0f7694da74195fd90454298c9a6.tar.xz
Make IKE and EES sockets configurable
The IKE and EES sockets are now read from strongswan.conf. They can be specified like this: charon-tkm { ike_socket = /tmp/tkm.rpc.ike ees_socket = /tmp/tkm.rpc.ees } The socket names given above are used by default if none are configured.
Diffstat (limited to 'src/charon-tkm')
-rw-r--r--src/charon-tkm/src/tkm/tkm.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/charon-tkm/src/tkm/tkm.c b/src/charon-tkm/src/tkm/tkm.c
index 47e1eb963..9cf54b087 100644
--- a/src/charon-tkm/src/tkm/tkm.c
+++ b/src/charon-tkm/src/tkm/tkm.c
@@ -14,6 +14,8 @@
* for more details.
*/
+#include <daemon.h>
+
#include <tkm/client.h>
#include <tkm/constants.h>
@@ -61,16 +63,25 @@ bool tkm_init()
/* initialize TKM client library */
tkmlib_init();
-
ehandler_init();
- if (ike_init(IKE_SOCKET) != TKM_OK)
+ const char * const ikesock = lib->settings->get_str(lib->settings,
+ "%s.ike_socket",
+ IKE_SOCKET,
+ charon->name);
+ if (ike_init(ikesock) != TKM_OK)
{
tkmlib_final();
return FALSE;
}
-
- ees_server_init(EES_SOCKET);
+ DBG1(DBG_DMN, "connected to TKM via socket '%s'", ikesock);
+
+ const char * const eessock = lib->settings->get_str(lib->settings,
+ "%s.ees_socket",
+ EES_SOCKET,
+ charon->name);
+ ees_server_init(eessock);
+ DBG1(DBG_DMN, "serving EES requests on socket '%s'", eessock);
if (ike_tkm_reset() != TKM_OK)
{