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.
This commit is contained in:
committed by
Tobias Brunner
parent
f47ea969f8
commit
140a6b7b34
@@ -14,6 +14,8 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <daemon.h>
|
||||||
|
|
||||||
#include <tkm/client.h>
|
#include <tkm/client.h>
|
||||||
#include <tkm/constants.h>
|
#include <tkm/constants.h>
|
||||||
|
|
||||||
@@ -61,16 +63,25 @@ bool tkm_init()
|
|||||||
|
|
||||||
/* initialize TKM client library */
|
/* initialize TKM client library */
|
||||||
tkmlib_init();
|
tkmlib_init();
|
||||||
|
|
||||||
ehandler_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();
|
tkmlib_final();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
DBG1(DBG_DMN, "connected to TKM via socket '%s'", ikesock);
|
||||||
|
|
||||||
ees_server_init(EES_SOCKET);
|
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)
|
if (ike_tkm_reset() != TKM_OK)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user