diff --git a/tests/test-cert b/tests/test-cert index fc9f4683..c4912fe6 100755 --- a/tests/test-cert +++ b/tests/test-cert @@ -19,6 +19,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SERV="${SERV:-../src/ocserv}" +PORT=4446 . `dirname $0`/common.sh @@ -28,20 +29,20 @@ launch_server -d -f -c test3.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (without certificate)... " -( openconnect -q localhost:4443 --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) && +( openconnect -q localhost:$PORT --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) && fail $PID "Connected without certificate!" echo ok echo -n "Connecting to obtain cookie (with certificate)... " -( openconnect -q localhost:4443 --sslkey ./user-key.pem -c ./user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) || +( openconnect -q localhost:$PORT --sslkey ./user-key.pem -c ./user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) || fail $PID "Could not connect with certificate!" echo ok #echo "Normal connection... " -#( echo "test" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || +#( echo "test" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || # fail $PID "Could not connect to server" kill $PID diff --git a/tests/test-iroute b/tests/test-iroute index 34b894f4..fb966488 100755 --- a/tests/test-iroute +++ b/tests/test-iroute @@ -19,6 +19,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SERV="${SERV:-../src/ocserv}" +PORT=4447 . `dirname $0`/common.sh @@ -28,7 +29,7 @@ launch_server -d -f -c test-iroute.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (with certificate)... " -( openconnect -q localhost:4443 --sslkey ./user-key.pem -c ./user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) || +( openconnect -q localhost:$PORT --sslkey ./user-key.pem -c ./user-cert.pem --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly /dev/null 2>&1 ) || fail $PID "Could not connect with certificate!" echo ok diff --git a/tests/test-iroute.config b/tests/test-iroute.config index 139a9336..7a6ecf06 100644 --- a/tests/test-iroute.config +++ b/tests/test-iroute.config @@ -24,8 +24,8 @@ max-clients = 16 max-same-clients = 2 # TCP and UDP port number -tcp-port = 4443 -udp-port = 4443 +tcp-port = 4447 +udp-port = 4447 # Keepalive in seconds keepalive = 32400 diff --git a/tests/test-pass b/tests/test-pass index ec89ac1e..dc2a9422 100755 --- a/tests/test-pass +++ b/tests/test-pass @@ -19,6 +19,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SERV="${SERV:-../src/ocserv}" +PORT=4444 . `dirname $0`/common.sh @@ -28,25 +29,25 @@ launch_server -d -f -c test1.config & PID=$! wait_server $PID echo "Connecting to obtain cookie... " -( echo "test" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || +( echo "test" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || fail $PID "Could not receive cookie from server" echo "Connecting to obtain cookie with wrong password... " -( echo "tost" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && +( echo "tost" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && fail $PID "Received cookie when we shouldn't" echo "Connecting to obtain cookie with wrong username... " -( echo "tost" | openconnect -q localhost:4443 -u tost --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && +( echo "tost" | openconnect -q localhost:$PORT -u tost --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && fail $PID "Received cookie when we shouldn't" #test special characters echo "Connecting to obtain cookie... " -( echo "!@#$%^&*()<>" | openconnect -q localhost:4443 -u special --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || +( echo "!@#$%^&*()<>" | openconnect -q localhost:$PORT -u special --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || fail $PID "Could not receive cookie from server" #echo "Normal connection... " -#( echo "test" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || +#( echo "test" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || # fail $PID "Could not connect to server" kill $PID diff --git a/tests/test-pass-cert b/tests/test-pass-cert index 73b5e534..75e55ac6 100755 --- a/tests/test-pass-cert +++ b/tests/test-pass-cert @@ -19,6 +19,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SERV="${SERV:-../src/ocserv}" +PORT=4445 . `dirname $0`/common.sh @@ -28,20 +29,20 @@ launch_server -d -f -c test2.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (without certificate)... " -( echo "test" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && +( echo "test" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && fail $PID "Connected without certificate!" echo ok echo -n "Connecting to obtain cookie (with certificate)... " -( echo "test" | openconnect -q localhost:4443 --sslkey ./user-key.pem -c ./user-cert.pem -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || +( echo "test" | openconnect -q localhost:$PORT --sslkey ./user-key.pem -c ./user-cert.pem -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || fail $PID "Could not connect with certificate!" echo ok #echo "Normal connection... " -#( echo "test" | openconnect -q localhost:4443 -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || +#( echo "test" | openconnect -q localhost:$PORT -u test --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --script=/bin/true ) || # fail $PID "Could not connect to server" kill $PID diff --git a/tests/test-pass-script b/tests/test-pass-script index e6a83996..c5386126 100755 --- a/tests/test-pass-script +++ b/tests/test-pass-script @@ -19,6 +19,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SERV="${SERV:-../src/ocserv}" +PORT=4448 . `dirname $0`/common.sh @@ -28,13 +29,13 @@ launch_server -d -f -c test-pass-script.config & PID=$! wait_server $PID echo "Connecting to obtain cookie with wrong username... " -( echo "tost" | openconnect -q localhost:4443 -u tost --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && +( echo "tost" | openconnect -q localhost:$PORT -u tost --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) && fail $PID "Received cookie when we shouldn't" #test special characters echo "Connecting to obtain cookie... " -( echo "!@#$%^&*()<>" | openconnect -q localhost:4443 -u special --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || +( echo "!@#$%^&*()<>" | openconnect -q localhost:$PORT -u special --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) || fail $PID "Could not receive cookie from server" kill $PID diff --git a/tests/test-pass-script.config b/tests/test-pass-script.config index b96d1f69..fc7610d6 100644 --- a/tests/test-pass-script.config +++ b/tests/test-pass-script.config @@ -24,8 +24,8 @@ max-clients = 16 max-same-clients = 2 # TCP and UDP port number -tcp-port = 4443 -udp-port = 4443 +tcp-port = 4448 +udp-port = 4448 # Keepalive in seconds keepalive = 32400 diff --git a/tests/test1.config b/tests/test1.config index e1649be2..c5498cf4 100644 --- a/tests/test1.config +++ b/tests/test1.config @@ -24,8 +24,8 @@ max-clients = 16 max-same-clients = 2 # TCP and UDP port number -tcp-port = 4443 -udp-port = 4443 +tcp-port = 4444 +udp-port = 4444 # Keepalive in seconds keepalive = 32400 diff --git a/tests/test2.config b/tests/test2.config index 48c44611..35a475d4 100644 --- a/tests/test2.config +++ b/tests/test2.config @@ -24,8 +24,8 @@ max-clients = 16 max-same-clients = 2 # TCP and UDP port number -tcp-port = 4443 -udp-port = 4443 +tcp-port = 4445 +udp-port = 4445 # Keepalive in seconds keepalive = 32400 diff --git a/tests/test3.config b/tests/test3.config index 49f18ac3..597d08a6 100644 --- a/tests/test3.config +++ b/tests/test3.config @@ -24,8 +24,8 @@ max-clients = 16 max-same-clients = 2 # TCP and UDP port number -tcp-port = 4443 -udp-port = 4443 +tcp-port = 4446 +udp-port = 4446 # Keepalive in seconds keepalive = 32400