unit-tests: Tests for additional key exchanges

This commit is contained in:
Tobias Brunner 2019-11-04 16:17:30 +01:00 committed by Andreas Steffen
parent 70b8c73562
commit ccc4d49b73
2 changed files with 1081 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -276,6 +276,7 @@ METHOD(exchange_test_helper_t, establish_sa, void,
ike_sa_id_t *id_i, *id_r;
ike_sa_t *sa_i, *sa_r;
child_cfg_t *child_i;
proposal_t *proposal;
child_i = create_sa(this, init, resp, conf);
@ -293,6 +294,17 @@ METHOD(exchange_test_helper_t, establish_sa, void,
/* <-- IKE_SA_INIT */
id_i->set_responder_spi(id_i, id_r->get_responder_spi(id_r));
process_message(this, sa_i, NULL);
proposal = sa_i->get_proposal(sa_i);
if (proposal->get_algorithm(proposal, ADDITIONAL_KEY_EXCHANGE_1, NULL,
NULL))
{
/* IKE_INTERMEDIATE --> */
process_message(this, sa_r, NULL);
/* <-- IKE_INTERMEDIATE */
process_message(this, sa_i, NULL);
}
/* IKE_AUTH --> */
process_message(this, sa_r, NULL);
/* <-- IKE_AUTH */