-# Create the proxy and server certificate.
-$srcdir/../src/tlsproxy-add localhost $srcdir/server.pem \
- >/dev/null 2>/dev/null
+echo mitm missing proxy certificate
+mv certificate-localhost-proxy.pem .pem
+# "invalid" to prevent user error if the proxy certificate gets deleted (but
+# the server certificate is still readable).
+client localhost 4712 invalid || abort 'client localhost 4712 invalid'
+mv .pem certificate-localhost-proxy.pem
+test_proxy_successful
+test_invalid_certificate