fixed integrity tests of plugins using libtls or libtnccs
This commit is contained in:
parent
6ae024392b
commit
b597ac4a4c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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 = \
|
||||
|
|
Loading…
Reference in New Issue