diff options
author | Juraj Somorovsky <[email protected]> | 2016-11-19 22:25:40 +0100 |
---|---|---|
committer | Juraj Somorovsky <[email protected]> | 2016-11-19 22:25:40 +0100 |
commit | ae2a958630cd104f4117bb897481bc86a744b09b (patch) | |
tree | 103d3fed21c732fefcae952c76d49627832b83ee /src/extra_tests/tls-attacker/testsuite | |
parent | acf1999cb85fc6bca83ac828b66593a6767174f7 (diff) |
TLS-Attacker testsuite and fuzzing
Diffstat (limited to 'src/extra_tests/tls-attacker/testsuite')
3 files changed, 55 insertions, 0 deletions
diff --git a/src/extra_tests/tls-attacker/testsuite/server_policytest.sh b/src/extra_tests/tls-attacker/testsuite/server_policytest.sh new file mode 100755 index 000000000..5cf78bc66 --- /dev/null +++ b/src/extra_tests/tls-attacker/testsuite/server_policytest.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +../../../../botan tls_server ../rsa2048cert.pem ../rsa2048key.pem --port=4434 --policy=../../../../tls-policy/BSI_TR-02102-2.txt > output/server_policytest.log 2>&1 & +botan_pid=$! + +java -jar ../TLS-Attacker/Runnable/target/TLS-Attacker-1.2.jar -loglevel INFO testtls_server -policy ../../../../tls-policy/BSI_TR-02102-2.txt -connect localhost:4434 -tls_timeout 1000 +rc=$? + +if [ $rc -eq 0 ]; then + echo Policy tests finished without failures +else + echo '\n\nPolicy tests failed. See the recent error and the server log output.' +# cat output/server_policytest.log +fi + +kill $botan_pid +exit $rc
\ No newline at end of file diff --git a/src/extra_tests/tls-attacker/testsuite/server_testsuite.sh b/src/extra_tests/tls-attacker/testsuite/server_testsuite.sh new file mode 100755 index 000000000..e26d71e1a --- /dev/null +++ b/src/extra_tests/tls-attacker/testsuite/server_testsuite.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +../../../../botan tls_server ../rsa2048cert.pem ../rsa2048key.pem --port=4433 > output/server_testsuite.log 2>&1 & +botan_pid=$! + +java -jar ../TLS-Attacker/Runnable/target/TLS-Attacker-1.2.jar -loglevel INFO testsuite_server -folder ../TLS-Attacker/resources/testsuite -tls_timeout 1000 +rc=$? + +if [ $rc -eq 0 ]; then + echo Tests finished without failures +else + echo '\n\nTests failed. See the recent error and the server log output.' +# cat output/server_testsuite.log +fi + +kill $botan_pid +exit $rc
\ No newline at end of file diff --git a/src/extra_tests/tls-attacker/testsuite/setup.sh b/src/extra_tests/tls-attacker/testsuite/setup.sh new file mode 100755 index 000000000..f528cd1da --- /dev/null +++ b/src/extra_tests/tls-attacker/testsuite/setup.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ ! -d output ] +then + mkdir output +fi + +cd .. + +openssl genpkey -algorithm RSA -out rsa2048key.pem -pkeyopt rsa_keygen_bits:2048 +openssl req -key rsa2048key.pem -new -x509 -days 365 -out rsa2048cert.pem -subj "/C=DE/ST=NRW/L=Bochum/O=TLS-Attacker/CN=tls-attacker.de" + +if [ ! -d TLS-Attacker ] +then + git clone https://github.com/RUB-NDS/TLS-Attacker.git +fi + +cd TLS-Attacker +git checkout . +git pull +./mvnw clean package -DskipTests=true |