summaryrefslogtreecommitdiffhomepage
path: root/fuzz-common.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-20 13:23:16 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-20 13:23:16 +0800
commitfdc6f323923b36add7ab7112b1b4d05368bd5902 (patch)
tree0eb315924b21f11431f5195cfc7e6bab2aa4b6e2 /fuzz-common.c
parente7cdb2ebe5982e4fd881d9ee1e472ad922237b07 (diff)
closer to working
--HG-- branch : fuzz
Diffstat (limited to 'fuzz-common.c')
-rw-r--r--fuzz-common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fuzz-common.c b/fuzz-common.c
index bfd2634..cc3d4d6 100644
--- a/fuzz-common.c
+++ b/fuzz-common.c
@@ -1,7 +1,5 @@
#include "includes.h"
-#ifdef DROPBEAR_FUZZ
-
#include "includes.h"
#include "fuzz.h"
#include "dbutil.h"
@@ -17,6 +15,7 @@ static void load_fixed_hostkeys(void);
static void common_setup_fuzzer(void) {
fuzz.fuzzing = 1;
+ fuzz.wrapfds = 1;
fuzz.input = m_malloc(sizeof(buffer));
crypto_init();
}
@@ -30,7 +29,7 @@ int fuzzer_set_input(const uint8_t *Data, size_t Size) {
// get prefix. input format is
// string prefix
- // uint32_t seed
+ // uint32 wrapfd seed
// ... to be extended later
// [bytes] ssh input stream
@@ -114,4 +113,6 @@ static void load_fixed_hostkeys(void) {
buf_free(b);
}
-#endif /* DROPBEAR_FUZZ */
+void fuzz_kex_fakealgos(void) {
+ ses.newkeys->recv.crypt_mode = &dropbear_mode_none;
+}