From a777155ffed7fc6382a2e344ebd748f70b1c61c2 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 23 Mar 2015 13:09:32 +0100 Subject: diffie-hellman: Add a bool return value to set_other_public_value() --- src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c') diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c index 64b650b4a..7a0aa1a6a 100644 --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c @@ -87,7 +87,7 @@ METHOD(diffie_hellman_t, get_shared_secret, bool, } -METHOD(diffie_hellman_t, set_other_public_value, void, +METHOD(diffie_hellman_t, set_other_public_value, bool, private_openssl_diffie_hellman_t *this, chunk_t value) { int len; @@ -100,10 +100,11 @@ METHOD(diffie_hellman_t, set_other_public_value, void, if (len < 0) { DBG1(DBG_LIB, "DH shared secret computation failed"); - return; + return FALSE; } this->shared_secret.len = len; this->computed = TRUE; + return TRUE; } METHOD(diffie_hellman_t, get_dh_group, diffie_hellman_group_t, -- cgit v1.2.3