Rename MODP_NONE to KE_NONE

This commit is contained in:
Andreas Steffen
2022-06-29 10:28:50 +02:00
committed by Tobias Brunner
parent 3af7c6db87
commit b7c167f972
17 changed files with 78 additions and 77 deletions
+1 -1
View File
@@ -489,7 +489,7 @@ METHOD(child_cfg_t, get_ke_method, key_exchange_method_t,
{
enumerator_t *enumerator;
proposal_t *proposal;
uint16_t method = MODP_NONE;
uint16_t method = KE_NONE;
enumerator = this->proposals->create_enumerator(this->proposals);
while (enumerator->enumerate(enumerator, &proposal))
+1 -1
View File
@@ -353,7 +353,7 @@ METHOD(ike_cfg_t, get_ke_method, key_exchange_method_t,
{
enumerator_t *enumerator;
proposal_t *proposal;
uint16_t method = MODP_NONE;
uint16_t method = KE_NONE;
enumerator = this->proposals->create_enumerator(this->proposals);
while (enumerator->enumerate(enumerator, &proposal))
+1 -1
View File
@@ -234,7 +234,7 @@ ke_payload_t *ke_payload_create(payload_type_t type)
.destroy = _destroy,
},
.next_payload = PL_NONE,
.ke_method = MODP_NONE,
.ke_method = KE_NONE,
.type = type,
);
this->payload_length = get_header_length(this);
@@ -253,7 +253,7 @@ METHOD(task_t, build_i, status_t,
message->add_payload(message, &sa_payload->payload_interface);
group = this->ike_cfg->get_ke_method(this->ike_cfg);
if (group == MODP_NONE)
if (group == KE_NONE)
{
DBG1(DBG_IKE, "DH group selection failed");
return FAILED;
+5 -5
View File
@@ -782,7 +782,7 @@ static status_t send_notify(private_quick_mode_t *this, notify_type_t type)
/**
* Prepare a list of proposals from child_config containing only the specified
* DH group, unless it is set to MODP_NONE.
* DH group, unless it is set to KE_NONE.
*/
static linked_list_t *get_proposals(private_quick_mode_t *this,
key_exchange_method_t group)
@@ -795,7 +795,7 @@ static linked_list_t *get_proposals(private_quick_mode_t *this,
enumerator = list->create_enumerator(list);
while (enumerator->enumerate(enumerator, &proposal))
{
if (group != MODP_NONE)
if (group != KE_NONE)
{
if (!proposal->has_ke_method(proposal, group))
{
@@ -867,7 +867,7 @@ METHOD(task_t, build_i, status_t,
}
group = this->config->get_ke_method(this->config);
if (group != MODP_NONE)
if (group != KE_NONE)
{
proposal_t *proposal;
uint16_t preferred_group;
@@ -900,7 +900,7 @@ METHOD(task_t, build_i, status_t,
}
else
{
list = get_proposals(this, MODP_NONE);
list = get_proposals(this, KE_NONE);
}
get_lifetimes(this);
@@ -915,7 +915,7 @@ METHOD(task_t, build_i, status_t,
{
return FAILED;
}
if (group != MODP_NONE)
if (group != KE_NONE)
{
if (!add_ke(this, message))
{
+9 -9
View File
@@ -325,7 +325,7 @@ static bool update_and_check_proposals(private_child_create_t *this)
proposal->set_spi(proposal, this->my_spi);
/* move the selected DH group to the front, if any */
if (this->dh_group != MODP_NONE)
if (this->dh_group != KE_NONE)
{ /* proposals that don't contain the selected group are
* moved to the back */
if (!proposal->promote_ke_method(proposal, this->dh_group))
@@ -348,7 +348,7 @@ static bool update_and_check_proposals(private_child_create_t *this)
enumerator->destroy(enumerator);
other_dh_groups->destroy(other_dh_groups);
return this->dh_group == MODP_NONE || found;
return this->dh_group == KE_NONE || found;
}
/**
@@ -571,7 +571,7 @@ static status_t select_and_install(private_child_create_t *this,
DBG1(DBG_IKE, "ignoring KE exchange, agreed on a non-PFS proposal");
DESTROY_IF(this->dh);
this->dh = NULL;
this->dh_group = MODP_NONE;
this->dh_group = KE_NONE;
}
if (this->initiator)
@@ -1156,7 +1156,7 @@ METHOD(task_t, build_i, status_t,
message->set_exchange_type(message, EXCHANGE_TYPE_UNDEFINED);
return SUCCESS;
}
if (!this->retry && this->dh_group == MODP_NONE)
if (!this->retry && this->dh_group == KE_NONE)
{ /* during a rekeying the group might already be set */
this->dh_group = this->config->get_ke_method(this->config);
}
@@ -1245,7 +1245,7 @@ METHOD(task_t, build_i, status_t,
}
this->proposals = this->config->get_proposals(this->config,
this->dh_group == MODP_NONE);
this->dh_group == KE_NONE);
this->mode = this->config->get_mode(this->config);
this->child.if_id_in_def = this->ike_sa->get_if_id(this->ike_sa, TRUE);
@@ -1292,7 +1292,7 @@ METHOD(task_t, build_i, status_t,
return FAILED;
}
if (this->dh_group != MODP_NONE)
if (this->dh_group != KE_NONE)
{
this->dh = this->keymat->keymat.create_ke(&this->keymat->keymat,
this->dh_group);
@@ -1819,7 +1819,7 @@ METHOD(task_t, process_i, status_t,
case INVALID_KE_PAYLOAD:
{
chunk_t data;
uint16_t group = MODP_NONE;
uint16_t group = KE_NONE;
data = notify->get_notification_data(notify);
if (data.len == sizeof(group))
@@ -2016,7 +2016,7 @@ METHOD(task_t, migrate, void,
}
if (!this->rekey && !this->retry)
{
this->dh_group = MODP_NONE;
this->dh_group = KE_NONE;
}
this->ike_sa = ike_sa;
this->keymat = (keymat_v2_t*)ike_sa->get_keymat(ike_sa);
@@ -2102,7 +2102,7 @@ child_create_t *child_create_create(ike_sa_t *ike_sa,
.config = config,
.packet_tsi = tsi ? tsi->clone(tsi) : NULL,
.packet_tsr = tsr ? tsr->clone(tsr) : NULL,
.dh_group = MODP_NONE,
.dh_group = KE_NONE,
.keymat = (keymat_v2_t*)ike_sa->get_keymat(ike_sa),
.mode = MODE_TUNNEL,
.tfcv3 = TRUE,
+1 -1
View File
@@ -1146,7 +1146,7 @@ ike_init_t *ike_init_create(ike_sa_t *ike_sa, bool initiator, ike_sa_t *old_sa)
},
.ike_sa = ike_sa,
.initiator = initiator,
.dh_group = MODP_NONE,
.dh_group = KE_NONE,
.keymat = (keymat_v2_t*)ike_sa->get_keymat(ike_sa),
.old_sa = old_sa,
.signature_authentication = lib->settings->get_bool(lib->settings,