Module: check_mk
Branch: master
Commit: 44ed9304e01a6fab7b8118ec8ed112b6edb464a4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44ed9304e01a6f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 12:49:11 2015 +0100
#2852 FIX check_http: SSL can now be configured to use specific SSL version
---
.werks/2852 | 9 +++++++++
ChangeLog | 1 +
checks/check_http | 5 ++++-
web/plugins/wato/active_checks.py | 20 +++++++++++++-------
4 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/.werks/2852 b/.werks/2852
new file mode 100644
index 0000000..1bb011f
--- /dev/null
+++ b/.werks/2852
@@ -0,0 +1,9 @@
+Title: check_http: SSL can now be configured to use specific SSL version
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449056927
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 9e291de..3e1b58a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,6 +117,7 @@
* 2849 FIX: winperf_processor.util: Fixed crash in case no CPU infos are sent
* 2850 FIX: juniper_cpu: Better error handling of empty data reported by device
* 2873 FIX: megaraid_pdisks: handle case "Copyback" correctly...
+ * 2852 FIX: check_http: SSL can now be configured to use specific SSL version
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/check_http b/checks/check_http
index 5d4e9da..85f882d 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -54,8 +54,11 @@ def check_http_arguments(params):
else:
address = "$_HOSTADDRESS_4$"
- if settings.get("ssl"):
+ ssl = settings.get("ssl")
+ if ssl in [ True, "auto" ]:
args += ' --ssl'
+ elif ssl:
+ args += ' --ssl=%s' % quote_shell_string(ssl)
if "cert_host" in settings:
omit_ip = True
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 64a8e82..c64e2be 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -763,13 +763,19 @@ register_rule(group,
)
),
ip_address_family_element,
- ( "ssl",
- FixedValue(
- value = True,
- totext = _("use SSL/HTTPS"),
- title = _("Use SSL/HTTPS for the
connection.")
- )
- ),
+ ("ssl", Transform(
+ DropdownChoice(
+ title = _("Use SSL/HTTPS for the
connection"),
+ choices = [
+ ("auto", _("Use SSL with auto
negotiation")),
+ ("1", _("Use SSL, enforce
TLSv1")),
+ ("2", _("Use SSL, enforce
SSLv2")),
+ ("3", _("Use SSL, enforce
SSLv3")),
+ ],
+ default_value = "auto",
+ ),
+ forth = lambda x: x == True and "auto" or x,
+ )),
( "sni",
FixedValue(
value = True,