# File lib/openid/fetchers.rb, line 104 def get_http_obj(uri) http = Net::HTTP.new(uri.host, uri.port) http.read_timeout = @read_timeout http.open_timeout = @open_timeout if uri.scheme == 'https' if HAS_OPENSSL http.use_ssl = true if @ca_path http.verify_mode = OpenSSL::SSL::VERIFY_PEER http.ca_file = @ca_path else OpenID::Util.log('WARNING: making https request without verifying server certificate.') http.verify_mode = OpenSSL::SSL::VERIFY_NONE end end end return http end