diff common-kex.c @ 1347:b28624698130 fuzz

copy over some fuzzing code from AFL branch
author Matt Johnston <matt@ucc.asn.au>
date Fri, 12 May 2017 23:14:54 +0800
parents 9169e4e7cbee
children 3fdd8c5a0195
line wrap: on
line diff
--- a/common-kex.c	Fri May 12 22:14:49 2017 +0800
+++ b/common-kex.c	Fri May 12 23:14:54 2017 +0800
@@ -943,6 +943,17 @@
 		ses.newkeys->trans.algo_comp = s2c_comp_algo->val;
 	}
 
+#ifdef DROPBEAR_FUZZ
+	ses.newkeys->recv.algo_crypt = &dropbear_nocipher;
+	ses.newkeys->trans.algo_crypt = &dropbear_nocipher;
+	ses.newkeys->recv.crypt_mode = &dropbear_mode_none;
+	ses.newkeys->trans.crypt_mode = &dropbear_mode_none;
+	ses.newkeys->recv.algo_mac = &dropbear_nohash;
+	ses.newkeys->trans.algo_mac = &dropbear_nohash;
+	ses.newkeys->recv.algo_comp = DROPBEAR_COMP_NONE;
+	ses.newkeys->trans.algo_comp = DROPBEAR_COMP_NONE;
+#endif
+
 	/* reserved for future extensions */
 	buf_getint(ses.payload);