diff options
author | Martin Willi <martin@strongswan.org> | 2006-02-16 09:55:07 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-02-16 09:55:07 +0000 |
commit | 30b5b412da849251d6000c2dc52731af3e5409b8 (patch) | |
tree | feb29be853a779cd1202a013ba0dc674e4c0f4fc /Source/charon/encoding/payloads/transform_substructure.c | |
parent | ce461bbd13c5ea6a94ba0b34cbb4d1be8159b67e (diff) | |
download | strongswan-30b5b412da849251d6000c2dc52731af3e5409b8.tar.bz2 strongswan-30b5b412da849251d6000c2dc52731af3e5409b8.tar.xz |
- installing of child sa works
- need correct IP adresses to actually use IPsec
Diffstat (limited to 'Source/charon/encoding/payloads/transform_substructure.c')
-rw-r--r-- | Source/charon/encoding/payloads/transform_substructure.c | 22 |
1 files changed, 7 insertions, 15 deletions
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; } |