diff svr-kex.c @ 1295:750ec4ec4cbe

Convert #ifdef to #if, other build changes
author Matt Johnston <matt@ucc.asn.au>
date Wed, 04 May 2016 15:33:40 +0200
parents 56aba7dedbea
children 185c14fa504d 8747c2b19152
line wrap: on
line diff
--- a/svr-kex.c	Mon May 02 23:48:16 2016 +0200
+++ b/svr-kex.c	Wed May 04 15:33:40 2016 +0200
@@ -62,13 +62,13 @@
 			}
 			break;
 #endif
-#ifdef DROPBEAR_ECDH
+#if DROPBEAR_ECDH
 		case DROPBEAR_KEX_ECDH:
 #endif
-#ifdef DROPBEAR_CURVE25519
+#if DROPBEAR_CURVE25519
 		case DROPBEAR_KEX_CURVE25519:
 #endif
-#if defined(DROPBEAR_ECDH) || defined(DROPBEAR_CURVE25519)
+#if DROPBEAR_ECDH || DROPBEAR_CURVE25519
 			ecdh_qs = buf_getstringbuf(ses.payload);
 			break;
 #endif
@@ -91,7 +91,7 @@
 }
 
 
-#ifdef DROPBEAR_DELAY_HOSTKEY
+#if DROPBEAR_DELAY_HOSTKEY
 
 static void fsync_parent_dir(const char* fn) {
 #ifdef HAVE_LIBGEN_H
@@ -126,17 +126,17 @@
 
 	switch (type)
 	{
-#ifdef DROPBEAR_RSA
+#if DROPBEAR_RSA
 		case DROPBEAR_SIGNKEY_RSA:
 			fn = RSA_PRIV_FILENAME;
 			break;
 #endif
-#ifdef DROPBEAR_DSS
+#if DROPBEAR_DSS
 		case DROPBEAR_SIGNKEY_DSS:
 			fn = DSS_PRIV_FILENAME;
 			break;
 #endif
-#ifdef DROPBEAR_ECDSA
+#if DROPBEAR_ECDSA
 		case DROPBEAR_SIGNKEY_ECDSA_NISTP256:
 		case DROPBEAR_SIGNKEY_ECDSA_NISTP384:
 		case DROPBEAR_SIGNKEY_ECDSA_NISTP521:
@@ -215,7 +215,7 @@
 	/* we can start creating the kexdh_reply packet */
 	CHECKCLEARTOWRITE();
 
-#ifdef DROPBEAR_DELAY_HOSTKEY
+#if DROPBEAR_DELAY_HOSTKEY
 	if (svr_opts.delay_hostkey)
 	{
 		svr_ensure_hostkey();
@@ -227,7 +227,7 @@
 			ses.newkeys->algo_hostkey);
 
 	switch (ses.newkeys->algo_kex->mode) {
-#ifdef DROPBEAR_NORMAL_DH
+#if DROPBEAR_NORMAL_DH
 		case DROPBEAR_KEX_NORMAL_DH:
 			{
 			struct kex_dh_param * dh_param = gen_kexdh_param();
@@ -239,7 +239,7 @@
 			}
 			break;
 #endif
-#ifdef DROPBEAR_ECDH
+#if DROPBEAR_ECDH
 		case DROPBEAR_KEX_ECDH:
 			{
 			struct kex_ecdh_param *ecdh_param = gen_kexecdh_param();
@@ -250,7 +250,7 @@
 			}
 			break;
 #endif
-#ifdef DROPBEAR_CURVE25519
+#if DROPBEAR_CURVE25519
 		case DROPBEAR_KEX_CURVE25519:
 			{
 			struct kex_curve25519_param *param = gen_kexcurve25519_param();