summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-04 16:58:29 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-04 16:58:29 +0000
commit5ec040038a6e51fe9eb94e1eca0e750adbc367d4 (patch)
treea539f95c062646262b945b50dc8397eabeef450e
parente446a5946d73785ae049e9d7af8f4d23d1ed84d2 (diff)
Allow SSL-check to be disabled, via "no_ssl_check"
-rw-r--r--lib/custodian/protocoltest/ssl.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb
index a604f80..ab57dff 100644
--- a/lib/custodian/protocoltest/ssl.rb
+++ b/lib/custodian/protocoltest/ssl.rb
@@ -387,10 +387,21 @@ module Custodian
#
def run_test
+ #
+ # If the line disables us then return early
+ #
+ if ( @line =~ /no_ssl_check/ )
+ return true
+ end
+
+
+ #
+ # Get the current hour.
+ #
hour = Time.now.hour
#
- # If outside 10AM-5PM we don't alert.
+ # If outside 10AM-5PM we don't run the test.
#
if ( hour < 10 || hour > 17 )
puts( "Outside office hours - Not running SSL-Verification of #{@host}" )