diff options
author | Tobias Brunner <tobias@strongswan.org> | 2008-04-29 15:42:34 +0000 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2008-04-29 15:42:34 +0000 |
commit | ae7e837c30bb5ece30a79ada3eae241b46323ddf (patch) | |
tree | 164489ee755c7a666227f363263847b9caac02e9 /src/libstrongswan/plugins/openssl/openssl_plugin.c | |
parent | 4eda3aa2239606c4bd4942b3b96bec77d2a5a3d6 (diff) | |
download | strongswan-ae7e837c30bb5ece30a79ada3eae241b46323ddf.tar.bz2 strongswan-ae7e837c30bb5ece30a79ada3eae241b46323ddf.tar.xz |
adding diffie hellman with OpenSSL
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_plugin.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index 8145093a3..8b77f091f 100644 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c @@ -22,6 +22,7 @@ #include <library.h> #include "openssl_crypter.h" #include "openssl_hasher.h" +#include "openssl_diffie_hellman.h" typedef struct private_openssl_plugin_t private_openssl_plugin_t; @@ -45,6 +46,8 @@ static void destroy(private_openssl_plugin_t *this) (crypter_constructor_t)openssl_crypter_create); lib->crypto->remove_hasher(lib->crypto, (hasher_constructor_t)openssl_hasher_create); + lib->crypto->remove_dh(lib->crypto, + (dh_constructor_t)openssl_diffie_hellman_create); EVP_cleanup(); @@ -94,5 +97,23 @@ plugin_t *plugin_create() lib->crypto->add_hasher(lib->crypto, HASH_SHA512, (hasher_constructor_t)openssl_hasher_create); + /* diffie hellman */ + lib->crypto->add_dh(lib->crypto, MODP_768_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_1024_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_1536_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_2048_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_3072_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_4096_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_6144_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, MODP_8192_BIT, + (dh_constructor_t)openssl_diffie_hellman_create); + return &this->public.plugin; } |