# along with this program. If not, see <http://www.gnu.org/licenses/>.
+cleanup() {
+ rm -f \
+ certificate-localhost-proxy.pem certificate-localhost-server.pem \
+ proxy-ca-key.pem proxy-ca.pem proxy-invalid.pem proxy-key.pem
+}
abort() {
echo abort
pkill -n gnutls-serv
# Create necessary files.
+cleanup
$srcdir/../src/tlsproxy-setup >/dev/null 2>/dev/null
# Normal tests.
server --x509certfile $srcdir/server-bad.pem \
--x509keyfile $srcdir/server-key.pem
sleep 1
+rm -f certificate-localhost-proxy.pem certificate-localhost-server.pem
echo mitm invalid hostname
pkill -n gnutls-serv
pkill -n tlsproxy
-rm -f tmp \
- certificate-localhost-proxy.pem certificate-localhost-server.pem \
- proxy-ca-key.pem proxy-ca.pem proxy-invalid.pem proxy-key.pem
+cleanup
+rm -f tmp
exit 0