aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2013-03-31 16:37:30 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2013-03-31 16:37:30 +0200
commit45e2be239910e67422564ef123c7b21da6916f0d (patch)
treeb1f41faf459a003202877331329d6e1fa150c5cc /src
parentbde8e287d9bdc91ab29685276e9f80f85f6c23d4 (diff)
downloadstrongswan-45e2be239910e67422564ef123c7b21da6916f0d.tar.bz2
strongswan-45e2be239910e67422564ef123c7b21da6916f0d.tar.xz
renamed tnc_ifmap2 plugin to tnc_ifmap
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/Makefile.am6
-rw-r--r--src/libcharon/plugins/tnc_ifmap/Makefile.am27
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.c (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.c)34
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.h)22
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.c)38
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.h (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.h)16
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.c)102
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.h (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.h)34
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.c (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.c)28
-rw-r--r--src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h (renamed from src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.h)26
-rw-r--r--src/libcharon/plugins/tnc_ifmap2/Makefile.am27
11 files changed, 180 insertions, 180 deletions
diff --git a/src/libcharon/Makefile.am b/src/libcharon/Makefile.am
index b817bdb4e..f0736c5ca 100644
--- a/src/libcharon/Makefile.am
+++ b/src/libcharon/Makefile.am
@@ -373,10 +373,10 @@ if MONOLITHIC
endif
endif
-if USE_TNC_IFMAP2
- SUBDIRS += plugins/tnc_ifmap2
+if USE_TNC_IFMAP
+ SUBDIRS += plugins/tnc_ifmap
if MONOLITHIC
- libcharon_la_LIBADD += plugins/tnc_ifmap2/libstrongswan-tnc-ifmap2.la
+ libcharon_la_LIBADD += plugins/tnc_ifmap/libstrongswan-tnc-ifmap.la
endif
endif
diff --git a/src/libcharon/plugins/tnc_ifmap/Makefile.am b/src/libcharon/plugins/tnc_ifmap/Makefile.am
new file mode 100644
index 000000000..d055bbcbd
--- /dev/null
+++ b/src/libcharon/plugins/tnc_ifmap/Makefile.am
@@ -0,0 +1,27 @@
+
+INCLUDES = \
+ -I$(top_srcdir)/src/libstrongswan \
+ -I$(top_srcdir)/src/libtls \
+ -I$(top_srcdir)/src/libhydra \
+ -I$(top_srcdir)/src/libcharon \
+ ${xml_CFLAGS}
+
+AM_CFLAGS = -rdynamic
+
+if MONOLITHIC
+noinst_LTLIBRARIES = libstrongswan-tnc-ifmap.la
+else
+plugin_LTLIBRARIES = libstrongswan-tnc-ifmap.la
+endif
+
+libstrongswan_tnc_ifmap_la_LIBADD = \
+ $(top_builddir)/src/libtls/libtls.la ${xml_LIBS}
+
+libstrongswan_tnc_ifmap_la_SOURCES = \
+ tnc_ifmap_plugin.h tnc_ifmap_plugin.c \
+ tnc_ifmap_listener.h tnc_ifmap_listener.c \
+ tnc_ifmap_soap.h tnc_ifmap_soap.c \
+ tnc_ifmap_soap_msg.h tnc_ifmap_soap_msg.c
+
+libstrongswan_tnc_ifmap_la_LDFLAGS = -module -avoid-version
+
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.c
index 4922a3ecc..0280b30d2 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.c
@@ -13,36 +13,36 @@
* for more details.
*/
-#include "tnc_ifmap2_listener.h"
-#include "tnc_ifmap2_soap.h"
+#include "tnc_ifmap_listener.h"
+#include "tnc_ifmap_soap.h"
#include <daemon.h>
#include <hydra.h>
#include <utils/debug.h>
-typedef struct private_tnc_ifmap2_listener_t private_tnc_ifmap2_listener_t;
+typedef struct private_tnc_ifmap_listener_t private_tnc_ifmap_listener_t;
/**
- * Private data of an tnc_ifmap2_listener_t object.
+ * Private data of an tnc_ifmap_listener_t object.
*/
-struct private_tnc_ifmap2_listener_t {
+struct private_tnc_ifmap_listener_t {
/**
- * Public tnc_ifmap2_listener_t interface.
+ * Public tnc_ifmap_listener_t interface.
*/
- tnc_ifmap2_listener_t public;
+ tnc_ifmap_listener_t public;
/**
* TNC IF-MAP 2.0 SOAP interface
*/
- tnc_ifmap2_soap_t *ifmap;
+ tnc_ifmap_soap_t *ifmap;
};
/**
* Publish PEP device-ip metadata
*/
-static bool publish_device_ip_addresses(private_tnc_ifmap2_listener_t *this)
+static bool publish_device_ip_addresses(private_tnc_ifmap_listener_t *this)
{
enumerator_t *enumerator;
host_t *host;
@@ -66,7 +66,7 @@ static bool publish_device_ip_addresses(private_tnc_ifmap2_listener_t *this)
/**
* Publish all IKE_SA metadata
*/
-static bool reload_metadata(private_tnc_ifmap2_listener_t *this)
+static bool reload_metadata(private_tnc_ifmap_listener_t *this)
{
enumerator_t *enumerator;
ike_sa_t *ike_sa;
@@ -92,7 +92,7 @@ static bool reload_metadata(private_tnc_ifmap2_listener_t *this)
}
METHOD(listener_t, ike_updown, bool,
- private_tnc_ifmap2_listener_t *this, ike_sa_t *ike_sa, bool up)
+ private_tnc_ifmap_listener_t *this, ike_sa_t *ike_sa, bool up)
{
if (ike_sa->get_state(ike_sa) != IKE_CONNECTING)
{
@@ -102,7 +102,7 @@ METHOD(listener_t, ike_updown, bool,
}
METHOD(listener_t, alert, bool,
- private_tnc_ifmap2_listener_t *this, ike_sa_t *ike_sa, alert_t alert,
+ private_tnc_ifmap_listener_t *this, ike_sa_t *ike_sa, alert_t alert,
va_list args)
{
if (alert == ALERT_PEER_AUTH_FAILED)
@@ -114,8 +114,8 @@ METHOD(listener_t, alert, bool,
return TRUE;
}
-METHOD(tnc_ifmap2_listener_t, destroy, void,
- private_tnc_ifmap2_listener_t *this)
+METHOD(tnc_ifmap_listener_t, destroy, void,
+ private_tnc_ifmap_listener_t *this)
{
DESTROY_IF(this->ifmap);
free(this);
@@ -124,9 +124,9 @@ METHOD(tnc_ifmap2_listener_t, destroy, void,
/**
* See header
*/
-tnc_ifmap2_listener_t *tnc_ifmap2_listener_create(bool reload)
+tnc_ifmap_listener_t *tnc_ifmap_listener_create(bool reload)
{
- private_tnc_ifmap2_listener_t *this;
+ private_tnc_ifmap_listener_t *this;
INIT(this,
.public = {
@@ -136,7 +136,7 @@ tnc_ifmap2_listener_t *tnc_ifmap2_listener_create(bool reload)
},
.destroy = _destroy,
},
- .ifmap = tnc_ifmap2_soap_create(),
+ .ifmap = tnc_ifmap_soap_create(),
);
if (!this->ifmap)
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h
index dfb8adcd5..4ecccf4df 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_listener.h
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h
@@ -14,21 +14,21 @@
*/
/**
- * @defgroup tnc_ifmap2_listener tnc_ifmap2_listener
- * @{ @ingroup tnc_ifmap2
+ * @defgroup tnc_ifmap_listener tnc_ifmap_listener
+ * @{ @ingroup tnc_ifmap
*/
-#ifndef TNC_IFMAP2_LISTENER_H_
-#define TNC_IFMAP2_LISTENER_H_
+#ifndef TNC_IFMAP_LISTENER_H_
+#define TNC_IFMAP_LISTENER_H_
#include <bus/bus.h>
-typedef struct tnc_ifmap2_listener_t tnc_ifmap2_listener_t;
+typedef struct tnc_ifmap_listener_t tnc_ifmap_listener_t;
/**
* Listener which collects information on IKE_SAs
*/
-struct tnc_ifmap2_listener_t {
+struct tnc_ifmap_listener_t {
/**
* Implements listener_t.
@@ -36,16 +36,16 @@ struct tnc_ifmap2_listener_t {
listener_t listener;
/**
- * Destroy a tnc_ifmap2_listener_t.
+ * Destroy a tnc_ifmap_listener_t.
*/
- void (*destroy)(tnc_ifmap2_listener_t *this);
+ void (*destroy)(tnc_ifmap_listener_t *this);
};
/**
- * Create a tnc_ifmap2_listener instance.
+ * Create a tnc_ifmap_listener instance.
*
* @param reload reload all IKE_SA metadata
*/
-tnc_ifmap2_listener_t *tnc_ifmap2_listener_create(bool reload);
+tnc_ifmap_listener_t *tnc_ifmap_listener_create(bool reload);
-#endif /** TNC_IFMAP2_LISTENER_H_ @}*/
+#endif /** TNC_IFMAP_LISTENER_H_ @}*/
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
index 8969c116e..c9e84241c 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
@@ -13,44 +13,44 @@
* for more details.
*/
-#include "tnc_ifmap2_plugin.h"
-#include "tnc_ifmap2_listener.h"
+#include "tnc_ifmap_plugin.h"
+#include "tnc_ifmap_listener.h"
#include <daemon.h>
-typedef struct private_tnc_ifmap2_plugin_t private_tnc_ifmap2_plugin_t;
+typedef struct private_tnc_ifmap_plugin_t private_tnc_ifmap_plugin_t;
/**
- * private data of tnc_ifmap2 plugin
+ * private data of tnc_ifmap plugin
*/
-struct private_tnc_ifmap2_plugin_t {
+struct private_tnc_ifmap_plugin_t {
/**
* implements plugin interface
*/
- tnc_ifmap2_plugin_t public;
+ tnc_ifmap_plugin_t public;
/**
* Listener interface, listens to CHILD_SA state changes
*/
- tnc_ifmap2_listener_t *listener;
+ tnc_ifmap_listener_t *listener;
};
METHOD(plugin_t, get_name, char*,
- private_tnc_ifmap2_plugin_t *this)
+ private_tnc_ifmap_plugin_t *this)
{
- return "tnc-ifmap2";
+ return "tnc-ifmap";
}
/**
- * Register tnc_ifmap2 plugin features
+ * Register tnc_ifmap plugin features
*/
-static bool register_tnc_ifmap2(private_tnc_ifmap2_plugin_t *this,
+static bool register_tnc_ifmap(private_tnc_ifmap_plugin_t *this,
plugin_feature_t *feature, bool reg, void *data)
{
if (reg)
{
- this->listener = tnc_ifmap2_listener_create(FALSE);
+ this->listener = tnc_ifmap_listener_create(FALSE);
if (!this->listener)
{
return FALSE;
@@ -69,10 +69,10 @@ static bool register_tnc_ifmap2(private_tnc_ifmap2_plugin_t *this,
}
METHOD(plugin_t, get_features, int,
- tnc_ifmap2_plugin_t *this, plugin_feature_t *features[])
+ tnc_ifmap_plugin_t *this, plugin_feature_t *features[])
{
static plugin_feature_t f[] = {
- PLUGIN_CALLBACK((plugin_feature_callback_t)register_tnc_ifmap2, NULL),
+ PLUGIN_CALLBACK((plugin_feature_callback_t)register_tnc_ifmap, NULL),
PLUGIN_PROVIDE(CUSTOM, "tnc-ifmap-2.1"),
PLUGIN_SDEPEND(CERT_DECODE, CERT_X509),
PLUGIN_SDEPEND(PRIVKEY, KEY_RSA),
@@ -82,7 +82,7 @@ METHOD(plugin_t, get_features, int,
}
METHOD(plugin_t, reload, bool,
- private_tnc_ifmap2_plugin_t *this)
+ private_tnc_ifmap_plugin_t *this)
{
if (this->listener)
{
@@ -90,7 +90,7 @@ METHOD(plugin_t, reload, bool,
this->listener->destroy(this->listener);
}
- this->listener = tnc_ifmap2_listener_create(TRUE);
+ this->listener = tnc_ifmap_listener_create(TRUE);
if (!this->listener)
{
return FALSE;
@@ -101,7 +101,7 @@ METHOD(plugin_t, reload, bool,
}
METHOD(plugin_t, destroy, void,
- private_tnc_ifmap2_plugin_t *this)
+ private_tnc_ifmap_plugin_t *this)
{
free(this);
}
@@ -109,9 +109,9 @@ METHOD(plugin_t, destroy, void,
/*
* see header file
*/
-plugin_t *tnc_ifmap2_plugin_create()
+plugin_t *tnc_ifmap_plugin_create()
{
- private_tnc_ifmap2_plugin_t *this;
+ private_tnc_ifmap_plugin_t *this;
INIT(this,
.public = {
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.h
index 387daa635..d3bba7f9c 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_plugin.h
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.h
@@ -14,24 +14,24 @@
*/
/**
- * @defgroup tnc_ifmap2 tnc_ifmap2
+ * @defgroup tnc_ifmap tnc_ifmap
* @ingroup cplugins
*
- * @defgroup tnc_ifmap2_plugin tnc_ifmap2_plugin
- * @{ @ingroup tnc_ifmap2
+ * @defgroup tnc_ifmap_plugin tnc_ifmap_plugin
+ * @{ @ingroup tnc_ifmap
*/
-#ifndef TNC_IFMAP2_PLUGIN_H_
-#define TNC_IFMAP2_PLUGIN_H_
+#ifndef TNC_IFMAP_PLUGIN_H_
+#define TNC_IFMAP_PLUGIN_H_
#include <plugins/plugin.h>
-typedef struct tnc_ifmap2_plugin_t tnc_ifmap2_plugin_t;
+typedef struct tnc_ifmap_plugin_t tnc_ifmap_plugin_t;
/**
* TNC IF-MAP plugin
*/
-struct tnc_ifmap2_plugin_t {
+struct tnc_ifmap_plugin_t {
/**
* implements plugin interface
@@ -39,4 +39,4 @@ struct tnc_ifmap2_plugin_t {
plugin_t plugin;
};
-#endif /** TNC_IFMAP2_PLUGIN_H_ @}*/
+#endif /** TNC_IFMAP_PLUGIN_H_ @}*/
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c
index 887a781bf..bce4156c3 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c
@@ -13,8 +13,8 @@
* for more details.
*/
-#include "tnc_ifmap2_soap.h"
-#include "tnc_ifmap2_soap_msg.h"
+#include "tnc_ifmap_soap.h"
+#include "tnc_ifmap_soap_msg.h"
#include <utils/debug.h>
#include <credentials/sets/mem_cred.h>
@@ -32,17 +32,17 @@
#define IFMAP_URI "https://localhost:8444/imap"
#define IFMAP_NO_FD -1
-typedef struct private_tnc_ifmap2_soap_t private_tnc_ifmap2_soap_t;
+typedef struct private_tnc_ifmap_soap_t private_tnc_ifmap_soap_t;
/**
- * Private data of an tnc_ifmap2_soap_t object.
+ * Private data of an tnc_ifmap_soap_t object.
*/
-struct private_tnc_ifmap2_soap_t {
+struct private_tnc_ifmap_soap_t {
/**
- * Public tnc_ifmap2_soap_t interface.
+ * Public tnc_ifmap_soap_t interface.
*/
- tnc_ifmap2_soap_t public;
+ tnc_ifmap_soap_t public;
/**
* SOAP Session ID
@@ -101,10 +101,10 @@ struct private_tnc_ifmap2_soap_t {
};
-METHOD(tnc_ifmap2_soap_t, newSession, bool,
- private_tnc_ifmap2_soap_t *this)
+METHOD(tnc_ifmap_soap_t, newSession, bool,
+ private_tnc_ifmap_soap_t *this)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request, result;
/*build newSession request */
@@ -112,7 +112,7 @@ METHOD(tnc_ifmap2_soap_t, newSession, bool,
this->ns = xmlNewNs(request, IFMAP_NS, "ifmap");
xmlSetNs(request, this->ns);
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
if (!soap_msg->post(soap_msg, request, "newSessionResult", &result))
{
soap_msg->destroy(soap_msg);
@@ -129,17 +129,17 @@ METHOD(tnc_ifmap2_soap_t, newSession, bool,
/* set PEP and PDP device name (defaults to IF-MAP Publisher ID) */
this->device_name = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.device_name",
+ "%s.plugins.tnc-ifmap.device_name",
this->ifmap_publisher_id, charon->name);
this->device_name = strdup(this->device_name);
return this->session_id && this->ifmap_publisher_id;
}
-METHOD(tnc_ifmap2_soap_t, purgePublisher, bool,
- private_tnc_ifmap2_soap_t *this)
+METHOD(tnc_ifmap_soap_t, purgePublisher, bool,
+ private_tnc_ifmap_soap_t *this)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request;
bool success;
@@ -150,7 +150,7 @@ METHOD(tnc_ifmap2_soap_t, purgePublisher, bool,
xmlNewProp(request, "session-id", this->session_id);
xmlNewProp(request, "ifmap-publisher-id", this->ifmap_publisher_id);
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
success = soap_msg->post(soap_msg, request, "purgePublisherReceived", NULL);
soap_msg->destroy(soap_msg);
@@ -160,7 +160,7 @@ METHOD(tnc_ifmap2_soap_t, purgePublisher, bool,
/**
* Create an access-request based on device_name and ike_sa_id
*/
-static xmlNodePtr create_access_request(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_access_request(private_tnc_ifmap_soap_t *this,
u_int32_t id)
{
xmlNodePtr node;
@@ -177,7 +177,7 @@ static xmlNodePtr create_access_request(private_tnc_ifmap2_soap_t *this,
/**
* Create an identity
*/
-static xmlNodePtr create_identity(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_identity(private_tnc_ifmap_soap_t *this,
identification_t *id, bool is_user)
{
xmlNodePtr node;
@@ -223,7 +223,7 @@ static xmlNodePtr create_identity(private_tnc_ifmap2_soap_t *this,
/**
* Create enforcement-report metadata
*/
-static xmlNodePtr create_enforcement_report(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_enforcement_report(private_tnc_ifmap_soap_t *this,
xmlChar *action, xmlChar *reason)
{
xmlNodePtr node, node2, node3;
@@ -247,7 +247,7 @@ static xmlNodePtr create_enforcement_report(private_tnc_ifmap2_soap_t *this,
/**
* Create delete filter
*/
-static xmlNodePtr create_delete_filter(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_delete_filter(private_tnc_ifmap_soap_t *this,
char *metadata)
{
xmlNodePtr node;
@@ -265,7 +265,7 @@ static xmlNodePtr create_delete_filter(private_tnc_ifmap2_soap_t *this,
/**
* Create a publish request
*/
-static xmlNodePtr create_publish_request(private_tnc_ifmap2_soap_t *this)
+static xmlNodePtr create_publish_request(private_tnc_ifmap_soap_t *this)
{
xmlNodePtr request;
@@ -281,7 +281,7 @@ static xmlNodePtr create_publish_request(private_tnc_ifmap2_soap_t *this)
/**
* Create a device
*/
-static xmlNodePtr create_device(private_tnc_ifmap2_soap_t *this)
+static xmlNodePtr create_device(private_tnc_ifmap_soap_t *this)
{
xmlNodePtr node, node2;
@@ -296,7 +296,7 @@ static xmlNodePtr create_device(private_tnc_ifmap2_soap_t *this)
/**
* Create an ip-address
*/
-static xmlNodePtr create_ip_address(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_ip_address(private_tnc_ifmap_soap_t *this,
host_t *host)
{
xmlNodePtr node;
@@ -343,7 +343,7 @@ static xmlNodePtr create_ip_address(private_tnc_ifmap2_soap_t *this,
/**
* Create metadata
*/
-static xmlNodePtr create_metadata(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_metadata(private_tnc_ifmap_soap_t *this,
xmlChar *metadata)
{
xmlNodePtr node, node2;
@@ -359,7 +359,7 @@ static xmlNodePtr create_metadata(private_tnc_ifmap2_soap_t *this,
/**
* Create capability metadata
*/
-static xmlNodePtr create_capability(private_tnc_ifmap2_soap_t *this,
+static xmlNodePtr create_capability(private_tnc_ifmap_soap_t *this,
identification_t *name)
{
xmlNodePtr node, node2;
@@ -379,10 +379,10 @@ static xmlNodePtr create_capability(private_tnc_ifmap2_soap_t *this,
return node;
}
-METHOD(tnc_ifmap2_soap_t, publish_ike_sa, bool,
- private_tnc_ifmap2_soap_t *this, ike_sa_t *ike_sa, bool up)
+METHOD(tnc_ifmap_soap_t, publish_ike_sa, bool,
+ private_tnc_ifmap_soap_t *this, ike_sa_t *ike_sa, bool up)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request, node, node2 = NULL;
enumerator_t *e1, *e2;
auth_rule_t type;
@@ -522,17 +522,17 @@ METHOD(tnc_ifmap2_soap_t, publish_ike_sa, bool,
}
e1->destroy(e1);
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
success = soap_msg->post(soap_msg, request, "publishReceived", NULL);
soap_msg->destroy(soap_msg);
return success;
}
-METHOD(tnc_ifmap2_soap_t, publish_device_ip, bool,
- private_tnc_ifmap2_soap_t *this, host_t *host)
+METHOD(tnc_ifmap_soap_t, publish_device_ip, bool,
+ private_tnc_ifmap_soap_t *this, host_t *host)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request, update;
bool success;
@@ -546,17 +546,17 @@ METHOD(tnc_ifmap2_soap_t, publish_device_ip, bool,
xmlAddChild(update, create_ip_address(this, host));
xmlAddChild(update, create_metadata(this, "device-ip"));
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
success = soap_msg->post(soap_msg, request, "publishReceived", NULL);
soap_msg->destroy(soap_msg);
return success;
}
-METHOD(tnc_ifmap2_soap_t, publish_enforcement_report, bool,
- private_tnc_ifmap2_soap_t *this, host_t *host, char *action, char *reason)
+METHOD(tnc_ifmap_soap_t, publish_enforcement_report, bool,
+ private_tnc_ifmap_soap_t *this, host_t *host, char *action, char *reason)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request, update;
bool success;
@@ -570,17 +570,17 @@ METHOD(tnc_ifmap2_soap_t, publish_enforcement_report, bool,
xmlAddChild(update, create_device(this));
xmlAddChild(update, create_enforcement_report(this, action, reason));
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
success = soap_msg->post(soap_msg, request, "publishReceived", NULL);
soap_msg->destroy(soap_msg);
return success;
}
-METHOD(tnc_ifmap2_soap_t, endSession, bool,
- private_tnc_ifmap2_soap_t *this)
+METHOD(tnc_ifmap_soap_t, endSession, bool,
+ private_tnc_ifmap_soap_t *this)
{
- tnc_ifmap2_soap_msg_t *soap_msg;
+ tnc_ifmap_soap_msg_t *soap_msg;
xmlNodePtr request;
bool success;
@@ -590,15 +590,15 @@ METHOD(tnc_ifmap2_soap_t, endSession, bool,
xmlSetNs(request, this->ns);
xmlNewProp(request, "session-id", this->session_id);
- soap_msg = tnc_ifmap2_soap_msg_create(this->uri, this->user_pass, this->tls);
+ soap_msg = tnc_ifmap_soap_msg_create(this->uri, this->user_pass, this->tls);
success = soap_msg->post(soap_msg, request, "endSessionResult", NULL);
soap_msg->destroy(soap_msg);
return success;
}
-METHOD(tnc_ifmap2_soap_t, destroy, void,
- private_tnc_ifmap2_soap_t *this)
+METHOD(tnc_ifmap_soap_t, destroy, void,
+ private_tnc_ifmap_soap_t *this)
{
if (this->session_id)
{
@@ -620,7 +620,7 @@ METHOD(tnc_ifmap2_soap_t, destroy, void,
free(this);
}
-static bool soap_init(private_tnc_ifmap2_soap_t *this)
+static bool soap_init(private_tnc_ifmap_soap_t *this)
{
char *server_uri, *server_str, *port_str, *uri_str;
char *server_cert, *client_cert, *client_key, *user_pass;
@@ -631,15 +631,15 @@ static bool soap_init(private_tnc_ifmap2_soap_t *this)
/* getting configuration parameters from strongswan.conf */
server_uri = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.server_uri", IFMAP_URI, charon->name);
+ "%s.plugins.tnc-ifmap.server_uri", IFMAP_URI, charon->name);
server_cert = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.server_cert", NULL, charon->name);
+ "%s.plugins.tnc-ifmap.server_cert", NULL, charon->name);
client_cert = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.client_cert", NULL, charon->name);
+ "%s.plugins.tnc-ifmap.client_cert", NULL, charon->name);
client_key = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.client_key", NULL, charon->name);
+ "%s.plugins.tnc-ifmap.client_key", NULL, charon->name);
user_pass = lib->settings->get_str(lib->settings,
- "%s.plugins.tnc-ifmap2.username_password", NULL, charon->name);
+ "%s.plugins.tnc-ifmap.username_password", NULL, charon->name);
/* load [self-signed] MAP server certificate */
if (!server_cert)
@@ -774,9 +774,9 @@ static bool soap_init(private_tnc_ifmap2_soap_t *this)
/**
* See header
*/
-tnc_ifmap2_soap_t *tnc_ifmap2_soap_create()
+tnc_ifmap_soap_t *tnc_ifmap_soap_create()
{
- private_tnc_ifmap2_soap_t *this;
+ private_tnc_ifmap_soap_t *this;
INIT(this,
.public = {
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.h
index 8e9788072..5ab31ef19 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap.h
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.h
@@ -14,37 +14,37 @@
*/
/**
- * @defgroup tnc_ifmap2_soap tnc_ifmap2_soap
- * @{ @ingroup tnc_ifmap2
+ * @defgroup tnc_ifmap_soap tnc_ifmap_soap
+ * @{ @ingroup tnc_ifmap
*/
-#ifndef TNC_IFMAP2_SOAP_H_
-#define TNC_IFMAP2_SOAP_H_
+#ifndef TNC_IFMAP_SOAP_H_
+#define TNC_IFMAP_SOAP_H_
#include <library.h>
#include <networking/host.h>
#include <sa/ike_sa.h>
-typedef struct tnc_ifmap2_soap_t tnc_ifmap2_soap_t;
+typedef struct tnc_ifmap_soap_t tnc_ifmap_soap_t;
/**
* Implements the TNC IF-MAP 2.0 SOAP Binding
*/
-struct tnc_ifmap2_soap_t {
+struct tnc_ifmap_soap_t {
/**
* Creates a new IF-MAP session
*
* @return TRUE if command was successful
*/
- bool (*newSession)(tnc_ifmap2_soap_t *this);
+ bool (*newSession)(tnc_ifmap_soap_t *this);
/**
* Purges all metadata published by this publisher
*
* @return TRUE if command was successful
*/
- bool (*purgePublisher)(tnc_ifmap2_soap_t *this);
+ bool (*purgePublisher)(tnc_ifmap_soap_t *this);
/**
* Publish metadata about established/deleted IKE_SAs
@@ -53,7 +53,7 @@ struct tnc_ifmap2_soap_t {
* @param up TRUE if IKE_SEA is up, FALSE if down
* @return TRUE if command was successful
*/
- bool (*publish_ike_sa)(tnc_ifmap2_soap_t *this, ike_sa_t *ike_sa, bool up);
+ bool (*publish_ike_sa)(tnc_ifmap_soap_t *this, ike_sa_t *ike_sa, bool up);
/**
* Publish PEP device-ip metadata
@@ -61,7 +61,7 @@ struct tnc_ifmap2_soap_t {
* @param host IP address of local endpoint
* @return TRUE if command was successful
*/
- bool (*publish_device_ip)(tnc_ifmap2_soap_t *this, host_t *host);
+ bool (*publish_device_ip)(tnc_ifmap_soap_t *this, host_t *host);
/**
* Publish enforcement-report metadata
@@ -71,7 +71,7 @@ struct tnc_ifmap2_soap_t {
* @param reason Enforcement reason
* @return TRUE if command was successful
*/
- bool (*publish_enforcement_report)(tnc_ifmap2_soap_t *this, host_t *host,
+ bool (*publish_enforcement_report)(tnc_ifmap_soap_t *this, host_t *host,
char *action, char *reason);
/**
@@ -79,17 +79,17 @@ struct tnc_ifmap2_soap_t {
*
* @return TRUE if command was successful
*/
- bool (*endSession)(tnc_ifmap2_soap_t *this);
+ bool (*endSession)(tnc_ifmap_soap_t *this);
/**
- * Destroy a tnc_ifmap2_soap_t.
+ * Destroy a tnc_ifmap_soap_t.
*/
- void (*destroy)(tnc_ifmap2_soap_t *this);
+ void (*destroy)(tnc_ifmap_soap_t *this);
};
/**
- * Create a tnc_ifmap2_soap instance.
+ * Create a tnc_ifmap_soap instance.
*/
-tnc_ifmap2_soap_t *tnc_ifmap2_soap_create();
+tnc_ifmap_soap_t *tnc_ifmap_soap_create();
-#endif /** TNC_IFMAP2_SOAP_H_ @}*/
+#endif /** TNC_IFMAP_SOAP_H_ @}*/
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.c
index 5cf966a29..8afd6ff09 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.c
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.c
@@ -15,7 +15,7 @@
#define _GNU_SOURCE /* for asprintf() */
-#include "tnc_ifmap2_soap_msg.h"
+#include "tnc_ifmap_soap_msg.h"
#include <utils/debug.h>
#include <utils/lexparser.h>
@@ -24,17 +24,17 @@
#define SOAP_NS "http://www.w3.org/2003/05/soap-envelope"
-typedef struct private_tnc_ifmap2_soap_msg_t private_tnc_ifmap2_soap_msg_t;
+typedef struct private_tnc_ifmap_soap_msg_t private_tnc_ifmap_soap_msg_t;
/**
- * Private data of an tnc_ifmap2_soap_msg_t object.
+ * Private data of an tnc_ifmap_soap_msg_t object.
*/
-struct private_tnc_ifmap2_soap_msg_t {
+struct private_tnc_ifmap_soap_msg_t {
/**
- * Public tnc_ifmap2_soap_msg_t interface.
+ * Public tnc_ifmap_soap_msg_t interface.
*/
- tnc_ifmap2_soap_msg_t public;
+ tnc_ifmap_soap_msg_t public;
/**
* HTTPS Server URI with https:// prefix removed
@@ -61,7 +61,7 @@ struct private_tnc_ifmap2_soap_msg_t {
/**
* Send HTTP POST request and receive HTTP response
*/
-static bool http_post(private_tnc_ifmap2_soap_msg_t *this, chunk_t out,
+static bool http_post(private_tnc_ifmap_soap_msg_t *this, chunk_t out,
chunk_t *in)
{
char *host, *path, *request, buf[2048];
@@ -187,8 +187,8 @@ static xmlNodePtr find_child(xmlNodePtr parent, const xmlChar* name)
return NULL;
}
-METHOD(tnc_ifmap2_soap_msg_t, post, bool,
- private_tnc_ifmap2_soap_msg_t *this, xmlNodePtr request, char *result_name,
+METHOD(tnc_ifmap_soap_msg_t, post, bool,
+ private_tnc_ifmap_soap_msg_t *this, xmlNodePtr request, char *result_name,
xmlNodePtr *result)
{
xmlDocPtr doc;
@@ -302,8 +302,8 @@ METHOD(tnc_ifmap2_soap_msg_t, post, bool,
return TRUE;
}
-METHOD(tnc_ifmap2_soap_msg_t, destroy, void,
- private_tnc_ifmap2_soap_msg_t *this)
+METHOD(tnc_ifmap_soap_msg_t, destroy, void,
+ private_tnc_ifmap_soap_msg_t *this)
{
if (this->doc)
{
@@ -315,10 +315,10 @@ METHOD(tnc_ifmap2_soap_msg_t, destroy, void,
/**
* See header
*/
-tnc_ifmap2_soap_msg_t *tnc_ifmap2_soap_msg_create(char *uri, chunk_t user_pass,
- tls_socket_t *tls)
+tnc_ifmap_soap_msg_t *tnc_ifmap_soap_msg_create(char *uri, chunk_t user_pass,
+ tls_socket_t *tls)
{
- private_tnc_ifmap2_soap_msg_t *this;
+ private_tnc_ifmap_soap_msg_t *this;
INIT(this,
.public = {
diff --git a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h
index 2a50bfc8b..4f809ba1a 100644
--- a/src/libcharon/plugins/tnc_ifmap2/tnc_ifmap2_soap_msg.h
+++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h
@@ -14,24 +14,24 @@
*/
/**
- * @defgroup tnc_ifmap2_soap_msg tnc_ifmap2_soap_msg
- * @{ @ingroup tnc_ifmap2
+ * @defgroup tnc_ifmap_soap_msg tnc_ifmap_soap_msg
+ * @{ @ingroup tnc_ifmap
*/
-#ifndef TNC_IFMAP2_SOAP_MSG_H_
-#define TNC_IFMAP2_SOAP_MSG_H_
+#ifndef TNC_IFMAP_SOAP_MSG_H_
+#define TNC_IFMAP_SOAP_MSG_H_
#include <library.h>
#include <tls_socket.h>
#include <libxml/parser.h>
-typedef struct tnc_ifmap2_soap_msg_t tnc_ifmap2_soap_msg_t;
+typedef struct tnc_ifmap_soap_msg_t tnc_ifmap_soap_msg_t;
/**
* Interface for sending and receiving SOAP-XML messages
*/
-struct tnc_ifmap2_soap_msg_t {
+struct tnc_ifmap_soap_msg_t {
/**
* Post an IF-MAP request in a SOAP-XML message and return a result
@@ -40,23 +40,23 @@ struct tnc_ifmap2_soap_msg_t {
* @param result_name name of the IF-MAP result
* @param result XML-encoded IF-MAP result
*/
- bool (*post)(tnc_ifmap2_soap_msg_t *this, xmlNodePtr request,
+ bool (*post)(tnc_ifmap_soap_msg_t *this, xmlNodePtr request,
char *result_name, xmlNodePtr* result);
/**
- * Destroy a tnc_ifmap2_soap_msg_t object.
+ * Destroy a tnc_ifmap_soap_msg_t object.
*/
- void (*destroy)(tnc_ifmap2_soap_msg_t *this);
+ void (*destroy)(tnc_ifmap_soap_msg_t *this);
};
/**
- * Create a tnc_ifmap2_soap_msg instance.
+ * Create a tnc_ifmap_soap_msg instance.
*
* @param uri HTTPS URI with https:// prefix removed
* @param user_pass Optional username:password for HTTP Basic Authentication
* @param tls TLS socket protecting the SOAP message
*/
-tnc_ifmap2_soap_msg_t *tnc_ifmap2_soap_msg_create(char *uri, chunk_t user_pass,
- tls_socket_t *tls);
+tnc_ifmap_soap_msg_t *tnc_ifmap_soap_msg_create(char *uri, chunk_t user_pass,
+ tls_socket_t *tls);
-#endif /** TNC_IFMAP2_SOAP_MSG_H_ @}*/
+#endif /** TNC_IFMAP_SOAP_MSG_H_ @}*/
diff --git a/src/libcharon/plugins/tnc_ifmap2/Makefile.am b/src/libcharon/plugins/tnc_ifmap2/Makefile.am
deleted file mode 100644
index 217d8972f..000000000
--- a/src/libcharon/plugins/tnc_ifmap2/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-
-INCLUDES = \
- -I$(top_srcdir)/src/libstrongswan \
- -I$(top_srcdir)/src/libtls \
- -I$(top_srcdir)/src/libhydra \
- -I$(top_srcdir)/src/libcharon \
- ${xml_CFLAGS}
-
-AM_CFLAGS = -rdynamic
-
-if MONOLITHIC
-noinst_LTLIBRARIES = libstrongswan-tnc-ifmap2.la
-else
-plugin_LTLIBRARIES = libstrongswan-tnc-ifmap2.la
-endif
-
-libstrongswan_tnc_ifmap2_la_LIBADD = \
- $(top_builddir)/src/libtls/libtls.la ${xml_LIBS}
-
-libstrongswan_tnc_ifmap2_la_SOURCES = \
- tnc_ifmap2_plugin.h tnc_ifmap2_plugin.c \
- tnc_ifmap2_listener.h tnc_ifmap2_listener.c \
- tnc_ifmap2_soap.h tnc_ifmap2_soap.c \
- tnc_ifmap2_soap_msg.h tnc_ifmap2_soap_msg.c
-
-libstrongswan_tnc_ifmap2_la_LDFLAGS = -module -avoid-version
-