Load password and key for client fuzzer.

Add fuzz_dump()
This commit is contained in:
Matt Johnston
2020-10-20 23:34:38 +08:00
parent 3b400bd64e
commit 1a7b944917
5 changed files with 60 additions and 9 deletions

7
fuzz.h
View File

@@ -36,6 +36,7 @@ void fuzz_get_socket_address(int fd, char **local_host, char **local_port,
char **remote_host, char **remote_port, int host_lookup);
void fuzz_fake_send_kexdh_reply(void);
int fuzz_spawn_command(int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t *ret_pid);
void fuzz_dump(const unsigned char* data, size_t len);
// fake IO wrappers
#ifndef FUZZ_SKIP_WRAP
@@ -61,6 +62,12 @@ struct dropbear_fuzz_options {
// dropbear_exit() jumps back
int do_jmp;
sigjmp_buf jmp;
// write out decrypted session data to this FD if it's set
// flag - this needs to be set manually in cli-main.c etc
int dumping;
// the file descriptor
int recv_dumpfd;
};
extern struct dropbear_fuzz_options fuzz;