diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-27 09:12:06 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-27 09:12:06 +0100 |
commit | 61afa439b5d7ebf5d28461d7097702d14e763037 (patch) | |
tree | e52bdc8cf8907dbac4b3716acc912f339bbe5e78 /lib/mauve/calendar_interface.rb | |
parent | 9d1ad67ee450b76e1f56055dd9237059b28681fe (diff) |
Calendar now honours ssl verify + http timeout settings.
Diffstat (limited to 'lib/mauve/calendar_interface.rb')
-rw-r--r-- | lib/mauve/calendar_interface.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mauve/calendar_interface.rb b/lib/mauve/calendar_interface.rb index 692981d..d0a6c52 100644 --- a/lib/mauve/calendar_interface.rb +++ b/lib/mauve/calendar_interface.rb @@ -95,11 +95,12 @@ module Mauve # # Five second timeouts. # - http.open_timeout = http.read_timeout = 5 + http.open_timeout = http.read_timeout = Configuration.current.remote_http_timeout || 5 if (uri.scheme == "https") - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_NONE + http.use_ssl = true + http.ca_path = "/etc/ssl/certs/" if File.directory?("/etc/ssl/certs") + http.verify_mode = Configuration.current.remote_https_verify_mode || OpenSSL::SSL::VERIFY_NONE end response = http.start { http.get(uri.request_uri()) } |