diff sysoptions.h @ 759:76fba0856749 ecc

More changes for KEX and ECDH. Set up hash descriptors, make ECC code work, ses.hash and ses.session_id are now buffers (doesn't compile)
author Matt Johnston <matt@ucc.asn.au>
date Fri, 29 Mar 2013 00:28:09 +0800
parents bf9dc2d9c2b1
children ac2158e3e403
line wrap: on
line diff
--- a/sysoptions.h	Fri Mar 29 00:26:46 2013 +0800
+++ b/sysoptions.h	Fri Mar 29 00:28:09 2013 +0800
@@ -93,13 +93,26 @@
 #define DROPBEAR_ECC
 #endif
 
-
 #ifdef DROPBEAR_ECC
 #define DROPBEAR_ECC_256
 #define DROPBEAR_ECC_384
 #define DROPBEAR_ECC_521
 #endif
 
+// hashes which will be linked and registered
+#if defined(DROPBEAR_SHA2_256_HMAC) || defined(DROPBEAR_ECC_256)
+#define DROPBEAR_SHA256
+#endif
+#if defined(DROPBEAR_ECC_384)
+#define DROPBEAR_SHA384
+#endif
+#if defined(DROPBEAR_SHA2_512_HMAC) || defined(DROPBEAR_ECC_521)
+#define DROPBEAR_SHA512
+#endif
+#if defined(DROPBEAR_MD5_HMAC)
+#define DROPBEAR_MD5
+#endif
+
 // roughly 2x 521 bits
 #define MAX_ECC_SIZE 140
 
@@ -155,19 +168,6 @@
 #define DROPBEAR_TWOFISH
 #endif
 
-#ifdef DROPBEAR_MD5_HMAC
-#define DROPBEAR_MD5
-#endif
-
-#ifdef DROPBEAR_SHA2_256_HMAC
-#define DROPBEAR_SHA256
-#endif
-
-#if (defined(DROPBEAR_DSS) && defined(DSS_PROTOK)) \
-	|| defined(DROPBEAR_SHA2_512_HMAC)
-#define DROPBEAR_SHA512
-#endif
-
 #ifndef ENABLE_X11FWD
 #define DISABLE_X11FWD
 #endif