From ac5b81edd1d4bbc4ef51d7b2eb190fd44b8a3cca Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Fri, 21 Jun 2024 13:22:00 +0900 Subject: [PATCH] fix unit test --- scripts/ocsp-stapling.test | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/scripts/ocsp-stapling.test b/scripts/ocsp-stapling.test index 9ad1834376..04d8ce9ace 100755 --- a/scripts/ocsp-stapling.test +++ b/scripts/ocsp-stapling.test @@ -388,19 +388,8 @@ else echo 'skipping TLS1.3 stapling tests.' 1>&2 fi -printf '%s\n\n' "------------- TEST CASE 1 SHOULD PASS ------------------------" -# client test against our own server - GOOD CERT -./examples/server/server -c certs/ocsp/server1-cert.pem -R "$ready_file2" \ - -k certs/ocsp/server1-key.pem -p $port3 & -wolf_pid3=$! -wait_for_readyFile "$ready_file2" $wolf_pid3 $port3 -./examples/client/client -C -A certs/ocsp/root-ca-cert.pem -W 1 -p $port3 -RESULT=$? -[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 1 failed" && exit 1 -printf '%s\n\n' "Test PASSED!" - # DTLS 1.2 and 1.3 cases -if ./examples/client/client -? 2>&1 | grep -q 'DTLS'; then +if ./examples/client/client -? 2>&1 | grep -q 'DTLSv1.2'; then printf '%s\n\n' "------------- TEST CASE DTLS-1 SHOULD PASS -------------------" # client test against our own server, must staple - GOOD CERT echo $ready_file2 @@ -415,7 +404,9 @@ if ./examples/client/client -? 2>&1 | grep -q 'DTLS'; then RESULT=$? [ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 5 failed" && exit 1 printf '%s\n\n' "Test PASSED!" +fi +if ./examples/client/client -? 2>&1 | grep -q 'DTLSv1.3'; then printf '%s\n\n' "------------- TEST CASE DTLS-2 SHOULD PASS -------------------" # client test against our own server, must staple - GOOD CERT ./examples/server/server -c certs/ocsp/server1-cert.pem -R "$ready_file2" \