added ECDH with OpenSSL (see RFC 4753)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user