summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/gcm/gcm_plugin.c
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-05-19 13:41:58 +0200
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-05-19 13:41:58 +0200
commitb590992f735393c97489fce191e7810eaae4f6d7 (patch)
tree286595c4aa43dbf3d616d816e5fade6ac364771a /src/libstrongswan/plugins/gcm/gcm_plugin.c
parent2fce29055b7b5bc2860d503d1ae822931f80b7aa (diff)
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b590992f735393c97489fce191e7810eaae4f6d7.tar.gz
vyos-strongswan-b590992f735393c97489fce191e7810eaae4f6d7.zip
Merge upstream version 4.5.2
Diffstat (limited to 'src/libstrongswan/plugins/gcm/gcm_plugin.c')
-rw-r--r--src/libstrongswan/plugins/gcm/gcm_plugin.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/libstrongswan/plugins/gcm/gcm_plugin.c b/src/libstrongswan/plugins/gcm/gcm_plugin.c
index 984026778..4b46f0ee4 100644
--- a/src/libstrongswan/plugins/gcm/gcm_plugin.c
+++ b/src/libstrongswan/plugins/gcm/gcm_plugin.c
@@ -19,11 +19,6 @@
#include "gcm_aead.h"
-<<<<<<< HEAD
-=======
-static const char *plugin_name = "gcm";
-
->>>>>>> upstream/4.5.1
typedef struct private_gcm_plugin_t private_gcm_plugin_t;
/**
@@ -37,6 +32,12 @@ struct private_gcm_plugin_t {
gcm_plugin_t public;
};
+METHOD(plugin_t, get_name, char*,
+ private_gcm_plugin_t *this)
+{
+ return "gcm";
+}
+
METHOD(plugin_t, destroy, void,
private_gcm_plugin_t *this)
{
@@ -52,35 +53,29 @@ METHOD(plugin_t, destroy, void,
plugin_t *gcm_plugin_create()
{
private_gcm_plugin_t *this;
-<<<<<<< HEAD
-=======
crypter_t *crypter;
->>>>>>> upstream/4.5.1
INIT(this,
- .public.plugin.destroy = _destroy,
+ .public = {
+ .plugin = {
+ .get_name = _get_name,
+ .reload = (void*)return_false,
+ .destroy = _destroy,
+ },
+ },
);
-<<<<<<< HEAD
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV8,
- (aead_constructor_t)gcm_aead_create);
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV12,
- (aead_constructor_t)gcm_aead_create);
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV16,
- (aead_constructor_t)gcm_aead_create);
-=======
crypter = lib->crypto->create_crypter(lib->crypto, ENCR_AES_CBC, 0);
if (crypter)
{
crypter->destroy(crypter);
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV8, plugin_name,
+ lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV8, get_name(this),
(aead_constructor_t)gcm_aead_create);
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV12, plugin_name,
+ lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV12, get_name(this),
(aead_constructor_t)gcm_aead_create);
- lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV16, plugin_name,
+ lib->crypto->add_aead(lib->crypto, ENCR_AES_GCM_ICV16, get_name(this),
(aead_constructor_t)gcm_aead_create);
}
->>>>>>> upstream/4.5.1
return &this->public.plugin;
}