Add a return value to crypter_t.set_key()

This commit is contained in:
Martin Willi committed 2012-07-16 14:53:38 +02:00
1 parent 3b96189a2a
commit ce73fc19db
23 files changed
+87 -57

No files matched your search

@@ -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);