From 42431690e04a8614e759e0a3a3bcd76e30e6207e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 23 Mar 2015 11:37:27 +0100 Subject: diffie-hellman: Add a bool return value to get_my_public_value() --- src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 603580277..64b650b4a 100644 --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c @@ -61,13 +61,14 @@ struct private_openssl_diffie_hellman_t { bool computed; }; -METHOD(diffie_hellman_t, get_my_public_value, void, +METHOD(diffie_hellman_t, get_my_public_value, bool, private_openssl_diffie_hellman_t *this, chunk_t *value) { *value = chunk_alloc(DH_size(this->dh)); memset(value->ptr, 0, value->len); BN_bn2bin(this->dh->pub_key, value->ptr + value->len - BN_num_bytes(this->dh->pub_key)); + return TRUE; } METHOD(diffie_hellman_t, get_shared_secret, bool, -- cgit v1.2.3