]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
tests: Add tlsproxy_add() helper function.
authorSimon Ruderich <simon@ruderich.org>
Sun, 28 Jul 2013 23:48:01 +0000 (01:48 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 28 Jul 2013 23:48:01 +0000 (01:48 +0200)
tests/common.sh
tests/tests-normal.sh
tests/tests-passthrough.sh

index eb60743d89a21087bd6e1fff1e7b9699037f9099..8a220d6c618537a785c1b87f4c16784d9f1c0f45 100644 (file)
@@ -37,6 +37,9 @@ abort() {
 tlsproxy_setup() {
     "$srcdir/../src/tlsproxy-setup" >/dev/null 2>/dev/null
 }
+tlsproxy_add() {
+    "$srcdir/../src/tlsproxy-add" "$1" "$srcdir/$2" >/dev/null 2>&1
+}
 tlsproxy() {
     ../src/tlsproxy -d2 "$@" >tlsproxy-log 2>&1 &
     pid_tlsproxy=$!
index 3b9f9f38d670f447df9bb3d93719aa5bc31497a7..83b63f484a1770694c5bf6f61077621a8e1a6f3b 100755 (executable)
@@ -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
@@ -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
index 2e0f90e30a3c0aececee5506078638849654b379..500fb1b2ea98b9356da2076bb17d507191b5e003 100755 (executable)
@@ -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
@@ -90,8 +89,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