summary refs log tree commit diff stats
path: root/plugins/fishlim
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/fishlim')
-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);