integrity test of openac and scepclient code files
This commit is contained in:
@@ -23,5 +23,10 @@ if USE_PLUTO
|
|||||||
libs += $(top_builddir)/src/pluto/.libs/pluto
|
libs += $(top_builddir)/src/pluto/.libs/pluto
|
||||||
endif
|
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.c : checksum_builder $(libs)
|
||||||
./checksum_builder $(libs) > checksum.c
|
./checksum_builder $(libs) > checksum.c
|
||||||
|
|||||||
@@ -77,6 +77,14 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
name = strdup("pluto\",");
|
name = strdup("pluto\",");
|
||||||
}
|
}
|
||||||
|
else if (strstr(path, "openac"))
|
||||||
|
{
|
||||||
|
name = strdup("openac\",");
|
||||||
|
}
|
||||||
|
else if (strstr(path, "scepclient"))
|
||||||
|
{
|
||||||
|
name = strdup("scepclient\",");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "don't know how to handle '%s', ignored", path);
|
fprintf(stderr, "don't know how to handle '%s', ignored", path);
|
||||||
|
|||||||
@@ -288,6 +288,13 @@ int main(int argc, char **argv)
|
|||||||
library_deinit();
|
library_deinit();
|
||||||
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
|
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->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
|
||||||
lib->settings->get_str(lib->settings, "openac.load", PLUGINS));
|
lib->settings->get_str(lib->settings, "openac.load", PLUGINS));
|
||||||
|
|
||||||
|
|||||||
@@ -392,6 +392,13 @@ int main(int argc, char **argv)
|
|||||||
library_deinit();
|
library_deinit();
|
||||||
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
|
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 */
|
/* initialize optionsfrom */
|
||||||
options = options_create();
|
options = options_create();
|
||||||
|
|||||||
Reference in New Issue
Block a user