lib/saml/util.rb in libsaml-2.19.10 vs lib/saml/util.rb in libsaml-2.20.0

- old
+ new

@@ -12,13 +12,15 @@ end params end - def post(location, message, additional_headers = {}) + def post(location, message, additional_headers = {}, proxy = {}) uri = URI.parse(location) + default_proxy_settings = { addr: :ENV, port: nil, user: nil, pass: nil } + proxy = default_proxy_settings.merge(proxy) - http = Net::HTTP.new(uri.host, uri.port) + http = Net::HTTP.new(uri.host, uri.port, proxy[:addr], proxy[:port], proxy[:user], proxy[:pass]) http.use_ssl = uri.scheme == 'https' http.verify_mode = OpenSSL::SSL::VERIFY_PEER add_cacert_file(http) add_ssl_certificate_and_key(http)