Skip to content

Commit

Permalink
Fix #504
Browse files Browse the repository at this point in the history
  • Loading branch information
matteocorti committed Mar 17, 2024
1 parent c4cf8da commit 1d8d5e2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Options:
must not exceed 'days' (default 397)
This check is automatic for HTTPS
--nmap-bin path Path of the nmap binary to be used
--nmap-with-proxy Allow nmap to be used with a proxy
--no-perf Do not show performance data
--no-proxy Ignore the http_proxy and https_proxy
environment variables
Expand Down
18 changes: 14 additions & 4 deletions check_ssl_cert
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ usage() {
echo " This check is automatic for HTTPS"
# Delimiter at 78 chars ############################################################
echo " --nmap-bin path Path of the nmap binary to be used"
echo " --nmap-with-proxy Allow nmap to be used with a proxy"
echo " --no-perf Do not show performance data"
echo " --no-proxy Ignore the http_proxy and https_proxy"
echo " environment variables"
Expand Down Expand Up @@ -3272,6 +3273,10 @@ parse_command_line_options() {
fi
shift
;;
--nmap-with-proxy)
NMAP_WITH_PROXY=1
shift
;;
--no-perf)
NO_PERF=1
shift
Expand Down Expand Up @@ -4522,10 +4527,15 @@ main() {
[ -n "${HTTPS_PROXY}" ] ||
[ -n "${SCLIENT_PROXY}" ] ||
[ -n "${CURL_PROXY}" ]; then
DISABLE_NMAP=1
USING_A_PROXY=1
debuglog "A proxy is specified: nmap disabled"
verboselog "A proxy is specified: nmap checks disabled"
if [ -z "${NMAP_WITH_PROXY}" ] ; then
DISABLE_NMAP=1
USING_A_PROXY=1
debuglog "A proxy is specified: nmap disabled"
verboselog "A proxy is specified: nmap checks disabled"
else
debuglog "A proxy is specified: nmap enabled because of --nmap-with-proxy"
verboselog "A proxy is specified: nmap enabled because of --nmap-with-proxy"
fi
fi


Expand Down
3 changes: 3 additions & 0 deletions check_ssl_cert.1
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ The maximum validity of the certificate must not exceed 'days' (default 397). Th
.BR " --nmap-bin" " path"
Path of the nmap binary to be used
.TP
.BR " --nmap-with-proxy"
Allow nmap to be used with a proxy
.TP
.BR " --no-perf"
Do not show performance data
.TP
Expand Down
5 changes: 5 additions & 0 deletions check_ssl_cert_icinga2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ object CheckCommand "ssl_cert_extended" {
description = "Path of the nmap binary to be used"
}

"--nmap-with-proxy" = {
value = "$ssl_cert_extended_nmap_with_proxy"
description = "Allow nmap to be used with a proxy"
}

"--no-perf" = {
set_if = "$ssl_cert_extended_no_perf$"
description = "Do not show performance data"
Expand Down
1 change: 1 addition & 0 deletions utils/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
--maximum-validity [days];This check is automatic for HTTPS
--maximum-validity [days];must not exceed 'days' (default 397)
--nmap-bin path;Path of the nmap binary to be used
--nmap-with-proxy;Allow nmap to be used with a proxy
--no-perf;Do not show performance data
--no-proxy-curl;Ignore the http_proxy and https_proxy
--no-proxy-curl;environment variables
Expand Down

0 comments on commit 1d8d5e2

Please sign in to comment.