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:
Martin Willi
2015-03-23 17:54:02 +01:00
parent 4909612c3b
commit bace1d6479
18 changed files with 41 additions and 43 deletions
+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -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;
}