connect CANL sample client to openssl server
authorMarcel Poul <marcel.poul@cern.ch>
Wed, 22 Feb 2012 11:54:49 +0000 (11:54 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Wed, 22 Feb 2012 11:54:49 +0000 (11:54 +0000)
org.glite.testsuites.ctb/CANL-C/tests/canl-test-cs-openssl.sh

index 507edf2..85ff07c 100755 (executable)
@@ -117,11 +117,31 @@ else
        test_done
 fi
 
-printf "Starting openssl server "
+lsn_port=11112
+printf "Starting openssl server \n"
 ${SYS_OPENSSL} s_server -key /etc/grid-security/hostkey.pem \
-       -cert /etc/grid-security/hostcert.pem &
+       -cert /etc/grid-security/hostcert.pem -accept "${lsn_port}" \
+       -nbio &
 
 last_pid=$!
+lp_running=`${SYS_PS} | ${SYS_GREP} -E "${last_pid}" 2> /dev/null`
+if [ -n "$lp_running" ]; then
+       test_done
+else
+       test_failed
+       test_end
+       exit 2
+fi
+proxy_cert=`${GRIDPROXYINFO} | ${SYS_GREP} -E "^path" | ${SYS_SED} "s/path\s*:\s//"`
+printf "CANL client: connecting to openssl server\n"
+${EMI_CANL_CLIENT} -s localhost -p "${lsn_port}" #\
+#      -c ${proxy_cert} -k ${proxy_cert}
+if [ $? -ne 0 ]; then
+       test_failed
+else
+       test_done
+fi
+
 kill ${last_pid} &> /dev/null
 
 test_end