comparison fuzz.h @ 1751:3b9b427925a0

Load password and key for client fuzzer. Add fuzz_dump()
author Matt Johnston <matt@ucc.asn.au>
date Tue, 20 Oct 2020 23:34:38 +0800
parents 28ab2cdb84bf
children 517fb7b62438
comparison
equal deleted inserted replaced
1750:7cb8bc5ce8b9 1751:3b9b427925a0
34 // helpers 34 // helpers
35 void fuzz_get_socket_address(int fd, char **local_host, char **local_port, 35 void fuzz_get_socket_address(int fd, char **local_host, char **local_port,
36 char **remote_host, char **remote_port, int host_lookup); 36 char **remote_host, char **remote_port, int host_lookup);
37 void fuzz_fake_send_kexdh_reply(void); 37 void fuzz_fake_send_kexdh_reply(void);
38 int fuzz_spawn_command(int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid); 38 int fuzz_spawn_command(int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid);
39 void fuzz_dump(const unsigned char* data, size_t len);
39 40
40 // fake IO wrappers 41 // fake IO wrappers
41 #ifndef FUZZ_SKIP_WRAP 42 #ifndef FUZZ_SKIP_WRAP
42 #define select(nfds, readfds, writefds, exceptfds, timeout) \ 43 #define select(nfds, readfds, writefds, exceptfds, timeout) \
43 wrapfd_select(nfds, readfds, writefds, exceptfds, timeout) 44 wrapfd_select(nfds, readfds, writefds, exceptfds, timeout)
59 int skip_kexmaths; 60 int skip_kexmaths;
60 61
61 // dropbear_exit() jumps back 62 // dropbear_exit() jumps back
62 int do_jmp; 63 int do_jmp;
63 sigjmp_buf jmp; 64 sigjmp_buf jmp;
65
66 // write out decrypted session data to this FD if it's set
67 // flag - this needs to be set manually in cli-main.c etc
68 int dumping;
69 // the file descriptor
70 int recv_dumpfd;
64 }; 71 };
65 72
66 extern struct dropbear_fuzz_options fuzz; 73 extern struct dropbear_fuzz_options fuzz;
67 74
68 #endif // DROPBEAR_FUZZ 75 #endif // DROPBEAR_FUZZ