aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2011-11-02 06:41:48 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-11-02 06:42:08 +0100
commitb597ac4a4cbcd9197b886d743c75d58293264580 (patch)
tree219d64ab562fda0970200941c0d86481703372cb /src
parent6ae024392b1ceac1b00a185dc96b80a025ac86e1 (diff)
downloadstrongswan-b597ac4a4cbcd9197b886d743c75d58293264580.tar.bz2
strongswan-b597ac4a4cbcd9197b886d743c75d58293264580.tar.xz
fixed integrity tests of plugins using libtls or libtnccs
Diffstat (limited to 'src')
-rw-r--r--src/charon/Makefile.am4
-rw-r--r--src/checksum/Makefile.am7
-rw-r--r--src/checksum/checksum_builder.c9
-rw-r--r--src/libcharon/plugins/eap_peap/Makefile.am1
-rw-r--r--src/libcharon/plugins/eap_tls/Makefile.am1
-rw-r--r--src/libcharon/plugins/eap_tnc/Makefile.am3
-rw-r--r--src/libcharon/plugins/eap_ttls/Makefile.am1
-rw-r--r--src/libcharon/plugins/tnc_imc/Makefile.am3
-rw-r--r--src/libcharon/plugins/tnc_imv/Makefile.am3
-rw-r--r--src/libcharon/plugins/tnc_tnccs/Makefile.am3
-rw-r--r--src/libcharon/plugins/tnc_tnccs/tnc_tnccs_plugin.c17
-rw-r--r--src/libcharon/plugins/tnccs_11/Makefile.am3
-rw-r--r--src/libcharon/plugins/tnccs_20/Makefile.am3
-rw-r--r--src/libcharon/plugins/tnccs_dynamic/Makefile.am3
14 files changed, 43 insertions, 18 deletions
diff --git a/src/charon/Makefile.am b/src/charon/Makefile.am
index 6481947f1..691821623 100644
--- a/src/charon/Makefile.am
+++ b/src/charon/Makefile.am
@@ -18,5 +18,9 @@ charon_LDADD = \
$(top_builddir)/src/libcharon/libcharon.la \
-lm $(PTHREADLIB) $(DLLIB)
+if USE_LIBTNCCS
+ charon_LDADD += $(top_builddir)/src/libtnccs/libtnccs.la
+endif
+
EXTRA_DIST = Android.mk
diff --git a/src/checksum/Makefile.am b/src/checksum/Makefile.am
index fc48438c2..fe6cf79b4 100644
--- a/src/checksum/Makefile.am
+++ b/src/checksum/Makefile.am
@@ -30,6 +30,13 @@ if !MONOLITHIC
endif
endif
+if USE_LIBTNCCS
+ libs += $(top_builddir)/src/libtnccs/.libs/libtnccs.so
+ checksum_builder_LDADD += $(top_builddir)/src/libtnccs/libtnccs.la
+ INCLUDES += -I$(top_srcdir)/src/libtncif -I$(top_srcdir)/src/libtnccs
+ AM_CFLAGS += -DHAS_TNC
+endif
+
if USE_CHARON
libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
libs += $(top_builddir)/src/charon/.libs/charon
diff --git a/src/checksum/checksum_builder.c b/src/checksum/checksum_builder.c
index a4d9aa084..4bc387da8 100644
--- a/src/checksum/checksum_builder.c
+++ b/src/checksum/checksum_builder.c
@@ -23,6 +23,10 @@
#include <daemon.h>
#include <utils/enumerator.h>
+#ifdef HAS_TNC
+#include <tnc/tnc.h>
+#endif
+
/* we need to fake the pluto symbol to dlopen() the xauth plugin */
void *pluto;
@@ -133,6 +137,11 @@ int main(int argc, char* argv[])
hydra = NULL;
charon = NULL;
+#ifdef HAS_TNC
+ /* forces link against libtnccs */
+ tnc = NULL;
+#endif
+
/* avoid confusing leak reports in build process */
setenv("LEAK_DETECTIVE_DISABLE", "1", 0);
/* don't use a strongswan.conf, forces integrity check to disabled */
diff --git a/src/libcharon/plugins/eap_peap/Makefile.am b/src/libcharon/plugins/eap_peap/Makefile.am
index 81f2575c7..9f7ec6a4d 100644
--- a/src/libcharon/plugins/eap_peap/Makefile.am
+++ b/src/libcharon/plugins/eap_peap/Makefile.am
@@ -8,7 +8,6 @@ if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-eap-peap.la
else
plugin_LTLIBRARIES = libstrongswan-eap-peap.la
-libstrongswan_eap_peap_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
endif
libstrongswan_eap_peap_la_SOURCES = \
diff --git a/src/libcharon/plugins/eap_tls/Makefile.am b/src/libcharon/plugins/eap_tls/Makefile.am
index 29ddd822b..fb3de4937 100644
--- a/src/libcharon/plugins/eap_tls/Makefile.am
+++ b/src/libcharon/plugins/eap_tls/Makefile.am
@@ -8,7 +8,6 @@ if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-eap-tls.la
else
plugin_LTLIBRARIES = libstrongswan-eap-tls.la
-libstrongswan_eap_tls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
endif
libstrongswan_eap_tls_la_SOURCES = \
diff --git a/src/libcharon/plugins/eap_tnc/Makefile.am b/src/libcharon/plugins/eap_tnc/Makefile.am
index 0e10f7d9c..0d5760b25 100644
--- a/src/libcharon/plugins/eap_tnc/Makefile.am
+++ b/src/libcharon/plugins/eap_tnc/Makefile.am
@@ -13,9 +13,6 @@ if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-eap-tnc.la
else
plugin_LTLIBRARIES = libstrongswan-eap-tnc.la
-libstrongswan_eap_tnc_la_LIBADD = \
- $(top_builddir)/src/libtls/libtls.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
endif
libstrongswan_eap_tnc_la_SOURCES = \
diff --git a/src/libcharon/plugins/eap_ttls/Makefile.am b/src/libcharon/plugins/eap_ttls/Makefile.am
index 94ce5cc1e..a06665d4c 100644
--- a/src/libcharon/plugins/eap_ttls/Makefile.am
+++ b/src/libcharon/plugins/eap_ttls/Makefile.am
@@ -8,7 +8,6 @@ if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-eap-ttls.la
else
plugin_LTLIBRARIES = libstrongswan-eap-ttls.la
-libstrongswan_eap_ttls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
endif
libstrongswan_eap_ttls_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnc_imc/Makefile.am b/src/libcharon/plugins/tnc_imc/Makefile.am
index fc1979525..f282978a9 100644
--- a/src/libcharon/plugins/tnc_imc/Makefile.am
+++ b/src/libcharon/plugins/tnc_imc/Makefile.am
@@ -11,8 +11,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-imc.la
else
plugin_LTLIBRARIES = libstrongswan-tnc-imc.la
libstrongswan_tnc_imc_la_LIBADD = \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnc_imc_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnc_imv/Makefile.am b/src/libcharon/plugins/tnc_imv/Makefile.am
index eca3b377b..0de287d92 100644
--- a/src/libcharon/plugins/tnc_imv/Makefile.am
+++ b/src/libcharon/plugins/tnc_imv/Makefile.am
@@ -13,8 +13,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-imv.la
else
plugin_LTLIBRARIES = libstrongswan-tnc-imv.la
libstrongswan_tnc_imv_la_LIBADD = \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnc_imv_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnc_tnccs/Makefile.am b/src/libcharon/plugins/tnc_tnccs/Makefile.am
index c7fc02f7c..bf77c4cae 100644
--- a/src/libcharon/plugins/tnc_tnccs/Makefile.am
+++ b/src/libcharon/plugins/tnc_tnccs/Makefile.am
@@ -11,8 +11,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-tnccs.la
else
plugin_LTLIBRARIES = libstrongswan-tnc-tnccs.la
libstrongswan_tnc_tnccs_la_LIBADD = \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnc_tnccs_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnc_tnccs/tnc_tnccs_plugin.c b/src/libcharon/plugins/tnc_tnccs/tnc_tnccs_plugin.c
index 777c33c51..a44319ed1 100644
--- a/src/libcharon/plugins/tnc_tnccs/tnc_tnccs_plugin.c
+++ b/src/libcharon/plugins/tnc_tnccs/tnc_tnccs_plugin.c
@@ -18,6 +18,8 @@
#include <tnc/tnc.h>
+#include <debug.h>
+
typedef struct private_tnc_tnccs_plugin_t private_tnc_tnccs_plugin_t;
/**
@@ -64,6 +66,21 @@ plugin_t *tnc_tnccs_plugin_create(void)
{
private_tnc_tnccs_plugin_t *this;
+ if (lib->integrity)
+ {
+ if (lib->integrity->check(lib->integrity, "libtnccs", libtnccs_init))
+ {
+ DBG1(DBG_LIB,
+ "lib 'libtnccs': passed file and segment integrity tests");
+ }
+ else
+ {
+ DBG1(DBG_LIB,
+ "lib 'libtnccs': failed integrity tests");
+ return NULL;
+ }
+ }
+
INIT(this,
.public = {
.plugin = {
diff --git a/src/libcharon/plugins/tnccs_11/Makefile.am b/src/libcharon/plugins/tnccs_11/Makefile.am
index c205692d4..b10c4019c 100644
--- a/src/libcharon/plugins/tnccs_11/Makefile.am
+++ b/src/libcharon/plugins/tnccs_11/Makefile.am
@@ -15,8 +15,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-11.la
else
plugin_LTLIBRARIES = libstrongswan-tnccs-11.la
libstrongswan_tnccs_11_la_LIBADD += \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnccs_11_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnccs_20/Makefile.am b/src/libcharon/plugins/tnccs_20/Makefile.am
index ec17e6412..f63e2656e 100644
--- a/src/libcharon/plugins/tnccs_20/Makefile.am
+++ b/src/libcharon/plugins/tnccs_20/Makefile.am
@@ -12,8 +12,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-20.la
else
plugin_LTLIBRARIES = libstrongswan-tnccs-20.la
libstrongswan_tnccs_20_la_LIBADD = \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnccs_20_la_SOURCES = \
diff --git a/src/libcharon/plugins/tnccs_dynamic/Makefile.am b/src/libcharon/plugins/tnccs_dynamic/Makefile.am
index 57c2baaf0..d9baee48a 100644
--- a/src/libcharon/plugins/tnccs_dynamic/Makefile.am
+++ b/src/libcharon/plugins/tnccs_dynamic/Makefile.am
@@ -12,8 +12,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
else
plugin_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
libstrongswan_tnccs_dynamic_la_LIBADD = \
- $(top_builddir)/src/libtncif/libtncif.la \
- $(top_builddir)/src/libtnccs/libtnccs.la
+ $(top_builddir)/src/libtncif/libtncif.la
endif
libstrongswan_tnccs_dynamic_la_SOURCES = \