external.test 716 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # external.test
  3. server=www.wolfssl.com
  4. ca=./certs/wolfssl-website-ca.pem
  5. [ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1
  6. # cloudflare seems to change CAs quickly, disabled by default
  7. if test -n "$WOLFSSL_EXTERNAL_TEST"; then
  8. echo "WOLFSSL_EXTERNAL_TEST set, running test..."
  9. else
  10. echo "WOLFSSL_EXTERNAL_TEST NOT set, won't run"
  11. exit 0
  12. fi
  13. # is our desired server there?
  14. ping -c 2 $server
  15. RESULT=$?
  16. [ $RESULT -ne 0 ] && echo -e "\n\nCouldn't find $server, skipping" && exit 0
  17. # client test against the server
  18. ./examples/client/client -X -C -h $server -p 443 -g -A $ca
  19. RESULT=$?
  20. [ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1
  21. exit 0