second_iter->reset(second_iter);
while (second_iter->iterate(second_iter, (void**)&second_alg))
{
- DBG2(DBG_CFG, "comparing algo %d - %d, keylen %d - %d",
- first_alg->algorithm, second_alg->algorithm,
- first_alg->key_size, second_alg->key_size);
if (first_alg->algorithm == second_alg->algorithm &&
first_alg->key_size == second_alg->key_size)
{
else
{
selected->destroy(selected);
- DBG2(DBG_CFG, " no acceptable ENCRYPTION_ALGORITHM found contained %d - %d, skipping",
- this->encryption_algos->get_count(this->encryption_algos), other->encryption_algos->get_count(other->encryption_algos));
+ DBG2(DBG_CFG, " no acceptable ENCRYPTION_ALGORITHM found, skipping");
return NULL;
}
/* select integrity algorithm */
my_vip = this->ike_sa->get_virtual_ip(this->ike_sa, TRUE);
other_vip = this->ike_sa->get_virtual_ip(this->ike_sa, FALSE);
- DBG1(DBG_IKE, "received %d proposals, selecting:", this->proposals->get_count(this->proposals));
this->proposal = this->policy->select_proposal(this->policy, this->proposals);
- DBG1(DBG_IKE, "proposal is %p", this->proposal);
+
+ if (this->proposal == NULL)
+ {
+ SIG(CHILD_UP_FAILED, "no acceptable proposal found");
+ return FAILED;
+ }
if (this->initiator && my_vip)
{ /* if we have a virtual IP, shorten our TS to the minimum */
this->tsi = other_ts;
}
- if (this->proposal == NULL)
- {
- SIG(CHILD_UP_FAILED, "no acceptable proposal found");
- return FAILED;
- }
-
if (this->tsi->get_count(this->tsi) == 0 ||
this->tsr->get_count(this->tsr) == 0)
{