added fuzz unittests, trying to import invalid binary keys using mangle.c by Ilja van Sprundel

This commit is contained in:
TLINDEN
2014-03-14 15:49:42 +01:00
parent 1c068d441d
commit 92c14cc621
4 changed files with 147 additions and 5 deletions

View File

@@ -20,11 +20,12 @@
# You can contact me by mail: <tlinden AT cpan DOT org>.
#
pcp = ../src/pcp1
vault = v1
pcp = ../src/pcp1
vault = v1
passwd = xxx
md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
mangle = ./mangle
verbose = 1
include keys.cfg
<test check-dependencies>
@@ -523,6 +524,38 @@ temporarily disabled
expect = /Generated new secret key/
</test>
#
# fuzz tests
<test check-fuzz>
prepare = (echo F; echo F) | $pcp -V vfz -k -x a; \
$pcp -V vfz -p -O testfuzzP.orig -x a; \
$pcp -V vfz -s -O testfuzzS.orig -x a;
<test check-fuzz-binary-pubkey>
loop = 30
prepare = while :; do \
cp testfuzzP.orig testfuzzP.pub; \
$mangle testfuzzP.pub; \
if ! diff testfuzzP.* > /dev/null 2>&1; then \
break; \
fi; \
done
cmd = echo no | $pcp -V vf -K -I testfuzzP.pub -x a
expect = !/added/
</test>
<test check-fuzz-binary-seckey>
loop = 30
prepare = while :; do \
cp testfuzzS.orig testfuzzS.sec; \
$mangle testfuzzS.sec; \
if ! diff testfuzzS.* > /dev/null 2>&1; then \
break; \
fi; \
done
cmd = echo no | $pcp -V vf -K -I testfuzzS.sec -x a
expect = !/added/
</test>
</test>
#
# test the c++ api