From 23c7e7c3dac420788c23470c5161ab1ecd13bac8 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sun, 18 Feb 2018 04:30:43 -0500 Subject: fishlim: Fix build warning --- plugins/fishlim/dh1080.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/fishlim/dh1080.c') diff --git a/plugins/fishlim/dh1080.c b/plugins/fishlim/dh1080.c index 08b1a615..2bf6af74 100644 --- a/plugins/fishlim/dh1080.c +++ b/plugins/fishlim/dh1080.c @@ -189,10 +189,12 @@ dh1080_compute_key (const char *priv_key, const char *pub_key, char **secret_key char *pub_key_data; gsize pub_key_len; BIGNUM *pk; - BIGNUM *temp_pub_key = BN_new(); DH *dh; +#ifdef HAVE_DH_SET0_KEY + BIGNUM *temp_pub_key = BN_new(); +#endif - g_assert (secret_key != NULL); + g_assert (secret_key != NULL); /* Verify base64 strings */ if (strspn (priv_key, B64ABC) != strlen (priv_key) @@ -213,7 +215,7 @@ dh1080_compute_key (const char *priv_key, const char *pub_key, char **secret_key int shared_len; BIGNUM *priv_key_num; - priv_key_data = dh1080_decode_b64 (priv_key, &priv_key_len); + priv_key_data = dh1080_decode_b64 (priv_key, &priv_key_len); priv_key_num = BN_bin2bn(priv_key_data, priv_key_len, NULL); #ifndef HAVE_DH_SET0_KEY dh->priv_key = priv_key_num; @@ -226,7 +228,7 @@ dh1080_compute_key (const char *priv_key, const char *pub_key, char **secret_key *secret_key = dh1080_encode_b64 (sha256, sizeof(sha256)); OPENSSL_cleanse (priv_key_data, priv_key_len); - g_free (priv_key_data); + g_free (priv_key_data); } BN_free (pk); -- cgit 1.4.1