Skip to content

Commit

Permalink
Fix TLS Script
Browse files Browse the repository at this point in the history
Not sure "how" this fixes the tests, but without these changes we get an
error in the last TLS tests with latest code changes, and this error
goes away when modifying the expect script to be more verbose.

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Oct 8, 2024
1 parent 1d2a53b commit 8b4060c
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions tests/ttls
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,29 @@ run_test() {
set timeout 60;
expect {
\"ACCEPT\" {};
default {exit 1;};
default {
send \" NO ACCEPT \n\";
exit 1;
};
}
set server_ready [open \"${TMPPDIR}/s_server_ready\" w+];
puts \$server_ready \"READY\n\";
close \$server_ready;
expect {
\"END SSL SESSION PARAMETERS\" {};
default {exit 1;};
default {
send \" NO SESSION PARAMETERS \n\";
exit 1;
};
}
send \" TLS SUCCESSFUL \n\"
send \"Q\n\"
expect {
eof {exit 0;};
default {exit 1;};
default {
send \" NO EOF \n\";
exit 1;
};
}" > "${TMPPDIR}/s_server_output" &
SERVER_PID=$!

Expand All @@ -65,11 +74,17 @@ run_test() {
set timeout 60;
expect {
\" TLS SUCCESSFUL \" {};
default {exit 1;};
default {
send \" NO TLS SUCCESSFUL MESSAGE \n\";
exit 1;
};
}
expect {
eof {exit 0;};
default {exit 1;};
default {
send \" NO EOF \n\";
exit 1;
};
}"

wait_for_server_at_exit $SERVER_PID
Expand Down

0 comments on commit 8b4060c

Please sign in to comment.