added check for weak passphrase using entropy test

This commit is contained in:
git@daemon.de
2015-08-17 20:15:20 +02:00
parent 8fb7369d64
commit 64a45583d0
6 changed files with 928 additions and 771 deletions

View File

@@ -22,7 +22,7 @@
pcp = ../src/pcp1
vault = v1
passwd = xxx
passwd = ech9xeiT%CuxuH1ch-is2ies1R
md5msg = 66b8c4ca9e5d2a7e3c0559c3cdea3d50
mangle = ./mangle
verbose = 1
@@ -106,6 +106,17 @@ dxmorg@florida.cops.gov
expect = /Generated new secret key/
</test>
<test check-fail-entropy-generate-secret-key>
cmd = $pcp -V $vault -k -x password
input = <<EOF
Dexter Morgan
dxmorg@florida.cops.gov
no
EOF
expect = /weak passphrase/
</test>
<test check-if-vault-contains-secret>
cmd = $pcp -V $vault -l
@@ -533,7 +544,7 @@ temporarily disabled
#
# input handling tests
<test check-large-meta>
cmd = (./jot 300 | while read m; do echo -n m; done; echo xxx) \
cmd = (./jot 300 | while read m; do echo -n m; done; echo $passwd) \
| $pcp -V $vault -k -x $passwd
expect = /Generated new secret key/
</test>
@@ -541,9 +552,9 @@ temporarily disabled
#
# 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;
prepare = (echo F; echo F) | $pcp -V vfz -k -x $passwd; \
$pcp -V vfz -p -O testfuzzP.orig -x $passwd; \
$pcp -V vfz -s -O testfuzzS.orig -x $passwd;
<test check-fuzz-binary-pubkey>
loop = 30
prepare = while :; do \
@@ -553,7 +564,7 @@ temporarily disabled
break; \
fi; \
done
cmd = echo no | $pcp -V vf -K -I testfuzzP.pub -x a
cmd = echo no | $pcp -V vf -K -I testfuzzP.pub -x $passwd
expect = !/added/
</test>
<test check-fuzz-binary-seckey>
@@ -565,7 +576,7 @@ temporarily disabled
break; \
fi; \
done
cmd = echo no | $pcp -V vf -K -I testfuzzS.sec -x a
cmd = echo no | $pcp -V vf -K -I testfuzzS.sec -x $passwd
expect = !/added/
</test>
</test>