aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/checksum/Makefile.am5
-rw-r--r--src/checksum/checksum_builder.c8
-rwxr-xr-xsrc/openac/openac.c7
-rw-r--r--src/scepclient/scepclient.c7
4 files changed, 27 insertions, 0 deletions
diff --git a/src/checksum/Makefile.am b/src/checksum/Makefile.am
index f9c1be271..8241012e8 100644
--- a/src/checksum/Makefile.am
+++ b/src/checksum/Makefile.am
@@ -23,5 +23,10 @@ if USE_PLUTO
libs += $(top_builddir)/src/pluto/.libs/pluto
endif
+if USE_TOOLS
+ libs += $(top_builddir)/src/openac/.libs/openac
+ libs += $(top_builddir)/src/scepclient/.libs/scepclient
+endif
+
checksum.c : checksum_builder $(libs)
./checksum_builder $(libs) > checksum.c
diff --git a/src/checksum/checksum_builder.c b/src/checksum/checksum_builder.c
index 71cca1dcb..d6085f81f 100644
--- a/src/checksum/checksum_builder.c
+++ b/src/checksum/checksum_builder.c
@@ -77,6 +77,14 @@ int main(int argc, char* argv[])
{
name = strdup("pluto\",");
}
+ else if (strstr(path, "openac"))
+ {
+ name = strdup("openac\",");
+ }
+ else if (strstr(path, "scepclient"))
+ {
+ name = strdup("scepclient\",");
+ }
else
{
fprintf(stderr, "don't know how to handle '%s', ignored", path);
diff --git a/src/openac/openac.c b/src/openac/openac.c
index f61a9463c..a8f75e093 100755
--- a/src/openac/openac.c
+++ b/src/openac/openac.c
@@ -288,6 +288,13 @@ int main(int argc, char **argv)
library_deinit();
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
+ if (lib->integrity &&
+ !lib->integrity->check_file(lib->integrity, "openac", argv[0]))
+ {
+ fprintf(stderr, "integrity check of openac failed\n");
+ library_deinit();
+ exit(SS_RC_DAEMON_INTEGRITY);
+ }
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
lib->settings->get_str(lib->settings, "openac.load", PLUGINS));
diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c
index 88dd28521..6c0166d66 100644
--- a/src/scepclient/scepclient.c
+++ b/src/scepclient/scepclient.c
@@ -392,6 +392,13 @@ int main(int argc, char **argv)
library_deinit();
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
+ if (lib->integrity &&
+ !lib->integrity->check_file(lib->integrity, "scepclient", argv[0]))
+ {
+ fprintf(stderr, "integrity check of scepclient failed\n");
+ library_deinit();
+ exit(SS_RC_DAEMON_INTEGRITY);
+ }
/* initialize optionsfrom */
options = options_create();