From 111097506fddf5ae6257f8f84d6e27ed857b8040 Mon Sep 17 00:00:00 2001 From: d4t4king Date: Wed, 8 Oct 2014 22:04:29 +0000 Subject: [PATCH] Tweaked nginx protocol check so it actually works. Added insecure protocol detection. --- include/functions | 1 + include/tests_webservers | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/functions b/include/functions index df24633c..21736f71 100644 --- a/include/functions +++ b/include/functions @@ -824,6 +824,7 @@ if [ "${VALUE}" = "on" ]; then NGINX_SSL_PREFER_SERVER_CIPHERS=1; fi ;; ssl_protocols) + NGINX_SSL_PROTOCOLS=1 ;; ssl_session_cache) ;; diff --git a/include/tests_webservers b/include/tests_webservers index cc7b8bf1..df1086a4 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -501,6 +501,12 @@ if [ ${NGINX_SSL_PROTOCOLS} -eq 1 ]; then Display --indent 8 --text "- Protocols configured" --result "YES" --color GREEN + FIND=`${GREPBINARY} "ssl_protocols" ${NGINX_CONF_LOCATION} | ${GREPBINARY} "SSLv[12]"` + if [ "${FIND}" = "" ]; then + Display --indent 10 --text "- Insecure protocols found" --result "NO" --color GREEN + else + Display --indent 10 --text "- Insecure protocols found" --result "YES" --color RED + fi else Display --indent 8 --text "- Protocols configured" --result "NO" --color RED NGINX_SSL_SUGGESTION=1