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=$!
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
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
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
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