diff options
-rw-r--r-- | src/pluto/alg/ike_alg_dh_groups.c | 104 | ||||
-rw-r--r-- | src/pluto/ike_alg.h | 2 | ||||
-rw-r--r-- | src/pluto/ipsec_doi.c | 4 |
3 files changed, 55 insertions, 55 deletions
diff --git a/src/pluto/alg/ike_alg_dh_groups.c b/src/pluto/alg/ike_alg_dh_groups.c index bd682f222..7d9aea5ea 100644 --- a/src/pluto/alg/ike_alg_dh_groups.c +++ b/src/pluto/alg/ike_alg_dh_groups.c @@ -19,106 +19,106 @@ #include "ike_alg.h" struct dh_desc unset_group = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_NONE, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_NONE, + algo_next: NULL, - modulus_size: 0 + ke_size: 0 }; struct dh_desc dh_desc_modp_1024 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_1024_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_1024_BIT, + algo_next: NULL, - modulus_size: 1024 / BITS_PER_BYTE + ke_size: 1024 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_1536 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_1536_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_1536_BIT, + algo_next: NULL, - modulus_size: 1536 / BITS_PER_BYTE + ke_size: 1536 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_2048 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_2048_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_2048_BIT, + algo_next: NULL, - modulus_size: 2048 / BITS_PER_BYTE + ke_size: 2048 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_3072 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_3072_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_3072_BIT, + algo_next: NULL, - modulus_size: 3072 / BITS_PER_BYTE + ke_size: 3072 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_4096 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_4096_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_4096_BIT, + algo_next: NULL, - modulus_size: 4096 / BITS_PER_BYTE + ke_size: 4096 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_6144 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_6144_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_6144_BIT, + algo_next: NULL, - modulus_size: 6144 / BITS_PER_BYTE + ke_size: 6144 / BITS_PER_BYTE }; struct dh_desc dh_desc_modp_8192 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: MODP_8192_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: MODP_8192_BIT, + algo_next: NULL, - modulus_size: 8192 / BITS_PER_BYTE + ke_size: 8192 / BITS_PER_BYTE }; struct dh_desc dh_desc_ecp_256 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: ECP_256_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: ECP_256_BIT, + algo_next: NULL, - modulus_size: 256 / BITS_PER_BYTE + ke_size: 2*256 / BITS_PER_BYTE }; struct dh_desc dh_desc_ecp_384 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: ECP_384_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: ECP_384_BIT, + algo_next: NULL, - modulus_size: 384 / BITS_PER_BYTE + ke_size: 2*384 / BITS_PER_BYTE }; struct dh_desc dh_desc_ecp_521 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: ECP_521_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: ECP_521_BIT, + algo_next: NULL, - modulus_size: 528 / BITS_PER_BYTE + ke_size: 2*528 / BITS_PER_BYTE }; struct dh_desc dh_desc_ecp_192 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: ECP_192_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: ECP_192_BIT, + algo_next: NULL, - modulus_size: 192 / BITS_PER_BYTE + ke_size: 2*192 / BITS_PER_BYTE }; struct dh_desc dh_desc_ecp_224 = { - algo_type: IKE_ALG_DH_GROUP, - algo_id: ECP_224_BIT, - algo_next: NULL, + algo_type: IKE_ALG_DH_GROUP, + algo_id: ECP_224_BIT, + algo_next: NULL, - modulus_size: 224 / BITS_PER_BYTE + ke_size: 2*224 / BITS_PER_BYTE }; diff --git a/src/pluto/ike_alg.h b/src/pluto/ike_alg.h index 9a2ad92e0..1ab33bc14 100644 --- a/src/pluto/ike_alg.h +++ b/src/pluto/ike_alg.h @@ -80,7 +80,7 @@ struct dh_desc { u_int16_t algo_id; struct ike_alg *algo_next; - size_t modulus_size; + size_t ke_size; }; #define IKE_ALG_ENCRYPT 0 diff --git a/src/pluto/ipsec_doi.c b/src/pluto/ipsec_doi.c index 38fe1dd52..0a30c542f 100644 --- a/src/pluto/ipsec_doi.c +++ b/src/pluto/ipsec_doi.c @@ -167,10 +167,10 @@ static notification_t accept_KE(chunk_t *dest, const char *val_name, const struct dh_desc *gr, pb_stream *pbs) { - if (pbs_left(pbs) != gr->modulus_size) + if (pbs_left(pbs) != gr->ke_size) { loglog(RC_LOG_SERIOUS, "KE has %u byte DH public value; %u required" - , (unsigned) pbs_left(pbs), gr->modulus_size); + , (unsigned) pbs_left(pbs), gr->ke_size); /* XXX Could send notification back */ return INVALID_KEY_INFORMATION; } |