summaryrefslogtreecommitdiff
path: root/src/exchange/test_taler_exchange_httpd_afl.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-19 23:58:00 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-19 23:58:07 +0100
commit26af6b23281e952553892c73f8e01f2b1dbb7ab7 (patch)
tree3ff21b770e119524d420b4ed29b18ee146d92754 /src/exchange/test_taler_exchange_httpd_afl.sh
parent801592b4602065f05db555367921ebdbe08f0bce (diff)
downloadexchange-26af6b23281e952553892c73f8e01f2b1dbb7ab7.tar.gz
exchange-26af6b23281e952553892c73f8e01f2b1dbb7ab7.tar.bz2
exchange-26af6b23281e952553892c73f8e01f2b1dbb7ab7.zip
add single-threaded mode to exchange HTTP for fuzzing
Diffstat (limited to 'src/exchange/test_taler_exchange_httpd_afl.sh')
-rw-r--r--src/exchange/test_taler_exchange_httpd_afl.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/exchange/test_taler_exchange_httpd_afl.sh b/src/exchange/test_taler_exchange_httpd_afl.sh
index 6d741acce..a5d4fcbb8 100644
--- a/src/exchange/test_taler_exchange_httpd_afl.sh
+++ b/src/exchange/test_taler_exchange_httpd_afl.sh
@@ -21,6 +21,14 @@
#
# We read the JSON snippets from afl-tests/
#
+# The afl-tests are generated as follows:
+# 1) Capture all TCP traffic from 'test-auditor.sh'
+# 2) Use 'tcpflow -e http -r $PCAP -o $OUTPUT' to get the HTTP streams
+# 3) Remove HTTP streams unrelated to the exchange as well as the replies
+# 4) Compile the exchange with AFL instrumentation
+# 5) Run afl-fuzz -i $OUTPUT/ -o afl-tests/ ~/bin/taler-exchange-httpd \
+# -c test_taler_exchange_httpd.conf -t 1 -f @@
+
set -eu
PREFIX=