Add a return value to signer_t.allocate_signature()
This commit is contained in:
@@ -56,7 +56,7 @@ METHOD(signer_t, get_signature, void,
|
||||
}
|
||||
}
|
||||
|
||||
METHOD(signer_t, allocate_signature, void,
|
||||
METHOD(signer_t, allocate_signature, bool,
|
||||
private_signer_t *this, chunk_t data, chunk_t *chunk)
|
||||
{
|
||||
if (chunk == NULL)
|
||||
@@ -72,6 +72,7 @@ METHOD(signer_t, allocate_signature, void,
|
||||
*chunk = chunk_alloc(this->truncation);
|
||||
memcpy(chunk->ptr, mac, this->truncation);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
METHOD(signer_t, verify_signature, bool,
|
||||
|
||||
@@ -102,8 +102,10 @@ struct signer_t {
|
||||
*
|
||||
* @param data a chunk containing the data to sign
|
||||
* @param chunk chunk which will hold the allocated signature
|
||||
* @return TRUE if signature allocated successfully
|
||||
*/
|
||||
void (*allocate_signature) (signer_t *this, chunk_t data, chunk_t *chunk);
|
||||
__attribute__((warn_unused_result))
|
||||
bool (*allocate_signature) (signer_t *this, chunk_t data, chunk_t *chunk);
|
||||
|
||||
/**
|
||||
* Verify a signature.
|
||||
|
||||
Reference in New Issue
Block a user