From be6473227b2123ed6280710cae529d3e09cab1e4 Mon Sep 17 00:00:00 2001 From: eimmot Date: Fri, 17 Mar 2017 02:15:50 -0400 Subject: Fix key exchange Clients will receive the proper shared secret. Eliminates error message: SSL_read: error:05066064:Diffie-Hellman routines:compute_key:no private value Fixes #1974 --- plugins/fishlim/dh1080.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/fishlim/dh1080.c b/plugins/fishlim/dh1080.c index 7eef50c7..08b1a615 100644 --- a/plugins/fishlim/dh1080.c +++ b/plugins/fishlim/dh1080.c @@ -189,6 +189,7 @@ 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; g_assert (secret_key != NULL); @@ -217,7 +218,7 @@ dh1080_compute_key (const char *priv_key, const char *pub_key, char **secret_key #ifndef HAVE_DH_SET0_KEY dh->priv_key = priv_key_num; #else - DH_set0_key (dh, NULL, priv_key_num); + DH_set0_key (dh, temp_pub_key, priv_key_num); #endif shared_len = DH_compute_key (shared_key, pk, dh); -- cgit 1.4.1