Browse Source

Env variable for timeout config

master
aeris 2 months ago
parent
commit
0f8115488d
  1. 2
      lib/cryptcheck/host.rb
  2. 6
      lib/cryptcheck/tls/engine.rb

2
lib/cryptcheck/host.rb

@ -3,7 +3,7 @@ require 'timeout'
module CryptCheck
class Host
MAX_ANALYSIS_DURATION = 600
MAX_ANALYSIS_DURATION = ENV.fetch('MAX_ANALYSIS_DURATION', '600').to_i
attr_reader :servers, :error

6
lib/cryptcheck/tls/engine.rb

@ -5,15 +5,15 @@ module CryptCheck
module Tls
module Engine
SLOW_DOWN = ENV.fetch('SLOW_DOWN', '0').to_i
TCP_TIMEOUT = 10
TLS_TIMEOUT = 2 * TCP_TIMEOUT
TCP_TIMEOUT = ENV.fetch('TCP_TIMEOUT', '10').to_i
TLS_TIMEOUT = ENV.fetch('TLS_TIMEOUT', '10').to_i
class TLSException < ::StandardError
end
class TLSNotAvailableException < TLSException
def to_s
'TLS seems not supported on this server'
'TLS seems not supported on this server'
end
end

Loading…
Cancel
Save