aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2010-03-24 15:22:10 +0100
committerTobias Brunner <tobias@strongswan.org>2010-03-24 18:53:10 +0100
commit52bff307e108cfd87343fc87ffffb4e94df67dbd (patch)
treeb3a6f73bd9bb0cd29f1461ef05fd1c5ea8e20816 /src/pluto
parentf9b1db1631804f102dd4430a53b7264f98d38c29 (diff)
downloadstrongswan-52bff307e108cfd87343fc87ffffb4e94df67dbd.tar.bz2
strongswan-52bff307e108cfd87343fc87ffffb4e94df67dbd.tar.xz
Init/deinit libhydra in charon and pluto.
Diffstat (limited to 'src/pluto')
-rw-r--r--src/pluto/Makefile.am5
-rw-r--r--src/pluto/plutomain.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/src/pluto/Makefile.am b/src/pluto/Makefile.am
index a0ab0f4a6..1d55d0188 100644
--- a/src/pluto/Makefile.am
+++ b/src/pluto/Makefile.am
@@ -54,13 +54,14 @@ rsaref/pkcs11t.h rsaref/pkcs11.h rsaref/unix.h rsaref/pkcs11f.h
_pluto_adns_SOURCES = adns.c adns.h
LIBSTRONGSWANDIR=$(top_builddir)/src/libstrongswan
-LIBHYDRADIR=$(top_builddir)/src/libhydra
LIBFREESWANDIR=$(top_builddir)/src/libfreeswan
+LIBHYDRADIR=$(top_builddir)/src/libhydra
INCLUDES = \
-I${linux_headers} \
-I$(top_srcdir)/src/libstrongswan \
-I$(top_srcdir)/src/libfreeswan \
+-I$(top_srcdir)/src/libhydra \
-I$(top_srcdir)/src/whack
AM_CFLAGS = \
@@ -75,8 +76,8 @@ AM_CFLAGS = \
pluto_LDADD = \
$(LIBSTRONGSWANDIR)/libstrongswan.la \
-$(LIBHYDRADIR)/libhydra.la \
$(LIBFREESWANDIR)/libfreeswan.a \
+$(LIBHYDRADIR)/libhydra.la \
-lresolv $(PTHREADLIB) $(DLLIB)
_pluto_adns_LDADD = \
diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c
index 8b922df8c..98195ca2f 100644
--- a/src/pluto/plutomain.c
+++ b/src/pluto/plutomain.c
@@ -38,6 +38,7 @@
#include <freeswan.h>
+#include <hydra.h>
#include <library.h>
#include <debug.h>
#include <utils/enumerator.h>
@@ -273,6 +274,12 @@ int main(int argc, char **argv)
library_deinit();
exit(SS_RC_DAEMON_INTEGRITY);
}
+ if (!libhydra_init())
+ {
+ libhydra_deinit();
+ library_deinit();
+ exit(SS_RC_INITIALIZATION_FAILED);
+ }
options = options_create();
/* handle arguments */
@@ -648,6 +655,7 @@ int main(int argc, char **argv)
{
plog("integrity tests enabled:");
plog("lib 'libstrongswan': passed file and segment integrity tests");
+ plog("lib 'libhydra': passed file and segment integrity tests");
plog("daemon 'pluto': passed file integrity test");
}
@@ -770,6 +778,7 @@ void exit_pluto(int status)
free_builder();
delete_lock();
options->destroy(options);
+ libhydra_deinit();
library_deinit();
close_log();
exit(status);