ARG_ENABL_SET([xauth-eap], [enable XAuth backend using EAP methods to verify passwords.])
ARG_ENABL_SET([xauth-pam], [enable XAuth backend using PAM to verify passwords.])
ARG_ENABL_SET([xauth-noauth], [enable XAuth pseudo-backend that does not actually verify or even request any credentials.])
-ARG_ENABL_SET([tnc-ifmap2], [enable TNC IF-MAP v2 module. Requires libxml])
+ARG_ENABL_SET([tnc-ifmap], [enable TNC IF-MAP module. Requires libxml])
ARG_ENABL_SET([tnc-pdp], [enable TNC policy decision point module.])
ARG_ENABL_SET([tnc-imc], [enable TNC IMC module.])
ARG_ENABL_SET([tnc-imv], [enable TNC IMV module.])
fi
fi
-if test x$smp = xtrue -o x$tnccs_11 = xtrue -o x$tnc_ifmap2 = xtrue; then
+if test x$smp = xtrue -o x$tnccs_11 = xtrue -o x$tnc_ifmap = xtrue; then
xml=true
fi
ADD_PLUGIN([xauth-eap], [c charon])
ADD_PLUGIN([xauth-pam], [c charon])
ADD_PLUGIN([xauth-noauth], [c charon])
-ADD_PLUGIN([tnc-ifmap2], [c charon])
+ADD_PLUGIN([tnc-ifmap], [c charon])
ADD_PLUGIN([tnc-pdp], [c charon])
ADD_PLUGIN([tnc-imc], [c charon])
ADD_PLUGIN([tnc-imv], [c charon])
AM_CONDITIONAL(USE_XAUTH_EAP, test x$xauth_eap = xtrue)
AM_CONDITIONAL(USE_XAUTH_PAM, test x$xauth_pam = xtrue)
AM_CONDITIONAL(USE_XAUTH_NOAUTH, test x$xauth_noauth = xtrue)
-AM_CONDITIONAL(USE_TNC_IFMAP2, test x$tnc_ifmap2 = xtrue)
+AM_CONDITIONAL(USE_TNC_IFMAP, test x$tnc_ifmap = xtrue)
AM_CONDITIONAL(USE_TNC_PDP, test x$tnc_pdp = xtrue)
AM_CONDITIONAL(USE_TNC_IMC, test x$tnc_imc = xtrue)
AM_CONDITIONAL(USE_TNC_IMV, test x$tnc_imv = xtrue)
src/libcharon/plugins/xauth_eap/Makefile
src/libcharon/plugins/xauth_pam/Makefile
src/libcharon/plugins/xauth_noauth/Makefile
- src/libcharon/plugins/tnc_ifmap2/Makefile
+ src/libcharon/plugins/tnc_ifmap/Makefile
src/libcharon/plugins/tnc_pdp/Makefile
src/libcharon/plugins/tnc_imc/Makefile
src/libcharon/plugins/tnc_imv/Makefile
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
--- /dev/null
+
+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
+
* 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;
/**
* 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;
}
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)
{
}
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)
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);
/**
* 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 = {
},
.destroy = _destroy,
},
- .ifmap = tnc_ifmap2_soap_create(),
+ .ifmap = tnc_ifmap_soap_create(),
);
if (!this->ifmap)
*/
/**
- * @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.
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_ @}*/
* 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;
}
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),
}
METHOD(plugin_t, reload, bool,
- private_tnc_ifmap2_plugin_t *this)
+ private_tnc_ifmap_plugin_t *this)
{
if (this->listener)
{
this->listener->destroy(this->listener);
}
- this->listener = tnc_ifmap2_listener_create(TRUE);
+ this->listener = tnc_ifmap_listener_create(TRUE);
if (!this->listener)
{
return FALSE;
}
METHOD(plugin_t, destroy, void,
- private_tnc_ifmap2_plugin_t *this)
+ private_tnc_ifmap_plugin_t *this)
{
free(this);
}
/*
* 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 = {
*/
/**
- * @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
plugin_t plugin;
};
-#endif /** TNC_IFMAP2_PLUGIN_H_ @}*/
+#endif /** TNC_IFMAP_PLUGIN_H_ @}*/
* 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>
#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
};
-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 */
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);
/* 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;
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);
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
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;
}
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;
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;
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;
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)
{
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;
/* 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)
/**
* 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 = {
*/
/**
- * @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
* @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
* @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
* @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);
/**
*
* @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_ @}*/
#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>
#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
/**
* 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];
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;
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)
{
/**
* 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 = {
*/
/**
- * @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
* @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_ @}*/
+++ /dev/null
-
-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
-