2017-09-29 18:21:26 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-10-12 19:54:56 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
. $CURDIR/../shell_config.sh
|
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
# Not default server config needed
|
|
|
|
|
2017-10-12 19:54:56 +00:00
|
|
|
tcp_ssl_port=`${CLICKHOUSE_EXTRACT_CONFIG} -k tcp_ssl_port 2>/dev/null`
|
2017-10-02 13:19:16 +00:00
|
|
|
if [ -z ${tcp_ssl_port} ]; then
|
2017-09-29 18:21:26 +00:00
|
|
|
# Secure port disabled. Fake result
|
2017-10-12 19:54:56 +00:00
|
|
|
cat $CURDIR/00505_tcp_ssl.reference
|
2017-09-29 18:21:26 +00:00
|
|
|
else
|
|
|
|
# Auto port detect
|
2017-10-12 19:54:56 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --ssl -q "SELECT 1";
|
2017-12-15 19:34:19 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --ssl --port=${CLICKHOUSE_PORT_TCP_SSL} -q "SELECT 2";
|
2017-09-29 18:21:26 +00:00
|
|
|
fi
|