From c373f14947e3b6d69304b52e1e82637f9dbedbbf Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 4 May 2010 18:18:51 +0200 Subject: Adding an Android specific credential set. --- src/libcharon/plugins/android/android_plugin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libcharon/plugins/android/android_plugin.c') diff --git a/src/libcharon/plugins/android/android_plugin.c b/src/libcharon/plugins/android/android_plugin.c index 7f6c20fa2..a23ee7152 100644 --- a/src/libcharon/plugins/android/android_plugin.c +++ b/src/libcharon/plugins/android/android_plugin.c @@ -16,6 +16,7 @@ #include "android_plugin.h" #include "android_logger.h" #include "android_handler.h" +#include "android_creds.h" #include #include @@ -41,6 +42,12 @@ struct private_android_plugin_t { * Android specific DNS handler */ android_handler_t *handler; + + /** + * Android specific credential set + */ + android_creds_t *creds; + }; METHOD(plugin_t, destroy, void, @@ -48,7 +55,9 @@ METHOD(plugin_t, destroy, void, { hydra->attributes->remove_handler(hydra->attributes, &this->handler->handler); + charon->credentials->remove_set(charon->credentials, &this->creds->set); charon->bus->remove_listener(charon->bus, &this->logger->listener); + this->creds->destroy(this->creds); this->handler->destroy(this->handler); this->logger->destroy(this->logger); free(this); @@ -67,9 +76,11 @@ plugin_t *android_plugin_create() }, .logger = android_logger_create(), .handler = android_handler_create(), + .creds = android_creds_create(), ); charon->bus->add_listener(charon->bus, &this->logger->listener); + charon->credentials->add_set(charon->credentials, &this->creds->set); hydra->attributes->add_handler(hydra->attributes, &this->handler->handler); return &this->public.plugin; -- cgit v1.2.3