fixing keylength bug at the right place:

we usually don't touch output parameters if operations fails
This commit is contained in:
Martin Willi
2008-11-12 08:27:48 +00:00
parent 137484895a
commit 9fa5c75f48
2 changed files with 2 additions and 10 deletions
+1 -9
View File
@@ -210,21 +210,13 @@ static bool get_algorithm(private_proposal_t *this, transform_type_t type,
u_int16_t *alg, u_int16_t *key_size)
{
enumerator_t *enumerator;
bool found;
bool found = FALSE;
enumerator = create_enumerator(this, type);
if (enumerator->enumerate(enumerator, alg, key_size))
{
found = TRUE;
}
else
{
if (key_size)
{
*key_size = 0;
}
found = FALSE;
}
enumerator->destroy(enumerator);
return found;
}