Added support for DH groups 22, 23 and 24, patch contributed by Joy Latten
This commit is contained in:
@@ -920,12 +920,15 @@ static const char *const oakley_group_name_rfc4753[] = {
|
||||
};
|
||||
|
||||
static const char *const oakley_group_name_rfc5114[] = {
|
||||
"MODP_1024_160",
|
||||
"MODP_2048_224",
|
||||
"MODP_2048_256",
|
||||
"ECP_192",
|
||||
"ECP_224"
|
||||
};
|
||||
|
||||
enum_names oakley_group_names_rfc5114 =
|
||||
{ ECP_192_BIT, ECP_224_BIT,
|
||||
{ MODP_1024_160, ECP_224_BIT,
|
||||
oakley_group_name_rfc5114, NULL };
|
||||
|
||||
enum_names oakley_group_names_rfc4753 =
|
||||
|
||||
@@ -237,6 +237,27 @@ static struct dh_desc dh_desc_ecp_521 = {
|
||||
ke_size: 2*528 / BITS_PER_BYTE
|
||||
};
|
||||
|
||||
static struct dh_desc dh_desc_modp_1024_160 = {
|
||||
algo_type: IKE_ALG_DH_GROUP,
|
||||
algo_id: MODP_1024_160,
|
||||
algo_next: NULL,
|
||||
ke_size: 1024 / BITS_PER_BYTE
|
||||
};
|
||||
|
||||
static struct dh_desc dh_desc_modp_2048_224 = {
|
||||
algo_type: IKE_ALG_DH_GROUP,
|
||||
algo_id: MODP_2048_224,
|
||||
algo_next: NULL,
|
||||
ke_size: 2048 / BITS_PER_BYTE
|
||||
};
|
||||
|
||||
static struct dh_desc dh_desc_modp_2048_256 = {
|
||||
algo_type: IKE_ALG_DH_GROUP,
|
||||
algo_id: MODP_2048_256,
|
||||
algo_next: NULL,
|
||||
ke_size: 2048 / BITS_PER_BYTE
|
||||
};
|
||||
|
||||
static struct dh_desc dh_desc_ecp_192 = {
|
||||
algo_type: IKE_ALG_DH_GROUP,
|
||||
algo_id: ECP_192_BIT,
|
||||
@@ -370,6 +391,15 @@ bool init_crypto(void)
|
||||
case ECP_521_BIT:
|
||||
desc = &dh_desc_ecp_521;
|
||||
break;
|
||||
case MODP_1024_160:
|
||||
desc = &dh_desc_modp_1024_160;
|
||||
break;
|
||||
case MODP_2048_224:
|
||||
desc = &dh_desc_modp_2048_224;
|
||||
break;
|
||||
case MODP_2048_256:
|
||||
desc = &dh_desc_modp_2048_256;
|
||||
break;
|
||||
case ECP_192_BIT:
|
||||
desc = &dh_desc_ecp_192;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user