File: 114_failure_PSK_secrets

package info (click to toggle)
stunnel4 3%3A5.50-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,492 kB
  • sloc: ansic: 15,914; sh: 5,645; pascal: 2,719; perl: 988; cpp: 650; makefile: 216
file content (32 lines) | stat: -rwxr-xr-x 673 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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

  [client]
  client = yes
  accept = 127.0.0.1:${http1}
  connect = 127.0.0.1:${https1}
  PSKsecrets = ../certs/psk2.txt

  [server]
  accept = 127.0.0.1:${https1}
  connect = 127.0.0.1:${http_nc}
  ciphers = PSK
  PSKsecrets = ../certs/secrets.txt
EOT
}

if grep -q "OpenSSL 1" "results.log"
  then
    test_log_for "114_failure_PSK_secrets" "failure" "0" "$1" "$2" "$3" 2>> "stderr.log"
    exit $?
  else
    exit_logs "114_failure_PSK_secrets" "skipped" "error"
    exit 125
  fi