diffie-hellman: Use bool instead of status_t as get_shared_secret() return value
While such a change is not unproblematic, keeping status_t makes the API inconsistent once we introduce return values for the public value operations.
This commit is contained in:
@@ -139,17 +139,17 @@ METHOD(diffie_hellman_t, get_my_public_value, void,
|
||||
}
|
||||
}
|
||||
|
||||
METHOD(diffie_hellman_t, get_shared_secret, status_t,
|
||||
METHOD(diffie_hellman_t, get_shared_secret, bool,
|
||||
private_ntru_ke_t *this, chunk_t *secret)
|
||||
{
|
||||
if (!this->computed || !this->shared_secret.len)
|
||||
{
|
||||
*secret = chunk_empty;
|
||||
return FAILED;
|
||||
return FALSE;
|
||||
}
|
||||
*secret = chunk_clone(this->shared_secret);
|
||||
|
||||
return SUCCESS;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user