From e4212f4fb35784d52d5fcae84b979ccffea6c201 Mon Sep 17 00:00:00 2001 From: Steven Danneman Date: Thu, 29 Jun 2017 14:39:22 -0700 Subject: [PATCH 1/2] Remove use of "postgress" with extra 's' for secure Though it matches the pattern of the other protocol names in testssl, it is not commonly used in practice. --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index 6455844..af7f5f6 100755 --- a/testssl.sh +++ b/testssl.sh @@ -7090,7 +7090,7 @@ EOF starttls_line "" "proceed" # BTW: https://xmpp.net ! ;; - postgres|postgress) # Postgres SQL, see http://www.postgresql.org/docs/devel/static/protocol-message-formats.html + postgres) # Postgres SQL, see http://www.postgresql.org/docs/devel/static/protocol-message-formats.html starttls_postgres_dialog ;; *) # we need to throw an error here -- otherwise testssl.sh treats the STARTTLS protocol as plain SSL/TLS which leads to FP @@ -12840,7 +12840,7 @@ parse_cmd_line() { [[ $? -eq 0 ]] && shift case $STARTTLS_PROTOCOL in ftp|smtp|pop3|imap|xmpp|telnet|ldap|nntp|postgres) ;; - ftps|smtps|pop3s|imaps|xmpps|telnets|ldaps|nntps|postgress) ;; + ftps|smtps|pop3s|imaps|xmpps|telnets|ldaps|nntps) ;; *) tmln_magenta "\nunrecognized STARTTLS protocol \"$1\", see help" 1>&2 help 1 ;; esac From 2a2e9ebc07f3d6285f7aeed263667c331b345050 Mon Sep 17 00:00:00 2001 From: Steven Danneman Date: Fri, 30 Jun 2017 15:57:41 -0700 Subject: [PATCH 2/2] Rename variable as it is not a regex --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index af7f5f6..23ece10 100755 --- a/testssl.sh +++ b/testssl.sh @@ -7004,8 +7004,8 @@ starttls_nntp_dialog() { starttls_postgres_dialog() { debugme echo "=== starting postgres STARTTLS dialog ===" - local reINITTLS="\x00\x00\x00\x08\x04\xD2\x16\x2F" - starttls_just_send "${reINITTLS}" && debugme echo "initiated STARTTLS" && + local init_tls="\x00\x00\x00\x08\x04\xD2\x16\x2F" + starttls_just_send "${init_tls}" && debugme echo "initiated STARTTLS" && starttls_full_read '' '' 'S' && debugme echo "received ack for STARTTLS" local ret=$? debugme echo "=== finished postgres STARTTLS dialog with ${ret} ==="