From 30b5b412da849251d6000c2dc52731af3e5409b8 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 16 Feb 2006 09:55:07 +0000 Subject: - installing of child sa works - need correct IP adresses to actually use IPsec --- .../encoding/payloads/transform_substructure.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'Source/charon/encoding/payloads/transform_substructure.c') diff --git a/Source/charon/encoding/payloads/transform_substructure.c b/Source/charon/encoding/payloads/transform_substructure.c index e2f368fd8..9b0bbf4ed 100644 --- a/Source/charon/encoding/payloads/transform_substructure.c +++ b/Source/charon/encoding/payloads/transform_substructure.c @@ -343,7 +343,6 @@ static void compute_length (private_transform_substructure_t *this) iterator->destroy(iterator); this->transform_length = length; - } /** @@ -476,20 +475,13 @@ transform_substructure_t *transform_substructure_create_type(transform_type_t tr transform->set_transform_type(transform,transform_type); transform->set_transform_id(transform,transform_id); - switch (transform_type) + /* a keylength attribute is only created for AES encryption */ + if (transform_type == ENCRYPTION_ALGORITHM && + transform_id == ENCR_AES_CBC) { - case ENCRYPTION_ALGORITHM: - case PSEUDO_RANDOM_FUNCTION: - case INTEGRITY_ALGORITHM: - { - transform_attribute_t *attribute = transform_attribute_create_key_length(key_length); - transform->add_transform_attribute(transform,attribute); - break; - } - default: - { - /* no keylength attribute is created */ - } - } + transform_attribute_t *attribute = transform_attribute_create_key_length(key_length); + transform->add_transform_attribute(transform,attribute); + } + return transform; } -- cgit v1.2.3