9 echo "STARTING - $VER $CIPHER"
10 ./tunala -listen localhost:$CLIENT_PORT -proxy localhost:$SERVER_PORT \
11 -cacert CA.pem -cert A-client.pem -server 0 \
12 -dh_special standard -v_peer -v_strict \
13 $VER -cipher $CIPHER 1> tc1.txt 2> tc2.txt &
14 ./tunala -listen localhost:$SERVER_PORT -proxy $HTTP \
15 -cacert CA.pem -cert A-server.pem -server 1 \
16 -dh_special standard -v_peer -v_strict \
17 $VER -cipher $CIPHER 1> ts1.txt 2> ts2.txt &
18 # Wait for the servers to be listening before starting the wget test
20 while [ "$DONE" != "yes" ]; do
21 L1=`netstat -a | egrep "LISTEN[\t ]*$" | grep ":$CLIENT_PORT"`
22 L2=`netstat -a | egrep "LISTEN[\t ]*$" | grep ":$SERVER_PORT"`
23 if [ "x$L1" != "x" ]; then
25 elif [ "x$L2" != "x" ]; then
31 HTML=`wget -O - -T 1 http://localhost:$CLIENT_PORT 2> /dev/null | grep "<HTML>"`
32 if [ "x$HTML" != "x" ]; then
33 echo "OK - $CIPHER ($VER)"
35 echo "FAIL - $CIPHER ($VER)"
40 # Wait for the servers to stop before returning - otherwise the next
41 # test my fail to start ... (fscking race conditions)
43 while [ "$DONE" != "no" ]; do
44 L1=`netstat -a | egrep "LISTEN[\t ]*$" | grep ":$CLIENT_PORT"`
45 L2=`netstat -a | egrep "LISTEN[\t ]*$" | grep ":$SERVER_PORT"`
46 if [ "x$L1" != "x" ]; then
48 elif [ "x$L2" != "x" ]; then
59 (sub_test 1> /dev/null) || exit 1
64 killall tunala 1> /dev/null 2> /dev/null
66 echo "Starting all $PRETTY tests"
67 if [ "$PRETTY" != "SSLv2" ]; then
68 if [ "$PRETTY" != "SSLv3" ]; then
69 export VER="-no_ssl2 -no_ssl3"
72 export VER="-no_ssl2 -no_tls1"
76 export VER="-no_ssl3 -no_tls1"
79 LIST="`../../apps/openssl ciphers $OSSL | sed -e 's/:/ /g'`"
82 DSS=`echo "$i" | grep "DSS"`
83 if [ "x$DSS" != "x" ]; then
84 echo "---- skipping $i (no DSA cert/keys) ----"
94 echo "Tests will assume an http server running at $HTTP"
101 export PRETTY="SSLv3"
105 export PRETTY="SSLv2"