From 764cb7c8b020fe41191ab338c5592727406ed5a1 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 13 Feb 2024 01:03:06 +0100 Subject: [PATCH] Allow SERVER_TYPE=postgres Verifying PostgreSQL certificates requires setting the protocol type for s_client as it is not plain TLS, but behaving more like StartTLS in other protocols. --- getssl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/getssl b/getssl index 30d8837..f3cb248 100755 --- a/getssl +++ b/getssl @@ -2438,6 +2438,9 @@ set_server_type() { # uses SERVER_TYPE to set REMOTE_PORT and REMOTE_EXTRA REMOTE_PORT=5269 elif [[ ${SERVER_TYPE} == "ldaps" ]]; then REMOTE_PORT=636 + elif [[ ${SERVER_TYPE} == "postgres" ]]; then + REMOTE_PORT=5432 + REMOTE_EXTRA="-starttls postgres" elif [[ ${SERVER_TYPE} =~ ^[0-9]+$ ]]; then REMOTE_PORT=${SERVER_TYPE} else