check integrity of plugins before loading

This commit is contained in:
Martin Willi
2009-06-22 15:47:17 +02:00
parent 20d4fc97cf
commit 960e0c1040
3 changed files with 33 additions and 0 deletions
+12
View File
@@ -20,6 +20,7 @@
#include <utils.h>
#include <chunk.h>
#include <debug.h>
#include <utils/identification.h>
#include <utils/host.h>
#ifdef LEAK_DETECTIVE
@@ -65,6 +66,10 @@ void library_deinit()
this->public.fetcher->destroy(this->public.fetcher);
this->public.db->destroy(this->public.db);
this->public.printf_hook->destroy(this->public.printf_hook);
if (this->public.integrity)
{
this->public.integrity->destroy(this->public.integrity);
}
#ifdef LEAK_DETECTIVE
if (this->detective)
@@ -119,5 +124,12 @@ void library_init(char *settings)
this->public.fetcher = fetcher_manager_create();
this->public.db = database_factory_create();
this->public.plugins = plugin_loader_create();
this->public.integrity = NULL;
if (lib->settings->get_bool(lib->settings,
"libstrongswan.integrity_test", FALSE))
{
this->public.integrity = integrity_checker_create();
}
}