diff options
Diffstat (limited to 'src/libstrongswan/plugins/md5/md5_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/md5/md5_plugin.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/md5/md5_plugin.c b/src/libstrongswan/plugins/md5/md5_plugin.c index d11173817..c72284193 100644 --- a/src/libstrongswan/plugins/md5/md5_plugin.c +++ b/src/libstrongswan/plugins/md5/md5_plugin.c @@ -18,8 +18,6 @@ #include <library.h> #include "md5_hasher.h" -static const char *plugin_name = "md5"; - typedef struct private_md5_plugin_t private_md5_plugin_t; /** @@ -33,6 +31,12 @@ struct private_md5_plugin_t { md5_plugin_t public; }; +METHOD(plugin_t, get_name, char*, + private_md5_plugin_t *this) +{ + return "md5"; +} + METHOD(plugin_t, destroy, void, private_md5_plugin_t *this) { @@ -51,12 +55,14 @@ plugin_t *md5_plugin_create() INIT(this, .public = { .plugin = { + .get_name = _get_name, + .reload = (void*)return_false, .destroy = _destroy, }, }, ); - lib->crypto->add_hasher(lib->crypto, HASH_MD5, plugin_name, + lib->crypto->add_hasher(lib->crypto, HASH_MD5, get_name(this), (hasher_constructor_t)md5_hasher_create); return &this->public.plugin; |