From fc1a31d54b324625cca413583abc43406d70e930 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 22 May 2008 11:39:17 +0000 Subject: added ECDH with OpenSSL (see RFC 4753) --- src/libstrongswan/plugins/openssl/openssl_plugin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libstrongswan/plugins/openssl/openssl_plugin.c') diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index c888c2f90..7e57c7ab3 100644 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c @@ -23,6 +23,7 @@ #include "openssl_crypter.h" #include "openssl_hasher.h" #include "openssl_diffie_hellman.h" +#include "openssl_ec_diffie_hellman.h" #include "openssl_rsa_private_key.h" #include "openssl_rsa_public_key.h" @@ -50,6 +51,8 @@ static void destroy(private_openssl_plugin_t *this) (hasher_constructor_t)openssl_hasher_create); lib->crypto->remove_dh(lib->crypto, (dh_constructor_t)openssl_diffie_hellman_create); + lib->crypto->remove_dh(lib->crypto, + (dh_constructor_t)openssl_ec_diffie_hellman_create); lib->creds->remove_builder(lib->creds, (builder_constructor_t)openssl_rsa_private_key_builder); lib->creds->remove_builder(lib->creds, @@ -121,6 +124,14 @@ plugin_t *plugin_create() lib->crypto->add_dh(lib->crypto, MODP_8192_BIT, (dh_constructor_t)openssl_diffie_hellman_create); + /* ec diffie hellman */ + lib->crypto->add_dh(lib->crypto, ECP_256_BIT, + (dh_constructor_t)openssl_ec_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, ECP_384_BIT, + (dh_constructor_t)openssl_ec_diffie_hellman_create); + lib->crypto->add_dh(lib->crypto, ECP_521_BIT, + (dh_constructor_t)openssl_ec_diffie_hellman_create); + /* rsa */ lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA, (builder_constructor_t)openssl_rsa_private_key_builder); -- cgit v1.2.3