google.test 632 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # google.test
  3. server=www.google.com
  4. [ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1
  5. # TODO: [TLS13] Remove this when google supports final version of TLS 1.3
  6. ./examples/client/client -v 3 2>&1 | grep -- 'Bad SSL version'
  7. if [ $? -eq 0 ]; then
  8. echo -e "\n\nClient doesn't support TLS v1.2"
  9. exit 0
  10. fi
  11. # is our desired server there?
  12. ./scripts/ping.test $server 2
  13. RESULT=$?
  14. [ $RESULT -ne 0 ] && exit 0
  15. # client test against the server
  16. ./examples/client/client -X -C -h $server -p 443 -g -d
  17. RESULT=$?
  18. [ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1
  19. exit 0