forked from wolfSSL/wolfssl
Update the resume test to rerun itself with the "-n" option to disable
extended master secret if the option is enabled.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
# need a unique resume port since may run the same time as testsuite
|
||||
# use server port zero hack to get one
|
||||
resume_string="reused"
|
||||
ems_string="Extended\ Master\ Secret"
|
||||
resume_port=0
|
||||
no_pid=-1
|
||||
server_pid=$no_pid
|
||||
@ -41,8 +42,7 @@ do_trap() {
|
||||
exit -1
|
||||
}
|
||||
|
||||
trap do_trap INT TERM
|
||||
|
||||
do_test() {
|
||||
echo -e "\nStarting example server for resume test...\n"
|
||||
|
||||
remove_ready_file
|
||||
@ -66,7 +66,7 @@ fi
|
||||
# get created port 0 ephemeral port
|
||||
resume_port=`cat $ready_file`
|
||||
|
||||
capture_out=$(./examples/client/client -r -p $resume_port 2>&1)
|
||||
capture_out=$(./examples/client/client $1 -r -p $resume_port 2>&1)
|
||||
client_result=$?
|
||||
|
||||
if [ $client_result != 0 ]
|
||||
@ -94,6 +94,22 @@ case "$capture_out" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
trap do_trap INT TERM
|
||||
|
||||
do_test
|
||||
|
||||
# Check the client for the extended master secret disable option. If
|
||||
# present we need to run the test twice.
|
||||
options_check=`./examples/client/client -?`
|
||||
case "$options_check" in
|
||||
*$ems_string*)
|
||||
echo -e "\nRepeating resume test without extended master secret..."
|
||||
do_test -n ;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "\nSuccess!\n"
|
||||
|
||||
|
Reference in New Issue
Block a user