summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/sha1/sha1_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/sha1/sha1_plugin.c')
-rw-r--r--src/libstrongswan/plugins/sha1/sha1_plugin.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/sha1/sha1_plugin.c b/src/libstrongswan/plugins/sha1/sha1_plugin.c
index 7b9cf878f..fcb75dfa2 100644
--- a/src/libstrongswan/plugins/sha1/sha1_plugin.c
+++ b/src/libstrongswan/plugins/sha1/sha1_plugin.c
@@ -19,6 +19,11 @@
#include "sha1_hasher.h"
#include "sha1_prf.h"
+<<<<<<< HEAD
+=======
+static const char *plugin_name = "sha1";
+
+>>>>>>> upstream/4.5.1
typedef struct private_sha1_plugin_t private_sha1_plugin_t;
/**
@@ -32,10 +37,15 @@ struct private_sha1_plugin_t {
sha1_plugin_t public;
};
+<<<<<<< HEAD
/**
* Implementation of sha1_plugin_t.destroy
*/
static void destroy(private_sha1_plugin_t *this)
+=======
+METHOD(plugin_t, destroy, void,
+ private_sha1_plugin_t *this)
+>>>>>>> upstream/4.5.1
{
lib->crypto->remove_hasher(lib->crypto,
(hasher_constructor_t)sha1_hasher_create);
@@ -49,6 +59,7 @@ static void destroy(private_sha1_plugin_t *this)
*/
plugin_t *sha1_plugin_create()
{
+<<<<<<< HEAD
private_sha1_plugin_t *this = malloc_thing(private_sha1_plugin_t);
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
@@ -56,6 +67,21 @@ plugin_t *sha1_plugin_create()
lib->crypto->add_hasher(lib->crypto, HASH_SHA1,
(hasher_constructor_t)sha1_hasher_create);
lib->crypto->add_prf(lib->crypto, PRF_KEYED_SHA1,
+=======
+ private_sha1_plugin_t *this;
+
+ INIT(this,
+ .public = {
+ .plugin = {
+ .destroy = _destroy,
+ },
+ },
+ );
+
+ lib->crypto->add_hasher(lib->crypto, HASH_SHA1, plugin_name,
+ (hasher_constructor_t)sha1_hasher_create);
+ lib->crypto->add_prf(lib->crypto, PRF_KEYED_SHA1, plugin_name,
+>>>>>>> upstream/4.5.1
(prf_constructor_t)sha1_prf_create);
return &this->public.plugin;