X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=tests%2Ftests-normal.sh;h=056780fd2ca2f5711e763ebe365b1c1735cf2edb;hb=14d78ab9d7df60c0c183ae28db4cd20a5bd2e168;hp=3b9f9f38d670f447df9bb3d93719aa5bc31497a7;hpb=94b7d1f951f5707dfc47c3ab48c0889af8b0ed9d;p=tlsproxy%2Ftlsproxy.git diff --git a/tests/tests-normal.sh b/tests/tests-normal.sh index 3b9f9f3..056780f 100755 --- a/tests/tests-normal.sh +++ b/tests/tests-normal.sh @@ -27,9 +27,9 @@ cleanup tlsproxy_setup # Normal tests. -tlsproxy 4711 -server --x509certfile "$srcdir/server.pem" \ - --x509keyfile "$srcdir/server-key.pem" +tlsproxy_background 4711 +server_background --x509certfile "$srcdir/server.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4711 4712 @@ -44,8 +44,7 @@ test_proxy_successful test_invalid_certificate # Create the proxy certificate. -"$srcdir/../src/tlsproxy-add" localhost "$srcdir/server.pem" \ - >/dev/null 2>/dev/null +tlsproxy_add localhost server.pem echo missing server certificate mv certificate-localhost-server.pem .pem @@ -71,8 +70,8 @@ test_no_invalid_certificate # Stop server and try a "MITM" with a bad certificate. echo kill $pid_server || echo 'failed to kill gnutls-serv' -server --x509certfile "$srcdir/server-bad.pem" \ - --x509keyfile "$srcdir/server-key.pem" +server_background --x509certfile "$srcdir/server-bad.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4712 rm -f certificate-localhost-proxy.pem certificate-localhost-server.pem @@ -88,8 +87,7 @@ test_proxy_successful test_invalid_certificate # Create the proxy certificate. -"$srcdir/../src/tlsproxy-add" localhost "$srcdir/server.pem" \ - >/dev/null 2>/dev/null +tlsproxy_add localhost server.pem echo mitm missing server certificate mv certificate-localhost-server.pem .pem @@ -111,7 +109,7 @@ test_proxy_successful test_invalid_certificate -stop_servers +# stop_servers in trap-handler cleanup exit 0