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:
@@ -425,7 +425,7 @@ METHOD(keymat_v1_t, derive_ike_keys, bool,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (dh->get_shared_secret(dh, &g_xy) != SUCCESS)
|
||||
if (!dh->get_shared_secret(dh, &g_xy))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -661,7 +661,7 @@ METHOD(keymat_v1_t, derive_child_keys, bool,
|
||||
protocol = proposal->get_protocol(proposal);
|
||||
if (dh)
|
||||
{
|
||||
if (dh->get_shared_secret(dh, &secret) != SUCCESS)
|
||||
if (!dh->get_shared_secret(dh, &secret))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ METHOD(keymat_v2_t, derive_ike_keys, bool,
|
||||
spi_i = chunk_alloca(sizeof(u_int64_t));
|
||||
spi_r = chunk_alloca(sizeof(u_int64_t));
|
||||
|
||||
if (dh->get_shared_secret(dh, &secret) != SUCCESS)
|
||||
if (!dh->get_shared_secret(dh, &secret))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -554,7 +554,7 @@ METHOD(keymat_v2_t, derive_child_keys, bool,
|
||||
|
||||
if (dh)
|
||||
{
|
||||
if (dh->get_shared_secret(dh, &secret) != SUCCESS)
|
||||
if (!dh->get_shared_secret(dh, &secret))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user