diff options
author | Martin Willi <martin@revosec.ch> | 2011-11-22 16:16:19 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-03-20 17:30:48 +0100 |
commit | cd89f1a07429f457c0759ef00dfa68d02f224735 (patch) | |
tree | a32599474d765c2365c211f8d5018f4b3ca1b479 /src/libcharon/encoding/payloads/proposal_substructure.c | |
parent | 5351d63c79850ba19eb81b3d26b9679826257179 (diff) | |
download | strongswan-cd89f1a07429f457c0759ef00dfa68d02f224735.tar.bz2 strongswan-cd89f1a07429f457c0759ef00dfa68d02f224735.tar.xz |
Only add the first algorithm of a kind to IKEv1 transforms
Diffstat (limited to 'src/libcharon/encoding/payloads/proposal_substructure.c')
-rw-r--r-- | src/libcharon/encoding/payloads/proposal_substructure.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcharon/encoding/payloads/proposal_substructure.c b/src/libcharon/encoding/payloads/proposal_substructure.c index f0b6041bf..0555cba93 100644 --- a/src/libcharon/encoding/payloads/proposal_substructure.c +++ b/src/libcharon/encoding/payloads/proposal_substructure.c @@ -770,7 +770,7 @@ static void set_from_proposal_v1_ike(private_proposal_substructure_t *this, 0, IKEV1_TRANSID_KEY_IKE); enumerator = proposal->create_enumerator(proposal, ENCRYPTION_ALGORITHM); - while (enumerator->enumerate(enumerator, &alg, &key_size)) + if (enumerator->enumerate(enumerator, &alg, &key_size)) { alg = get_ikev1_from_alg(ENCRYPTION_ALGORITHM, alg); if (alg) @@ -790,7 +790,7 @@ static void set_from_proposal_v1_ike(private_proposal_substructure_t *this, /* encode the integrity algorithm as hash and assume use the same PRF */ enumerator = proposal->create_enumerator(proposal, INTEGRITY_ALGORITHM); - while (enumerator->enumerate(enumerator, &alg, &key_size)) + if (enumerator->enumerate(enumerator, &alg, &key_size)) { alg = get_ikev1_from_alg(INTEGRITY_ALGORITHM, alg); if (alg) @@ -803,7 +803,7 @@ static void set_from_proposal_v1_ike(private_proposal_substructure_t *this, enumerator->destroy(enumerator); enumerator = proposal->create_enumerator(proposal, DIFFIE_HELLMAN_GROUP); - while (enumerator->enumerate(enumerator, &alg, &key_size)) + if (enumerator->enumerate(enumerator, &alg, &key_size)) { transform->add_transform_attribute(transform, transform_attribute_create_value(TRANSFORM_ATTRIBUTE_V1, @@ -854,7 +854,7 @@ static void set_from_proposal_v1_esp(private_proposal_substructure_t *this, } enumerator = proposal->create_enumerator(proposal, INTEGRITY_ALGORITHM); - while (enumerator->enumerate(enumerator, &alg, &key_size)) + if (enumerator->enumerate(enumerator, &alg, &key_size)) { alg = get_ikev1_from_alg(INTEGRITY_ALGORITHM, alg); if (alg) |