aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-03-23 13:09:32 +0100
committerMartin Willi <martin@revosec.ch>2015-03-23 17:54:03 +0100
commita777155ffed7fc6382a2e344ebd748f70b1c61c2 (patch)
treea42f5956fce9b233e8dac63a92cb626a634a9942 /src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
parent42431690e04a8614e759e0a3a3bcd76e30e6207e (diff)
downloadstrongswan-a777155ffed7fc6382a2e344ebd748f70b1c61c2.tar.bz2
strongswan-a777155ffed7fc6382a2e344ebd748f70b1c61c2.tar.xz
diffie-hellman: Add a bool return value to set_other_public_value()
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
index 54dfbd01b..9ef15b41e 100644
--- a/src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
+++ b/src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
@@ -216,23 +216,24 @@ error:
return ret;
}
-METHOD(diffie_hellman_t, set_other_public_value, void,
+METHOD(diffie_hellman_t, set_other_public_value, bool,
private_openssl_ec_diffie_hellman_t *this, chunk_t value)
{
if (!chunk2ecp(this->ec_group, value, this->pub_key))
{
DBG1(DBG_LIB, "ECDH public value is malformed");
- return;
+ return FALSE;
}
chunk_clear(&this->shared_secret);
if (!compute_shared_key(this, &this->shared_secret)) {
DBG1(DBG_LIB, "ECDH shared secret computation failed");
- return;
+ return FALSE;
}
this->computed = TRUE;
+ return TRUE;
}
METHOD(diffie_hellman_t, get_my_public_value, bool,