summaryrefslogtreecommitdiffhomepage
path: root/dh_groups.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@users.noreply.github.com>2020-05-28 20:01:48 +0500
committerGitHub <noreply@github.com>2020-05-28 23:01:48 +0800
commit413eaf1ba1dc99e1eb7d2375bd6a7c6d8759ff17 (patch)
tree9979669ca65c7efcdac1a0fe06d228533367cb5c /dh_groups.c
parent3b359050b464e9fede85cd299902adea79f027bf (diff)
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.
Diffstat (limited to 'dh_groups.c')
-rw-r--r--dh_groups.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dh_groups.c b/dh_groups.c
index fafac49..164cb48 100644
--- a/dh_groups.c
+++ b/dh_groups.c
@@ -1,6 +1,8 @@
#include "options.h"
#include "dh_groups.h"
+#if DROPBEAR_DH_NORMAL
+
#if DROPBEAR_DH_GROUP1
/* diffie-hellman-group1-sha1 value for p */
const unsigned char dh_p_1[DH_P_1_LEN] = {
@@ -92,3 +94,4 @@ const unsigned char dh_p_16[DH_P_16_LEN] = {
/* Same for all groups */
const int DH_G_VAL = 2;
+#endif