aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/encoding/payloads/sa_payload.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-02-06 14:05:35 +0000
committerMartin Willi <martin@strongswan.org>2006-02-06 14:05:35 +0000
commit384efc76d58eea98648988045de413a6cc027dff (patch)
tree81aea82f04bde1f61c5dcfa3b3f50325dbe03ac7 /Source/charon/encoding/payloads/sa_payload.c
parent19f78a6fed6e966721e9e310099dbfa79489f9d9 (diff)
downloadstrongswan-384efc76d58eea98648988045de413a6cc027dff.tar.bz2
strongswan-384efc76d58eea98648988045de413a6cc027dff.tar.xz
- dead end implementation
Diffstat (limited to 'Source/charon/encoding/payloads/sa_payload.c')
-rw-r--r--Source/charon/encoding/payloads/sa_payload.c29
1 files changed, 28 insertions, 1 deletions
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
@@ -258,6 +258,34 @@ static void add_proposal_substructure (private_sa_payload_t *this,proposal_subst
}
/**
+ * 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.
*/
static status_t get_ike_proposals (private_sa_payload_t *this,ike_proposal_t ** proposals, size_t *proposal_count)
@@ -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