summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/md5/md5_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/md5/md5_plugin.c')
-rw-r--r--src/libstrongswan/plugins/md5/md5_plugin.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/md5/md5_plugin.c b/src/libstrongswan/plugins/md5/md5_plugin.c
index c72284193..a3ad7b305 100644
--- a/src/libstrongswan/plugins/md5/md5_plugin.c
+++ b/src/libstrongswan/plugins/md5/md5_plugin.c
@@ -37,6 +37,17 @@ METHOD(plugin_t, get_name, char*,
return "md5";
}
+METHOD(plugin_t, get_features, int,
+ private_md5_plugin_t *this, plugin_feature_t *features[])
+{
+ static plugin_feature_t f[] = {
+ PLUGIN_REGISTER(HASHER, md5_hasher_create),
+ PLUGIN_PROVIDE(HASHER, HASH_MD5),
+ };
+ *features = f;
+ return countof(f);
+}
+
METHOD(plugin_t, destroy, void,
private_md5_plugin_t *this)
{
@@ -56,15 +67,12 @@ plugin_t *md5_plugin_create()
.public = {
.plugin = {
.get_name = _get_name,
- .reload = (void*)return_false,
+ .get_features = _get_features,
.destroy = _destroy,
},
},
);
- lib->crypto->add_hasher(lib->crypto, HASH_MD5, get_name(this),
- (hasher_constructor_t)md5_hasher_create);
-
return &this->public.plugin;
}