File tree Expand file tree Collapse file tree
fullstack/freertos-wolfip-wolfssl-https Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,13 +15,18 @@ if ! ip link show wtap0 >/dev/null 2>&1; then
1515fi
1616
1717echo " Testing HTTPS server with curl..."
18- curl -v --cacert ./certs/ca-cert.pem \
19- --tlsv1.3 --insecure https://10.10.0.10:443/
2018
21- # Check if curl command succeeded
22- if [ $? -eq 0 ]; then
23- echo " HTTPS test successful!"
24- else
25- echo " HTTPS test failed!"
26- exit 1
27- fi
19+ # The sim's cooperative scheduler can be slow to bind :443 on a loaded host, so
20+ # retry rather than fail on a single connection refusal.
21+ attempts=30
22+ for i in $( seq 1 " $attempts " ) ; do
23+ curl -v --cacert ./certs/ca-cert.pem \
24+ --tlsv1.3 --insecure https://10.10.0.10:443/ && break
25+ if [ " $i " -eq " $attempts " ]; then
26+ echo " HTTPS test failed!"
27+ exit 1
28+ fi
29+ sleep 1
30+ done
31+
32+ echo " HTTPS test successful!"
You can’t perform that action at this time.
0 commit comments