diff cli-kex.c @ 1702:8f93f37c01de

Allow DH to be completely disabled (#97) Reduces binary size by ~2kB by default and by 21kB with no other libtommath functions users, ex. with curve25519 kex and ed25519 key only.
author Vladislav Grishenko <themiron@users.noreply.github.com>
date Thu, 28 May 2020 20:01:48 +0500
parents 435cfb9ec96e
children 6e71440b1e47
line wrap: on
line diff
--- a/cli-kex.c	Thu May 28 23:01:15 2020 +0800
+++ b/cli-kex.c	Thu May 28 20:01:48 2020 +0500
@@ -155,10 +155,12 @@
 #endif
 	}
 
+#if DROPBEAR_NORMAL_DH
 	if (cli_ses.dh_param) {
 		free_kexdh_param(cli_ses.dh_param);
 		cli_ses.dh_param = NULL;
 	}
+#endif
 #if DROPBEAR_ECDH
 	if (cli_ses.ecdh_param) {
 		free_kexecdh_param(cli_ses.ecdh_param);