# first, checking frontend<-->Pgpool-II...
-$PSQL -h localhost test <<EOF | grep SSL
+$PSQL -h localhost test <<EOF > result
\conninfo
\q
EOF
+grep SSL result
+
if [ $? != 0 ];then
echo "Checking SSL connection between frontend and Pgpool-II failed."
./shutdownall
echo "Checking SSL connection between frontend and Pgpool-II was ok."
-$PSQL -h localhost test <<EOF | grep SSL | grep ECDH
-\conninfo
-\q
-EOF
+grep SSL result |grep TLSv1.2
-if [ $? != 0 ];then
- echo "Checking SSL connection with ECDH between frontend and Pgpool-II failed."
- ./shutdownall
- exit 1
-fi
+# if SSl protocol version TLSv1.2
+if [ $? = 0 ];then
+ grep SSL result |grep ECDH
-echo "Checking SSL connection with ECDH between frontend and Pgpool-II was ok."
+ if [ $? != 0 ];then
+ echo "Checking SSL connection with ECDH between frontend and Pgpool-II failed."
+ ./shutdownall
+ exit 1
+ fi
+ echo "Checking SSL connection with ECDH between frontend and Pgpool-II was ok."
+fi
grep "client->server SSL response: S" log/pgpool.log >/dev/null
if [ $? != 0 ];then
i++;
StrNCpy(status[i].name, "ssl_ecdh_curve", POOLCONFIG_MAXNAMELEN);
- snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->ssl_ecdh_curve);
+ snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->ssl_ecdh_curve);
StrNCpy(status[i].desc, "the curve to use in ECDH key exchange", POOLCONFIG_MAXDESCLEN);
i++;
StrNCpy(status[i].name, "ssl_dh_params_file", POOLCONFIG_MAXNAMELEN);
- snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->ssl_dh_params_file);
+ snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->ssl_dh_params_file);
StrNCpy(status[i].desc, "path to the Diffie-Hellman parameters contained file", POOLCONFIG_MAXDESCLEN);
i++;