2022-03-09 12:28:22 -06:00
|
|
|
#!/bin/bash
|
2014-03-19 21:20:43 -07:00
|
|
|
|
2015-06-09 08:51:55 -07:00
|
|
|
# google.test
|
|
|
|
|
|
|
|
server=www.google.com
|
2014-03-19 21:20:43 -07:00
|
|
|
|
|
|
|
[ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1
|
|
|
|
|
2022-05-19 11:18:34 -05:00
|
|
|
if ! ./examples/client/client -V | grep -q 3; then
|
|
|
|
echo 'skipping google.test because TLS1.2 is not available.' 1>&2
|
2022-06-21 13:11:08 -07:00
|
|
|
exit 77
|
2018-05-17 09:08:03 +10:00
|
|
|
fi
|
|
|
|
|
2014-03-19 21:20:43 -07:00
|
|
|
# is our desired server there?
|
2016-04-01 15:45:53 -07:00
|
|
|
./scripts/ping.test $server 2
|
2016-04-14 14:42:01 -06:00
|
|
|
RESULT=$?
|
|
|
|
[ $RESULT -ne 0 ] && exit 0
|
2014-03-19 21:20:43 -07:00
|
|
|
|
|
|
|
# client test against the server
|
2015-06-09 08:51:55 -07:00
|
|
|
./examples/client/client -X -C -h $server -p 443 -g -d
|
2014-03-19 21:20:43 -07:00
|
|
|
RESULT=$?
|
|
|
|
[ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1
|
|
|
|
|
2022-05-19 11:18:34 -05:00
|
|
|
if ./examples/client/client -V | grep -q 4; then
|
2021-09-09 12:19:50 +10:00
|
|
|
# client test against the server using TLS v1.3
|
|
|
|
./examples/client/client -v 4 -X -C -h $server -p 443 -g -d
|
|
|
|
RESULT=$?
|
|
|
|
[ $RESULT -ne 0 ] && echo -e "\n\nTLSv1.3 Client connection failed" && exit 1
|
|
|
|
fi
|
|
|
|
|
2014-03-19 21:20:43 -07:00
|
|
|
exit 0
|