Add a return value to hasher_t.allocate_hash()

This commit is contained in:
Martin Willi
2012-07-16 14:55:06 +02:00
parent e185612dd8
commit 87dd205b61
40 changed files with 269 additions and 149 deletions
+2 -2
View File
@@ -124,11 +124,11 @@ METHOD(simaka_crypto_t, derive_keys_full, bool,
/* For SIM: MK = SHA1(Identity|n*Kc|NONCE_MT|Version List|Selected Version)
* For AKA: MK = SHA1(Identity|IK|CK) */
if (!this->hasher->get_hash(this->hasher, id->get_encoding(id), NULL))
if (!this->hasher->get_hash(this->hasher, id->get_encoding(id), NULL) ||
!this->hasher->allocate_hash(this->hasher, data, mk))
{
return FALSE;
}
this->hasher->allocate_hash(this->hasher, data, mk);
DBG3(DBG_LIB, "MK %B", mk);
/* K_encr | K_auth | MSK | EMSK = prf() | prf() | prf() | prf() */