added the ECP groups from RFC 5114
This commit is contained in:
@@ -314,6 +314,12 @@ openssl_ec_diffie_hellman_t *openssl_ec_diffie_hellman_create(diffie_hellman_gro
|
||||
|
||||
switch (group)
|
||||
{
|
||||
case ECP_192_BIT:
|
||||
this->key = EC_KEY_new_by_curve_name(NID_X9_62_prime192v1);
|
||||
break;
|
||||
case ECP_224_BIT:
|
||||
this->key = EC_KEY_new_by_curve_name(NID_secp224r1);
|
||||
break;
|
||||
case ECP_256_BIT:
|
||||
this->key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
|
||||
break;
|
||||
|
||||
@@ -125,6 +125,10 @@ plugin_t *plugin_create()
|
||||
(dh_constructor_t)openssl_diffie_hellman_create);
|
||||
|
||||
/* ec diffie hellman */
|
||||
lib->crypto->add_dh(lib->crypto, ECP_192_BIT,
|
||||
(dh_constructor_t)openssl_ec_diffie_hellman_create);
|
||||
lib->crypto->add_dh(lib->crypto, ECP_224_BIT,
|
||||
(dh_constructor_t)openssl_ec_diffie_hellman_create);
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user