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
+2 -2
View File
@@ -279,8 +279,8 @@ METHOD(mac_t, set_key, bool,
memset(iv.ptr, 0, iv.len);
l = chunk_alloca(this->b);
memset(l.ptr, 0, l.len);
this->k->set_key(this->k, resized);
if (!this->k->encrypt(this->k, l, iv, NULL))
if (!this->k->set_key(this->k, resized) ||
!this->k->encrypt(this->k, l, iv, NULL))
{
return FALSE;
}