X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=tests%2Ftests-passthrough.sh;h=1a94f387f1f6ab73ff73b2e2591cebfaaab09d1d;hb=0897a092b265edc0cb6496c7f29a6ffabb282f7d;hp=2e0f90e30a3c0aececee5506078638849654b379;hpb=94b7d1f951f5707dfc47c3ab48c0889af8b0ed9d;p=tlsproxy%2Ftlsproxy.git diff --git a/tests/tests-passthrough.sh b/tests/tests-passthrough.sh index 2e0f90e..1a94f38 100755 --- a/tests/tests-passthrough.sh +++ b/tests/tests-passthrough.sh @@ -27,9 +27,9 @@ cleanup tlsproxy_setup # Normal tests. -tlsproxy -u 4711 -server --x509certfile "$srcdir/server.pem" \ - --x509keyfile "$srcdir/server-key.pem" +tlsproxy_background -u 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 @@ -73,8 +72,9 @@ 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" +sleep 3 # necessary on some systems like OpenBSD +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 @@ -90,8 +90,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 @@ -115,7 +114,7 @@ test_proxy_successful test_invalid_certificate -stop_servers +# stop_servers in trap-handler cleanup exit 0