diff options
author | Martin Willi <martin@revosec.ch> | 2010-11-06 11:03:12 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-12-20 09:52:02 +0100 |
commit | a5c973b9559f03ab036caa076fa119260f1d0ceb (patch) | |
tree | 2c382919d3d7db66716e12087b180f0f533cc96a /src/libstrongswan/plugins/af_alg/af_alg_plugin.c | |
parent | e75e1c9473e055b6d1c4ddc3e69f213204c34065 (diff) | |
download | strongswan-a5c973b9559f03ab036caa076fa119260f1d0ceb.tar.bz2 strongswan-a5c973b9559f03ab036caa076fa119260f1d0ceb.tar.xz |
Implemented crypter on top of AF_ALG
Diffstat (limited to 'src/libstrongswan/plugins/af_alg/af_alg_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/af_alg/af_alg_plugin.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/af_alg/af_alg_plugin.c b/src/libstrongswan/plugins/af_alg/af_alg_plugin.c index 1290cbd05..8fbf2f7b5 100644 --- a/src/libstrongswan/plugins/af_alg/af_alg_plugin.c +++ b/src/libstrongswan/plugins/af_alg/af_alg_plugin.c @@ -19,6 +19,7 @@ #include "af_alg_hasher.h" #include "af_alg_signer.h" +#include "af_alg_crypter.h" typedef struct private_af_alg_plugin_t private_af_alg_plugin_t; @@ -40,6 +41,8 @@ METHOD(plugin_t, destroy, void, (hasher_constructor_t)af_alg_hasher_create); lib->crypto->remove_signer(lib->crypto, (signer_constructor_t)af_alg_signer_create); + lib->crypto->remove_crypter(lib->crypto, + (crypter_constructor_t)af_alg_crypter_create); free(this); } @@ -101,5 +104,18 @@ plugin_t *af_alg_plugin_create() lib->crypto->add_signer(lib->crypto, AUTH_CAMELLIA_XCBC_96, (signer_constructor_t)af_alg_signer_create); + lib->crypto->add_crypter(lib->crypto, ENCR_DES, + (crypter_constructor_t)af_alg_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_3DES, + (crypter_constructor_t)af_alg_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_AES_CBC, + (crypter_constructor_t)af_alg_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_AES_CTR, + (crypter_constructor_t)af_alg_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_CAMELLIA_CBC, + (crypter_constructor_t)af_alg_crypter_create); + lib->crypto->add_crypter(lib->crypto, ENCR_CAMELLIA_CTR, + (crypter_constructor_t)af_alg_crypter_create); + return &this->public.plugin; } |