From b0b9d185931e7f88f0f7c89e9ef4e6034ac38dd3 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 16 Nov 2011 09:29:38 +0100 Subject: Extend sa_payload for IKEv1 support --- src/conftest/hooks/custom_proposal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/conftest/hooks/custom_proposal.c') diff --git a/src/conftest/hooks/custom_proposal.c b/src/conftest/hooks/custom_proposal.c index e4acd841f..9522335b1 100644 --- a/src/conftest/hooks/custom_proposal.c +++ b/src/conftest/hooks/custom_proposal.c @@ -145,7 +145,8 @@ METHOD(listener_t, message, bool, proposal->get_protocol(proposal), proposal->get_spi(proposal)); DBG1(DBG_CFG, "injecting custom proposal: %#P", new_props); - new = sa_payload_create_from_proposal_list(new_props); + new = sa_payload_create_from_proposal_list( + SECURITY_ASSOCIATION, new_props); message->add_payload(message, (payload_t*)new); new_props->destroy_offset(new_props, offsetof(proposal_t, destroy)); } -- cgit v1.2.3 From e174e0d4455e30a8d9a1900916a195f20588afdb Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 24 Nov 2011 11:39:31 +0100 Subject: Added not-yet used sa_payload parameters used in IKEv1 --- src/conftest/hooks/custom_proposal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/conftest/hooks/custom_proposal.c') diff --git a/src/conftest/hooks/custom_proposal.c b/src/conftest/hooks/custom_proposal.c index 9522335b1..4acea18ce 100644 --- a/src/conftest/hooks/custom_proposal.c +++ b/src/conftest/hooks/custom_proposal.c @@ -145,8 +145,7 @@ METHOD(listener_t, message, bool, proposal->get_protocol(proposal), proposal->get_spi(proposal)); DBG1(DBG_CFG, "injecting custom proposal: %#P", new_props); - new = sa_payload_create_from_proposal_list( - SECURITY_ASSOCIATION, new_props); + new = sa_payload_create_from_proposals_v2(new_props); message->add_payload(message, (payload_t*)new); new_props->destroy_offset(new_props, offsetof(proposal_t, destroy)); } -- cgit v1.2.3 From 47b8f6ef4b3637e94d4b211721b38ba263f6d9c0 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 19 Jan 2012 16:22:25 +0100 Subject: Invoke bus_t.message hook twice, once plain and parsed, once encoded and encrypted --- src/conftest/hooks/custom_proposal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/conftest/hooks/custom_proposal.c') diff --git a/src/conftest/hooks/custom_proposal.c b/src/conftest/hooks/custom_proposal.c index 4acea18ce..958bc1052 100644 --- a/src/conftest/hooks/custom_proposal.c +++ b/src/conftest/hooks/custom_proposal.c @@ -111,9 +111,9 @@ static linked_list_t* load_proposals(private_custom_proposal_t *this, METHOD(listener_t, message, bool, private_custom_proposal_t *this, ike_sa_t *ike_sa, message_t *message, - bool incoming) + bool incoming, bool plain) { - if (!incoming && + if (!incoming && plain && message->get_request(message) == this->req && message->get_message_id(message) == this->id) { -- cgit v1.2.3