33 lines
734 B
Bash
Executable File
33 lines
734 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 = :::${https}
|
|
|
|
[https server]
|
|
accept = :::${https}
|
|
connect = 127.0.0.1:${http2}
|
|
cert = ${script_path}/certs/stunnel.pem
|
|
EOT
|
|
}
|
|
|
|
check_ports "020_IPv6"
|
|
if grep -q "IPv6" "results.log" && PATH="${PATH}:/sbin:/usr/sbin" ifconfig | grep -q "inet6" && [ -n "$(command -v ncat)" ] # nc does not support IPv6
|
|
then
|
|
start 2> "error.log"
|
|
test_log_for "020_IPv6" "success" "$1" 2>> "stderr.log"
|
|
exit $?
|
|
else
|
|
exit_logs "020_IPv6" "skipped"
|
|
exit 125
|
|
fi
|