comparison fuzz.h @ 1369:ddfcadca3c4c fuzz

fuzzer-pubkey
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 May 2017 22:43:34 +0800
parents 6b89eb92f872
children d4cc85e6c569
comparison
equal deleted inserted replaced
1368:10df23099071 1369:ddfcadca3c4c
8 #include "buffer.h" 8 #include "buffer.h"
9 #include "algo.h" 9 #include "algo.h"
10 #include "fuzz-wrapfd.h" 10 #include "fuzz-wrapfd.h"
11 11
12 // once per process 12 // once per process
13 void common_setup_fuzzer(void);
13 void svr_setup_fuzzer(void); 14 void svr_setup_fuzzer(void);
14 15
15 // once per input. returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE 16 // once per input. returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE
16 int fuzzer_set_input(const uint8_t *Data, size_t Size); 17 int fuzzer_set_input(const uint8_t *Data, size_t Size);
17 18
19 // fuzzer functions that intrude into general code
18 void fuzz_kex_fakealgos(void); 20 void fuzz_kex_fakealgos(void);
21 int fuzz_checkpubkey_line(buffer* line, int line_num, char* filename,
22 const char* algo, unsigned int algolen,
23 const unsigned char* keyblob, unsigned int keybloblen);
24 extern const char * const * fuzz_signkey_names;
25 void fuzz_seed(void);
19 26
20 // fake IO wrappers 27 // fake IO wrappers
21 #ifndef FUZZ_SKIP_WRAP 28 #ifndef FUZZ_SKIP_WRAP
22 #define select(nfds, readfds, writefds, exceptfds, timeout) \ 29 #define select(nfds, readfds, writefds, exceptfds, timeout) \
23 wrapfd_select(nfds, readfds, writefds, exceptfds, timeout) 30 wrapfd_select(nfds, readfds, writefds, exceptfds, timeout)