stunnel4/tests/recipes/114_failure_PSK_secrets
2018-03-29 12:42:35 +02:00

36 lines
775 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
sslVersion = TLSv1
[https client]
client = yes
accept = 127.0.0.1:${http1}
connect = 127.0.0.1:${https}
PSKsecrets = ${script_path}/certs/psk2.txt
[https server]
accept = 127.0.0.1:${https}
connect = 127.0.0.1:${http2}
ciphers = PSK
PSKsecrets = ${script_path}/certs/secrets.txt
EOT
}
check_ports "114_failure_PSK_secrets"
if grep -q "OpenSSL 1" "results.log"
then
start 2> "error.log"
test_log_for "114_failure_PSK_secrets" "failure" "$1" 2>> "stderr.log"
exit $?
else
exit_logs "114_failure_PSK_secrets" "skipped" "error"
exit 125
fi