summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/af_alg
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/af_alg')
-rw-r--r--src/libstrongswan/plugins/af_alg/Makefile.in3
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_crypter.c5
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_crypter.h4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_hasher.c4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_hasher.h4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_ops.c2
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_ops.h2
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_plugin.c16
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_prf.c4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_prf.h4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_signer.c4
-rw-r--r--src/libstrongswan/plugins/af_alg/af_alg_signer.h4
12 files changed, 36 insertions, 20 deletions
diff --git a/src/libstrongswan/plugins/af_alg/Makefile.in b/src/libstrongswan/plugins/af_alg/Makefile.in
index aa8df979e..00b54b026 100644
--- a/src/libstrongswan/plugins/af_alg/Makefile.in
+++ b/src/libstrongswan/plugins/af_alg/Makefile.in
@@ -244,6 +244,8 @@ nm_ca_dir = @nm_ca_dir@
oldincludedir = @oldincludedir@
openac_plugins = @openac_plugins@
p_plugins = @p_plugins@
+pcsclite_CFLAGS = @pcsclite_CFLAGS@
+pcsclite_LIBS = @pcsclite_LIBS@
pdfdir = @pdfdir@
piddir = @piddir@
pki_plugins = @pki_plugins@
@@ -267,6 +269,7 @@ soup_LIBS = @soup_LIBS@
srcdir = @srcdir@
strongswan_conf = @strongswan_conf@
sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_crypter.c b/src/libstrongswan/plugins/af_alg/af_alg_crypter.c
index 3416ad8d2..7b3c062aa 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_crypter.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_crypter.c
@@ -63,6 +63,7 @@ static struct {
size_t iv_size;
} algs[] = {
{ENCR_DES, "cbc(des)", 8, 8, 8, 8, },
+ {ENCR_DES_ECB, "ecb(des)", 8, 8, 8, 0, },
{ENCR_3DES, "cbc(des3_ede)", 8, 24, 24, 8, },
{ENCR_AES_CBC, "cbc(aes)", 16, 16, 16, 16, },
{ENCR_AES_CBC, "cbc(aes)", 16, 24, 24, 16, },
@@ -91,7 +92,7 @@ static struct {
/**
* See header.
*/
-void af_alg_crypter_probe()
+void af_alg_crypter_probe(char *plugin)
{
encryption_algorithm_t prev = -1;
af_alg_ops_t *ops;
@@ -105,7 +106,7 @@ void af_alg_crypter_probe()
if (ops)
{
ops->destroy(ops);
- lib->crypto->add_crypter(lib->crypto, algs[i].id, af_alg_plugin_name,
+ lib->crypto->add_crypter(lib->crypto, algs[i].id, plugin,
(crypter_constructor_t)af_alg_crypter_create);
}
}
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_crypter.h b/src/libstrongswan/plugins/af_alg/af_alg_crypter.h
index 711d2fc35..ed7799cc8 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_crypter.h
+++ b/src/libstrongswan/plugins/af_alg/af_alg_crypter.h
@@ -48,7 +48,9 @@ af_alg_crypter_t *af_alg_crypter_create(encryption_algorithm_t algo,
/**
* Probe algorithms and register af_alg_crypter_create().
+ *
+ * @param plugin plugin name to register algorithms for
*/
-void af_alg_crypter_probe();
+void af_alg_crypter_probe(char *plugin);
#endif /** AF_ALG_CRYPTER_H_ @}*/
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_hasher.c b/src/libstrongswan/plugins/af_alg/af_alg_hasher.c
index 7c6297d44..11074c4bd 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_hasher.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_hasher.c
@@ -59,7 +59,7 @@ static struct {
/**
* See header.
*/
-void af_alg_hasher_probe()
+void af_alg_hasher_probe(char *plugin)
{
af_alg_ops_t *ops;
int i;
@@ -70,7 +70,7 @@ void af_alg_hasher_probe()
if (ops)
{
ops->destroy(ops);
- lib->crypto->add_hasher(lib->crypto, algs[i].id, af_alg_plugin_name,
+ lib->crypto->add_hasher(lib->crypto, algs[i].id, plugin,
(hasher_constructor_t)af_alg_hasher_create);
}
}
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_hasher.h b/src/libstrongswan/plugins/af_alg/af_alg_hasher.h
index e0833e23a..f44ba2938 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_hasher.h
+++ b/src/libstrongswan/plugins/af_alg/af_alg_hasher.h
@@ -46,7 +46,9 @@ af_alg_hasher_t *af_alg_hasher_create(hash_algorithm_t algo);
/**
* Probe algorithms and register af_alg_hasher_create().
+ *
+ * @param plugin plugin name to register algorithms for
*/
-void af_alg_hasher_probe();
+void af_alg_hasher_probe(char *plugin);
#endif /** af_alg_HASHER_H_ @}*/
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_ops.c b/src/libstrongswan/plugins/af_alg/af_alg_ops.c
index 7bf1d90db..82a227d97 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_ops.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_ops.c
@@ -21,8 +21,6 @@
#include <debug.h>
-const char *af_alg_plugin_name = "af-alg";
-
typedef struct private_af_alg_ops_t private_af_alg_ops_t;
/**
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_ops.h b/src/libstrongswan/plugins/af_alg/af_alg_ops.h
index b7d642c00..ad164029f 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_ops.h
+++ b/src/libstrongswan/plugins/af_alg/af_alg_ops.h
@@ -33,8 +33,6 @@
#define SOL_ALG 279
#endif /* SOL_ALG */
-extern const char *af_alg_plugin_name;
-
typedef struct af_alg_ops_t af_alg_ops_t;
/**
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_plugin.c b/src/libstrongswan/plugins/af_alg/af_alg_plugin.c
index 54e39f1a0..280ea4e98 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_plugin.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_plugin.c
@@ -35,6 +35,12 @@ struct private_af_alg_plugin_t {
af_alg_plugin_t public;
};
+METHOD(plugin_t, get_name, char*,
+ private_af_alg_plugin_t *this)
+{
+ return "af-alg";
+}
+
METHOD(plugin_t, destroy, void,
private_af_alg_plugin_t *this)
{
@@ -60,15 +66,17 @@ plugin_t *af_alg_plugin_create()
INIT(this,
.public = {
.plugin = {
+ .get_name = _get_name,
+ .reload = (void*)return_false,
.destroy = _destroy,
},
},
);
- af_alg_hasher_probe();
- af_alg_signer_probe();
- af_alg_prf_probe();
- af_alg_crypter_probe();
+ af_alg_hasher_probe(get_name(this));
+ af_alg_signer_probe(get_name(this));
+ af_alg_prf_probe(get_name(this));
+ af_alg_crypter_probe(get_name(this));
return &this->public.plugin;
}
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_prf.c b/src/libstrongswan/plugins/af_alg/af_alg_prf.c
index 575906bae..1c1174abb 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_prf.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_prf.c
@@ -70,7 +70,7 @@ static struct {
/**
* See header.
*/
-void af_alg_prf_probe()
+void af_alg_prf_probe(char *plugin)
{
af_alg_ops_t *ops;
int i;
@@ -81,7 +81,7 @@ void af_alg_prf_probe()
if (ops)
{
ops->destroy(ops);
- lib->crypto->add_prf(lib->crypto, algs[i].id, af_alg_plugin_name,
+ lib->crypto->add_prf(lib->crypto, algs[i].id, plugin,
(prf_constructor_t)af_alg_prf_create);
}
}
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_prf.h b/src/libstrongswan/plugins/af_alg/af_alg_prf.h
index a3dea5649..d3275e7be 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_prf.h
+++ b/src/libstrongswan/plugins/af_alg/af_alg_prf.h
@@ -46,7 +46,9 @@ af_alg_prf_t *af_alg_prf_create(pseudo_random_function_t algo);
/**
* Probe algorithms and register af_alg_prf_create().
+ *
+ * @param plugin plugin name to register algorithms for
*/
-void af_alg_prf_probe();
+void af_alg_prf_probe(char *plugin);
#endif /** AF_ALG_PRF_H_ @}*/
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_signer.c b/src/libstrongswan/plugins/af_alg/af_alg_signer.c
index 3d6f907bf..34534a06b 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_signer.c
+++ b/src/libstrongswan/plugins/af_alg/af_alg_signer.c
@@ -71,7 +71,7 @@ static struct {
/**
* See header.
*/
-void af_alg_signer_probe()
+void af_alg_signer_probe(char *plugin)
{
af_alg_ops_t *ops;
int i;
@@ -82,7 +82,7 @@ void af_alg_signer_probe()
if (ops)
{
ops->destroy(ops);
- lib->crypto->add_signer(lib->crypto, algs[i].id, af_alg_plugin_name,
+ lib->crypto->add_signer(lib->crypto, algs[i].id, plugin,
(signer_constructor_t)af_alg_signer_create);
}
}
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_signer.h b/src/libstrongswan/plugins/af_alg/af_alg_signer.h
index b1d90707f..21487a118 100644
--- a/src/libstrongswan/plugins/af_alg/af_alg_signer.h
+++ b/src/libstrongswan/plugins/af_alg/af_alg_signer.h
@@ -46,7 +46,9 @@ af_alg_signer_t *af_alg_signer_create(integrity_algorithm_t algo);
/**
* Probe algorithms and register af_alg_signer_create().
+ *
+ * @param plugin plugin name to register algorithms for
*/
-void af_alg_signer_probe();
+void af_alg_signer_probe(char *plugin);
#endif /** AF_ALG_SIGNER_H_ @}*/