mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-30 23:00:59 +00:00
Pick a "unique" port in SSL test scripts
This commit is contained in:
parent
1ebc0c592c
commit
8066b81a54
|
@ -645,14 +645,14 @@ setup_arguments()
|
||||||
exit 1;
|
exit 1;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
P_SERVER_ARGS="server_addr=0.0.0.0 force_version=$MODE"
|
P_SERVER_ARGS="server_port=$PORT server_addr=0.0.0.0 force_version=$MODE"
|
||||||
O_SERVER_ARGS="-www -cipher NULL,ALL -$MODE"
|
O_SERVER_ARGS="-accept $PORT -www -cipher NULL,ALL -$MODE"
|
||||||
G_SERVER_ARGS="-p 4433 --http"
|
G_SERVER_ARGS="-p $PORT --http"
|
||||||
G_SERVER_PRIO="EXPORT:+NULL:+MD5:+PSK:+DHE-PSK:+ECDHE-PSK:+RSA-PSK:-VERS-TLS-ALL:$G_PRIO_MODE"
|
G_SERVER_PRIO="EXPORT:+NULL:+MD5:+PSK:+DHE-PSK:+ECDHE-PSK:+RSA-PSK:-VERS-TLS-ALL:$G_PRIO_MODE"
|
||||||
|
|
||||||
P_CLIENT_ARGS="force_version=$MODE"
|
P_CLIENT_ARGS="server_port=$PORT force_version=$MODE"
|
||||||
O_CLIENT_ARGS="-$MODE"
|
O_CLIENT_ARGS="-connect localhost:$PORT -$MODE"
|
||||||
G_CLIENT_ARGS="-p 4433 --debug 3"
|
G_CLIENT_ARGS="-p $PORT --debug 3"
|
||||||
G_CLIENT_PRIO="NONE:$G_PRIO_MODE:+COMP-NULL:+CURVE-ALL:+SIGN-ALL"
|
G_CLIENT_PRIO="NONE:$G_PRIO_MODE:+COMP-NULL:+CURVE-ALL:+SIGN-ALL"
|
||||||
|
|
||||||
if [ "X$VERIFY" = "XYES" ];
|
if [ "X$VERIFY" = "XYES" ];
|
||||||
|
@ -952,7 +952,10 @@ for PEER in $PEERS; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
killall -q gnutls-serv openssl ssl_server ssl_server2
|
# Pick a "unique" port in the range 10000-19999.
|
||||||
|
PORT="0000$$"
|
||||||
|
PORT="1$(echo $PORT | tail -c 4)"
|
||||||
|
|
||||||
trap cleanup INT TERM HUP
|
trap cleanup INT TERM HUP
|
||||||
|
|
||||||
for VERIFY in $VERIFIES; do
|
for VERIFY in $VERIFIES; do
|
||||||
|
|
|
@ -153,7 +153,7 @@ run_test() {
|
||||||
|
|
||||||
# psk is useful when server only has bad certs
|
# psk is useful when server only has bad certs
|
||||||
if is_polar "$SRV_CMD"; then
|
if is_polar "$SRV_CMD"; then
|
||||||
"$P_CLI" request_page=SERVERQUIT tickets=0 auth_mode=none psk=abc123 \
|
$P_CLI request_page=SERVERQUIT tickets=0 auth_mode=none psk=abc123 \
|
||||||
crt_file=data_files/cli2.crt key_file=data_files/cli2.key \
|
crt_file=data_files/cli2.crt key_file=data_files/cli2.key \
|
||||||
>/dev/null
|
>/dev/null
|
||||||
else
|
else
|
||||||
|
@ -276,7 +276,16 @@ if which $OPENSSL_CMD >/dev/null 2>&1; then :; else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
killall -q openssl ssl_server ssl_server2
|
# Pick a "unique" port in the range 10000-19999.
|
||||||
|
PORT="0000$$"
|
||||||
|
PORT="1$(echo $PORT | tail -c 4)"
|
||||||
|
|
||||||
|
# fix commands to use this port
|
||||||
|
P_SRV="$P_SRV server_port=$PORT"
|
||||||
|
P_CLI="$P_CLI server_port=$PORT"
|
||||||
|
O_SRV="$O_SRV -accept $PORT"
|
||||||
|
O_CLI="$O_CLI -connect localhost:$PORT"
|
||||||
|
|
||||||
trap cleanup INT TERM HUP
|
trap cleanup INT TERM HUP
|
||||||
|
|
||||||
# Test for SSLv2 ClientHello
|
# Test for SSLv2 ClientHello
|
||||||
|
|
Loading…
Reference in a new issue