From 384efc76d58eea98648988045de413a6cc027dff Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 6 Feb 2006 14:05:35 +0000 Subject: - dead end implementation --- Source/charon/encoding/payloads/sa_payload.c | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'Source/charon/encoding/payloads/sa_payload.c') diff --git a/Source/charon/encoding/payloads/sa_payload.c b/Source/charon/encoding/payloads/sa_payload.c index 1ef67a2c9..b433d67ac 100644 --- a/Source/charon/encoding/payloads/sa_payload.c +++ b/Source/charon/encoding/payloads/sa_payload.c @@ -257,6 +257,34 @@ static void add_proposal_substructure (private_sa_payload_t *this,proposal_subst this->compute_length(this); } +/** + * Implementation of sa_payload_t.add_child_proposal. + */ +static void add_child_proposal(private_sa_payload_t *this, child_proposal_t *proposal) +{ + proposal_substructure_t *substructure; + protocol_id_t proto; + + /* watch out to build the substructures in the right order */ + proto = proposal->get_first_protocol(proposal); + if (proto != AH && proto != ESP) + { + return; + } + substructure = proposal_substructure_create_from_child_proposal(proposal, proto); + add_proposal_substructure(this, substructure); + + /* first is done, now do the (possible) other */ + proto = proposal->get_second_protocol(proposal); + if (proto != AH && proto != ESP) + { + return; + } + substructure = proposal_substructure_create_from_child_proposal(proposal, proto); + add_proposal_substructure(this, substructure); +} + + /** * Implementation of sa_payload_t.get_ike_proposals. */ @@ -267,7 +295,6 @@ static status_t get_ike_proposals (private_sa_payload_t *this,ike_proposal_t ** iterator_t *iterator; ike_proposal_t *tmp_proposals; - iterator = this->proposals->create_iterator(this->proposals,TRUE); /* first find out the number of ike proposals and check their number of transforms and -- cgit v1.2.3