diff options
author | Patrick Griffis <tingping@tingping.se> | 2018-02-18 04:30:43 -0500 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2018-02-18 04:31:55 -0500 |
commit | 23c7e7c3dac420788c23470c5161ab1ecd13bac8 (patch) | |
tree | 1f5d0e9edb49530a8f18d101aa9b07328e13b716 | |
parent | 7510ab36b714c70366855e72a481ab6c97d0c9c8 (diff) |
fishlim: Fix build warning
-rw-r--r-- | plugins/fishlim/dh1080.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |