ikev1: Don't require AH mapping for integrity algorithm when generating proposal
Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
committed by
Tobias Brunner
parent
d125941802
commit
8456d6f5a8
@@ -1360,18 +1360,21 @@ static void set_from_proposal_v1(private_proposal_substructure_t *this,
|
|||||||
enumerator = proposal->create_enumerator(proposal, INTEGRITY_ALGORITHM);
|
enumerator = proposal->create_enumerator(proposal, INTEGRITY_ALGORITHM);
|
||||||
if (enumerator->enumerate(enumerator, &alg, &key_size))
|
if (enumerator->enumerate(enumerator, &alg, &key_size))
|
||||||
{
|
{
|
||||||
transid = get_ikev1_transid_from_alg(INTEGRITY_ALGORITHM, alg);
|
|
||||||
alg = get_ikev1_auth_from_alg(alg);
|
alg = get_ikev1_auth_from_alg(alg);
|
||||||
if (transid && alg)
|
if (alg)
|
||||||
{
|
{
|
||||||
if (!transform)
|
transid = get_ikev1_transid_from_alg(INTEGRITY_ALGORITHM, alg);
|
||||||
|
if (!transform && transid)
|
||||||
{
|
{
|
||||||
transform = transform_substructure_create_type(
|
transform = transform_substructure_create_type(
|
||||||
PLV1_TRANSFORM_SUBSTRUCTURE, number, transid);
|
PLV1_TRANSFORM_SUBSTRUCTURE, number, transid);
|
||||||
}
|
}
|
||||||
transform->add_transform_attribute(transform,
|
if (transform)
|
||||||
transform_attribute_create_value(PLV1_TRANSFORM_ATTRIBUTE,
|
{
|
||||||
TATTR_PH2_AUTH_ALGORITHM, alg));
|
transform->add_transform_attribute(transform,
|
||||||
|
transform_attribute_create_value(PLV1_TRANSFORM_ATTRIBUTE,
|
||||||
|
TATTR_PH2_AUTH_ALGORITHM, alg));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
|
|||||||
Reference in New Issue
Block a user