ikev1: Determine transform ID before mapping integrity algorithm ID
Due to the lookup based on the mapped algorithm ID the resulting AH
proposals were invalid.
Fixes #2347.
Fixes: 8456d6f5a8 ("ikev1: Don't require AH mapping for integrity algorithm when generating proposal")
This commit is contained in:
@@ -1360,10 +1360,10 @@ 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 (alg)
|
if (alg)
|
||||||
{
|
{
|
||||||
transid = get_ikev1_transid_from_alg(INTEGRITY_ALGORITHM, alg);
|
|
||||||
if (!transform && transid)
|
if (!transform && transid)
|
||||||
{
|
{
|
||||||
transform = transform_substructure_create_type(
|
transform = transform_substructure_create_type(
|
||||||
|
|||||||
Reference in New Issue
Block a user