diff options
author | Martin Willi <martin@strongswan.org> | 2009-06-18 17:50:28 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-06-22 15:47:17 +0200 |
commit | 960e0c104013207a9057e6e320b9cbf068cff013 (patch) | |
tree | b41327bc17143129a0f1f006dd0d9f0fea65cecf /src/libstrongswan/library.c | |
parent | 20d4fc97cf5e5663f0f4489b4ec72080b6de34a8 (diff) | |
download | strongswan-960e0c104013207a9057e6e320b9cbf068cff013.tar.bz2 strongswan-960e0c104013207a9057e6e320b9cbf068cff013.tar.xz |
check integrity of plugins before loading
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r-- | src/libstrongswan/library.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c index 8e5a8a611..17956ff4e 100644 --- a/src/libstrongswan/library.c +++ b/src/libstrongswan/library.c @@ -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(); + } } |