diff options
author | pedbap <pedbap.g@gmail.com> | 2021-06-29 19:11:45 +0000 |
---|---|---|
committer | pedbap <pedbap.g@gmail.com> | 2021-06-29 19:11:45 +0000 |
commit | a0d65d8275a7b7c4b744e9a3479c781c47ab3937 (patch) | |
tree | beb06bfc76540e61e164f21ef709c19a1b02ed7e /src/test/fuzz | |
parent | 2b97c1dd341f71e6237c97ee73e0f02b7dc6d805 (diff) | |
download | tor-a0d65d8275a7b7c4b744e9a3479c781c47ab3937.tar.gz tor-a0d65d8275a7b7c4b744e9a3479c781c47ab3937.zip |
hexdigest_to_digest() isolated harness
Diffstat (limited to 'src/test/fuzz')
-rw-r--r-- | src/test/fuzz/fuzz_hexdigest.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/test/fuzz/fuzz_hexdigest.c b/src/test/fuzz/fuzz_hexdigest.c new file mode 100644 index 0000000000..e4fd0a8c76 --- /dev/null +++ b/src/test/fuzz/fuzz_hexdigest.c @@ -0,0 +1,69 @@ +#include "core/or/or.h" + +#include "app/config/config.h" +#include "core/mainloop/connection.h" +#include "core/mainloop/mainloop.h" +#include "core/or/circuitlist.h" +#include "core/or/circuituse.h" +#include "core/or/extendinfo.h" +#include "core/or/policies.h" +#include "feature/client/bridges.h" +#include "feature/control/control_events.h" +#include "feature/dirauth/authmode.h" +#include "feature/dirauth/process_descs.h" +#include "feature/dirauth/reachability.h" +#include "feature/dircache/dirserv.h" +#include "feature/dirclient/dirclient.h" +#include "feature/dirclient/dirclient_modes.h" +#include "feature/dirclient/dlstatus.h" +#include "feature/dircommon/directory.h" +#include "feature/nodelist/authcert.h" +#include "feature/nodelist/describe.h" +#include "feature/nodelist/dirlist.h" +#include "feature/nodelist/microdesc.h" +#include "feature/nodelist/networkstatus.h" +#include "feature/nodelist/node_select.h" +#include "feature/nodelist/nodelist.h" +#include "feature/nodelist/routerinfo.h" +#include "feature/nodelist/routerlist.h" +#include "feature/dirparse/routerparse.h" +#include "feature/nodelist/routerset.h" +#include "feature/nodelist/torcert.h" +#include "feature/relay/routermode.h" +#include "feature/relay/relay_find_addr.h" +#include "feature/stats/rephist.h" +#include "lib/crypt_ops/crypto_format.h" +#include "lib/crypt_ops/crypto_rand.h" + +#include "feature/dircommon/dir_connection_st.h" +#include "feature/dirclient/dir_server_st.h" +#include "feature/nodelist/document_signature_st.h" +#include "feature/nodelist/extrainfo_st.h" +#include "feature/nodelist/networkstatus_st.h" +#include "feature/nodelist/networkstatus_voter_info_st.h" +#include "feature/nodelist/node_st.h" +#include "feature/nodelist/routerinfo_st.h" +#include "feature/nodelist/routerlist_st.h" +#include "feature/nodelist/vote_routerstatus_st.h" + +#include "lib/crypt_ops/digestset.h" + +int fuzz_init(void) +{ + return 0; +} + +int fuzz_cleanup(void) +{ + return 0; +} + +int fuzz_main(const uint8_t *data, size_t sz) +{ + char *fuzzing_data = tor_memdup_nulterm(data, sz); + char digest[20]; + + hexdigest_to_digest(fuzzing_data, digest); + tor_free(fuzzing_data); + return 0; +} |