mirror of https://github.com/wolfSSL/wolfssl.git
scripts/tls13.test: retries (up to 10) for early data scenarios, to mitigate race noted in #4918 .
parent
7602eef98f
commit
64953299cf
|
@ -13,6 +13,9 @@ if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
|||
unset AM_BWRAPPED
|
||||
fi
|
||||
|
||||
# retries to mitigate race on early data:
|
||||
early_data_try_max=10
|
||||
|
||||
# getting unique port is modeled after resume.test script
|
||||
# need a unique port since may run the same time as testsuite
|
||||
# use server port zero hack to get one
|
||||
|
@ -244,6 +247,10 @@ if [ $? -eq 0 ]; then
|
|||
fi
|
||||
|
||||
if [ "$early_data" = "yes" ]; then
|
||||
|
||||
early_data_try_num=1
|
||||
while :; do
|
||||
|
||||
echo -e "\n\nTLS v1.3 Early Data - session ticket"
|
||||
port=0
|
||||
(./examples/server/server -v 4 -r -0 -R "$ready_file" -p $port 2>&1 | \
|
||||
|
@ -268,16 +275,29 @@ if [ "$early_data" = "yes" ]; then
|
|||
fi
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
echo -e "\n\nIssue with TLS v1.3 Early Data - session ticket"
|
||||
if [ $early_data_try_num -lt $early_data_try_max ]; then
|
||||
echo -e "retry #${early_data_try_num}...\n"
|
||||
: $((++early_data_try_num))
|
||||
continue
|
||||
fi
|
||||
do_cleanup
|
||||
exit 1
|
||||
fi
|
||||
do_cleanup
|
||||
break
|
||||
|
||||
done
|
||||
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ "$early_data" = "yes" -a "$psk" = "yes" ]; then
|
||||
echo -e "\n\nTLS v1.3 Early Data - PSK"
|
||||
port=0
|
||||
|
||||
early_data_try_num=1
|
||||
while :; do
|
||||
|
||||
(./examples/server/server -v 4 -s -0 -R "$ready_file" -p $port 2>&1 | \
|
||||
tee "$server_out_file") &
|
||||
server_pid=$!
|
||||
|
@ -306,9 +326,19 @@ if [ "$early_data" = "yes" -a "$psk" = "yes" ]; then
|
|||
fi
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
echo -e "\n\nIssue with TLS v1.3 Early Data - PSK"
|
||||
if [ $early_data_try_num -lt $early_data_try_max ]; then
|
||||
echo -e "retry #${early_data_try_num}...\n"
|
||||
: $((++early_data_try_num))
|
||||
continue
|
||||
fi
|
||||
do_cleanup
|
||||
exit 1
|
||||
fi
|
||||
|
||||
break
|
||||
|
||||
done
|
||||
|
||||
else
|
||||
echo "Early Data not available"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue