Module: check_mk
Branch: master
Commit: df8999591109979db19a0013ef492a21348241a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=df899959110997…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 3 09:23:36 2015 +0100
#1932 FIX check_http: Check SSL Certificate: did not work when SNI Option was set
The option <tt>--sni</tt> did not work in conjunction with
<tt>--IP-address</tt>.
---
.werks/1932 | 10 ++++++++++
ChangeLog | 1 +
checks/check_http | 7 +++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/1932 b/.werks/1932
new file mode 100644
index 0000000..6efa6b4
--- /dev/null
+++ b/.werks/1932
@@ -0,0 +1,10 @@
+Title: check_http: Check SSL Certificate: did not work when SNI Option was set
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422951366
+
+The option <tt>--sni</tt> did not work in conjunction with
<tt>--IP-address</tt>.
diff --git a/ChangeLog b/ChangeLog
index aaf50a4..49129db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -136,6 +136,7 @@
* 1971 FIX: printer_input/printer_output: Discovery is using name field when
available no...
NOTE: Please refer to the migration notes!
* 1931 FIX: agent_vsphere: no longer crashes when host has no license information
+ * 1932 FIX: check_http: Check SSL Certificate: did not work when SNI Option was
set...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/check_http b/checks/check_http
index ee885db..66989e2 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -48,8 +48,11 @@ def check_http_arguments(params):
if "cert_host" in settings:
omit_ip = True
- args += ' -H $HOSTADDRESS$'
- args += ' -I %s' % quote_shell_string(settings['cert_host'])
+ if settings.get("sni"):
+ args += ' -H %s' % quote_shell_string(settings['cert_host'])
+ else:
+ args += ' -H $HOSTADDRESS$'
+ args += ' -I %s' % quote_shell_string(settings['cert_host'])
if "cert_days" in settings:
args += ' -C %d' % settings["cert_days"]