Add a return value to mac_t.set_key()

This commit is contained in:
Martin Willi
2012-07-16 14:53:37 +02:00
parent 27e1eabbb5
commit 6ac8d861d9
7 changed files with 26 additions and 14 deletions
+3 -1
View File
@@ -62,8 +62,10 @@ struct mac_t {
* Any key length must be accepted.
*
* @param key key to set
* @return TRUE if key set successfully
*/
void (*set_key) (mac_t *this, chunk_t key);
__attribute__((warn_unused_result))
bool (*set_key) (mac_t *this, chunk_t key);
/**
* Destroys a mac_t object.
+1 -2
View File
@@ -68,8 +68,7 @@ METHOD(prf_t, get_key_size, size_t,
METHOD(prf_t, set_key, bool,
private_prf_t *this, chunk_t key)
{
this->mac->set_key(this->mac, key);
return TRUE;
return this->mac->set_key(this->mac, key);
}
METHOD(prf_t, destroy, void,
@@ -103,8 +103,7 @@ METHOD(signer_t, get_block_size, size_t,
METHOD(signer_t, set_key, bool,
private_signer_t *this, chunk_t key)
{
this->mac->set_key(this->mac, key);
return TRUE;
return this->mac->set_key(this->mac, key);
}
METHOD(signer_t, destroy, void,