#!/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
  exec = ${script_path}/execute
  execArgs = execute 041_exec_connect
  connect = 127.0.0.1:${https1}

  [server]
  accept = 127.0.0.1:${https1}
  exec = ${script_path}/execute_read
  execArgs = execute_read ${result_path}/temp.log
  cert = ../certs/server_cert.pem
EOT
}

test_log_for "041_exec_connect" "exe_con" "0" "$1" "$2" "$3" 2>> "stderr.log"
exit $?
