ike-sa: Use a struct to pass optional arguments when initiating CHILD_SAs
This commit is contained in:
@@ -44,7 +44,7 @@ START_TEST(test_collision_ike_rekey)
|
||||
traffic_selector_create_dynamic(0, 0, 65535));
|
||||
child_cfg->add_traffic_selector(child_cfg, FALSE,
|
||||
traffic_selector_create_dynamic(0, 0, 65535));
|
||||
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, child_cfg, NULL);
|
||||
assert_child_sa_count(a, 1);
|
||||
assert_hook();
|
||||
|
||||
@@ -81,7 +81,7 @@ START_TEST(test_collision_ike_rekey)
|
||||
ck_assert(!exchange_test_helper->sender->dequeue(exchange_test_helper->sender));
|
||||
assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE);
|
||||
assert_num_tasks(a, 1, TASK_QUEUE_QUEUED);
|
||||
call_ikesa(a, initiate, NULL, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, NULL, NULL);
|
||||
assert_num_tasks(a, 0, TASK_QUEUE_ACTIVE);
|
||||
|
||||
assert_sa_idle(b);
|
||||
|
||||
@@ -44,7 +44,7 @@ START_TEST(test_regular)
|
||||
id_a = a->get_id(a);
|
||||
id_b = b->get_id(b);
|
||||
|
||||
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, child_cfg, NULL);
|
||||
|
||||
/* IKE_SA_INIT --> */
|
||||
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
|
||||
@@ -115,7 +115,7 @@ START_TEST(test_regular_manual)
|
||||
id_a = a->get_id(a);
|
||||
id_b = b->get_id(b);
|
||||
|
||||
call_ikesa(a, initiate, NULL, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, NULL, NULL);
|
||||
|
||||
/* IKE_SA_INIT --> */
|
||||
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
|
||||
@@ -144,7 +144,7 @@ START_TEST(test_regular_manual)
|
||||
assert_sa_idle(a);
|
||||
assert_sa_idle(b);
|
||||
|
||||
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, child_cfg, NULL);
|
||||
|
||||
/* CREATE_CHILD_SA { SA, Ni, KEi, TSi, TSr } --> */
|
||||
assert_hook_called(child_updown);
|
||||
@@ -192,7 +192,7 @@ START_TEST(test_failure_init)
|
||||
id_a = a->get_id(a);
|
||||
id_b = b->get_id(b);
|
||||
|
||||
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, child_cfg, NULL);
|
||||
|
||||
/* IKE_SA_INIT --> */
|
||||
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
|
||||
@@ -233,7 +233,7 @@ START_TEST(test_failure_resp)
|
||||
id_a = a->get_id(a);
|
||||
id_b = b->get_id(b);
|
||||
|
||||
call_ikesa(a, initiate, child_cfg, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, child_cfg, NULL);
|
||||
|
||||
/* IKE_SA_INIT --> */
|
||||
id_b->set_initiator_spi(id_b, id_a->get_initiator_spi(id_a));
|
||||
|
||||
@@ -493,7 +493,7 @@ START_TEST(test_active)
|
||||
charon->bus->remove_listener(charon->bus, &mid.listener);
|
||||
|
||||
/* the active task was queued again */
|
||||
call_ikesa(a, initiate, NULL, 0, NULL, NULL);
|
||||
call_ikesa(a, initiate, NULL, NULL);
|
||||
exchange_test_helper->process_message(exchange_test_helper, b, NULL);
|
||||
exchange_test_helper->process_message(exchange_test_helper, a, NULL);
|
||||
send_dpd(b, a);
|
||||
|
||||
@@ -273,7 +273,7 @@ METHOD(exchange_test_helper_t, establish_sa, void,
|
||||
id_i = sa_i->get_id(sa_i);
|
||||
id_r = sa_r->get_id(sa_r);
|
||||
|
||||
call_ikesa(sa_i, initiate, child_i, 0, NULL, NULL);
|
||||
call_ikesa(sa_i, initiate, child_i, NULL);
|
||||
|
||||
/* IKE_SA_INIT --> */
|
||||
id_r->set_initiator_spi(id_r, id_i->get_initiator_spi(id_i));
|
||||
|
||||
Reference in New Issue
Block a user