stunnel4/tests/recipes/110_failure_require_cert
2018-03-29 12:42:35 +02:00

29 lines
621 B
Bash
Executable File

#!/bin/sh
. $(dirname $0)/../test_library
start() {
../../src/stunnel -fd 0 <<EOT
debug = debug
syslog = no
pid = ${result_path}/stunnel.pid
output = ${result_path}/stunnel.log
[https client]
client = yes
accept = 127.0.0.1:${http1}
connect = 127.0.0.1:${https}
;cert = ${script_path}/certs/client_cert.pem
[https server]
accept = 127.0.0.1:${https}
connect = 127.0.0.1:${http2}
cert = ${script_path}/certs/server_cert.pem
requireCert = yes
EOT
}
check_ports "110_failure_require_cert"
start 2> "error.log"
test_log_for "110_failure_require_cert" "failure" "$1" 2>> "stderr.log"
exit $?