diff 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
line wrap: on
line diff
--- a/fuzz.h	Tue Oct 20 23:33:45 2020 +0800
+++ b/fuzz.h	Tue Oct 20 23:34:38 2020 +0800
@@ -36,6 +36,7 @@
                         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 @@
     // 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;