summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authoreimmot <socialentry@gmail.com>2017-03-17 02:15:50 -0400
committerTingPing <tingping@tingping.se>2017-03-30 16:32:40 -0400
commitbe6473227b2123ed6280710cae529d3e09cab1e4 (patch)
tree24464af12fffa629634b703328b76062b6d26173 /plugins
parent2f0239eb1891ff84e29a24513b832d1278eddd93 (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fishlim/dh1080.c3
1 files changed, 2 insertions, 1 deletions
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);