stunnel4/tests/recipes/112_failure_verify_chain

29 lines
613 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}
verifyChain = yes
CAfile = ${script_path}/certs/CACert.pem
[https server]
accept = 127.0.0.1:${https}
connect = 127.0.0.1:${http2}
cert = ${script_path}/certs/stunnel.pem
EOT
}
check_ports "112_failure_verify_chain"
start 2> "error.log"
test_log_for "112_failure_verify_chain" "failure" "$1" 2>> "stderr.log"
exit $?