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 \
|
$(top_builddir)/src/libcharon/libcharon.la \
|
||||||
-lm $(PTHREADLIB) $(DLLIB)
|
-lm $(PTHREADLIB) $(DLLIB)
|
||||||
|
|
||||||
|
if USE_LIBTNCCS
|
||||||
|
charon_LDADD += $(top_builddir)/src/libtnccs/libtnccs.la
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = Android.mk
|
EXTRA_DIST = Android.mk
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,13 @@ if !MONOLITHIC
|
||||||
endif
|
endif
|
||||||
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
|
if USE_CHARON
|
||||||
libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
|
libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
|
||||||
libs += $(top_builddir)/src/charon/.libs/charon
|
libs += $(top_builddir)/src/charon/.libs/charon
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include <daemon.h>
|
#include <daemon.h>
|
||||||
#include <utils/enumerator.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 */
|
/* we need to fake the pluto symbol to dlopen() the xauth plugin */
|
||||||
void *pluto;
|
void *pluto;
|
||||||
|
|
||||||
|
@ -133,6 +137,11 @@ int main(int argc, char* argv[])
|
||||||
hydra = NULL;
|
hydra = NULL;
|
||||||
charon = NULL;
|
charon = NULL;
|
||||||
|
|
||||||
|
#ifdef HAS_TNC
|
||||||
|
/* forces link against libtnccs */
|
||||||
|
tnc = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* avoid confusing leak reports in build process */
|
/* avoid confusing leak reports in build process */
|
||||||
setenv("LEAK_DETECTIVE_DISABLE", "1", 0);
|
setenv("LEAK_DETECTIVE_DISABLE", "1", 0);
|
||||||
/* don't use a strongswan.conf, forces integrity check to disabled */
|
/* don't use a strongswan.conf, forces integrity check to disabled */
|
||||||
|
|
|
@ -8,7 +8,6 @@ if MONOLITHIC
|
||||||
noinst_LTLIBRARIES = libstrongswan-eap-peap.la
|
noinst_LTLIBRARIES = libstrongswan-eap-peap.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-eap-peap.la
|
plugin_LTLIBRARIES = libstrongswan-eap-peap.la
|
||||||
libstrongswan_eap_peap_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_eap_peap_la_SOURCES = \
|
libstrongswan_eap_peap_la_SOURCES = \
|
||||||
|
|
|
@ -8,7 +8,6 @@ if MONOLITHIC
|
||||||
noinst_LTLIBRARIES = libstrongswan-eap-tls.la
|
noinst_LTLIBRARIES = libstrongswan-eap-tls.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-eap-tls.la
|
plugin_LTLIBRARIES = libstrongswan-eap-tls.la
|
||||||
libstrongswan_eap_tls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_eap_tls_la_SOURCES = \
|
libstrongswan_eap_tls_la_SOURCES = \
|
||||||
|
|
|
@ -13,9 +13,6 @@ if MONOLITHIC
|
||||||
noinst_LTLIBRARIES = libstrongswan-eap-tnc.la
|
noinst_LTLIBRARIES = libstrongswan-eap-tnc.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-eap-tnc.la
|
plugin_LTLIBRARIES = libstrongswan-eap-tnc.la
|
||||||
libstrongswan_eap_tnc_la_LIBADD = \
|
|
||||||
$(top_builddir)/src/libtls/libtls.la \
|
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_eap_tnc_la_SOURCES = \
|
libstrongswan_eap_tnc_la_SOURCES = \
|
||||||
|
|
|
@ -8,7 +8,6 @@ if MONOLITHIC
|
||||||
noinst_LTLIBRARIES = libstrongswan-eap-ttls.la
|
noinst_LTLIBRARIES = libstrongswan-eap-ttls.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-eap-ttls.la
|
plugin_LTLIBRARIES = libstrongswan-eap-ttls.la
|
||||||
libstrongswan_eap_ttls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_eap_ttls_la_SOURCES = \
|
libstrongswan_eap_ttls_la_SOURCES = \
|
||||||
|
|
|
@ -11,8 +11,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-imc.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnc-imc.la
|
plugin_LTLIBRARIES = libstrongswan-tnc-imc.la
|
||||||
libstrongswan_tnc_imc_la_LIBADD = \
|
libstrongswan_tnc_imc_la_LIBADD = \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnc_imc_la_SOURCES = \
|
libstrongswan_tnc_imc_la_SOURCES = \
|
||||||
|
|
|
@ -13,8 +13,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-imv.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnc-imv.la
|
plugin_LTLIBRARIES = libstrongswan-tnc-imv.la
|
||||||
libstrongswan_tnc_imv_la_LIBADD = \
|
libstrongswan_tnc_imv_la_LIBADD = \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnc_imv_la_SOURCES = \
|
libstrongswan_tnc_imv_la_SOURCES = \
|
||||||
|
|
|
@ -11,8 +11,7 @@ noinst_LTLIBRARIES = libstrongswan-tnc-tnccs.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnc-tnccs.la
|
plugin_LTLIBRARIES = libstrongswan-tnc-tnccs.la
|
||||||
libstrongswan_tnc_tnccs_la_LIBADD = \
|
libstrongswan_tnc_tnccs_la_LIBADD = \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnc_tnccs_la_SOURCES = \
|
libstrongswan_tnc_tnccs_la_SOURCES = \
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
#include <tnc/tnc.h>
|
#include <tnc/tnc.h>
|
||||||
|
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tnc_tnccs_plugin_t private_tnc_tnccs_plugin_t;
|
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;
|
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,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
.plugin = {
|
.plugin = {
|
||||||
|
|
|
@ -15,8 +15,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-11.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnccs-11.la
|
plugin_LTLIBRARIES = libstrongswan-tnccs-11.la
|
||||||
libstrongswan_tnccs_11_la_LIBADD += \
|
libstrongswan_tnccs_11_la_LIBADD += \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnccs_11_la_SOURCES = \
|
libstrongswan_tnccs_11_la_SOURCES = \
|
||||||
|
|
|
@ -12,8 +12,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-20.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnccs-20.la
|
plugin_LTLIBRARIES = libstrongswan-tnccs-20.la
|
||||||
libstrongswan_tnccs_20_la_LIBADD = \
|
libstrongswan_tnccs_20_la_LIBADD = \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnccs_20_la_SOURCES = \
|
libstrongswan_tnccs_20_la_SOURCES = \
|
||||||
|
|
|
@ -12,8 +12,7 @@ noinst_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
|
plugin_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
|
||||||
libstrongswan_tnccs_dynamic_la_LIBADD = \
|
libstrongswan_tnccs_dynamic_la_LIBADD = \
|
||||||
$(top_builddir)/src/libtncif/libtncif.la \
|
$(top_builddir)/src/libtncif/libtncif.la
|
||||||
$(top_builddir)/src/libtnccs/libtnccs.la
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_tnccs_dynamic_la_SOURCES = \
|
libstrongswan_tnccs_dynamic_la_SOURCES = \
|
||||||
|
|
Loading…
Reference in New Issue