Add a return value to crypter_t.set_key()

This commit is contained in:
Martin Willi
2012-07-16 14:53:38 +02:00
parent 3b96189a2a
commit ce73fc19db
23 changed files with 87 additions and 57 deletions
@@ -339,8 +339,8 @@ static status_t ChallengeResponse(chunk_t challenge_hash, chunk_t password_hash,
chunk_t expanded, encrypted;
expanded = ExpandDESKey(keys[i]);
crypter->set_key(crypter, expanded);
if (!crypter->encrypt(crypter, challenge_hash, chunk_empty, &encrypted))
if (!crypter->set_key(crypter, expanded) ||
!crypter->encrypt(crypter, challenge_hash, chunk_empty, &encrypted))
{
chunk_clear(&expanded);
crypter->destroy(crypter);