aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/encoding/payloads/proposal_substructure.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-29 12:23:40 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-29 12:23:40 +0000
commit346af6f3de4735b2c7c8b6abf824bd0258c4be6c (patch)
tree0a87d2b7aee3c3ce663c745bf58423b0ec3d1bfb /Source/charon/encoding/payloads/proposal_substructure.c
parente85220af90ac154e9badeece3aaaab30973f648f (diff)
downloadstrongswan-346af6f3de4735b2c7c8b6abf824bd0258c4be6c.tar.bz2
strongswan-346af6f3de4735b2c7c8b6abf824bd0258c4be6c.tar.xz
- fixed bug in diffie hellman exchange (no public value was written)
Diffstat (limited to 'Source/charon/encoding/payloads/proposal_substructure.c')
-rw-r--r--Source/charon/encoding/payloads/proposal_substructure.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/charon/encoding/payloads/proposal_substructure.c b/Source/charon/encoding/payloads/proposal_substructure.c
index c80880d77..354eedb9e 100644
--- a/Source/charon/encoding/payloads/proposal_substructure.c
+++ b/Source/charon/encoding/payloads/proposal_substructure.c
@@ -141,6 +141,9 @@ encoding_rule_t proposal_substructure_encodings[] = {
*/
static status_t verify(private_proposal_substructure_t *this)
{
+ status_t status = SUCCESS;
+ iterator_t *iterator;
+
if ((this->next_payload != NO_PAYLOAD) && (this->next_payload != PROPOSAL_SUBSTRUCTURE))
{
/* must be 0 or 2 */
@@ -157,9 +160,26 @@ static status_t verify(private_proposal_substructure_t *this)
/* reserved are not supported */
return FAILED;
}
+
+ iterator = this->transforms->create_iterator(this->transforms,TRUE);
+
+ while(iterator->has_next(iterator))
+ {
+ payload_t *current_transform;
+ iterator->current(iterator,(void **)&current_transform);
+
+ status = current_transform->verify(current_transform);
+ if (status != SUCCESS)
+ {
+ break;
+ }
+ }
+
+ iterator->destroy(iterator);
+
/* proposal number is checked in SA payload */
- return SUCCESS;
+ return status;
}
/**