Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional SSL options to net::http and net::http::persistant #544

Closed

Conversation

aetherknight
Copy link

Replaces PR #339 .

  • Add support for ciphers, verify_depth, and ssl_timeout to net::http and net::http::persistant.
  • Also add adding ca_path and verify_depth to net::http::persistant. The underlying library supports these options, just like net::http.

Not touching the other adapters due to limited experience with some of the underlying libraries, or due to inconsistencies with what is supposed to be passed or supported. The libcurl-based HTTP client libraries expect file paths for the client certificate and client private key instead of their corresponding OpenSSL::X509::Certificate or OpenSSL::PKey::* objects, plus replicating the Ruby OpenSSL verify_callback API may require significant effort or patching of the client libraries.

BJ Orvis and others added 8 commits February 5, 2014 18:57
I considered gating with a respond_to? to support older versions of
Ruby where net/http does not support all of the attributes, but doing so
would make Faraday silently ignore those values instead of notifying the
developer that they are trying to do something with an older version of
Ruby that it does not support.
…net_http

* lostisland/master:
  Add full url for get /nigiri in README
  Update Travis settings for Rubinius
  Only try to cache dependencies when Amazon secret is available
  Add HTTPClient to list of adapters in README
  Retry only if the method is idempotent
  Adds a retry_if option to the retry middleware
  Handle Patron "Connection time-out" properly
  Cache Bundler dependencies on Travis CI
  Bump net-http-persistent
  Allow jruby-XYmode failures on Travis due to RVM bug
  Avoid broken net-http-persistent v2.9.2/3
Needed to add ciphers, verify_callback, and timeout (for ssl) to the
SSLOptions.
…net_http

* lostisland/master:
  Don't require SimpleCov on Ruby 1.8
  Update README with env usage in stubs
  Lock rest-client to ~> 1.6.0 on Ruby 1.8.7
  Fix ActiveSupport::SafeBuffer#gsub bug
  Fix response not changing with parallel requests
…net_http

* lostisland/master:
  clarify what the default stack is
  Increase test coverage for parameter encoders
  Fix passing ActiveSupport::SafeBuffer to param encoders
  Remove timeout from request autoloads, since it was removed in 43343e9
  use to_str to check for strings and added #pretty_inspect to non-strings
  use an array instead of a hash for testing pretty_inspect of objects
  added options hash to Logger to support logging bodies
  log request bodies in logger middleware
…dd_ciphers_to_net_http

* artemis/add_ciphers_to_net_http:
  Empty commit to get travis to re-run
  Fixing ssl options to support new values.
  Adding support for more SSL options for net/http.
@iMacTia
Copy link
Member

iMacTia commented Oct 19, 2016

Thanks @aetherknight and apologies for the late review.
We understand your need to get these additional options but we decided to avoid having more adapter-specific features as this goes against the Faraday view of being a general interface for multiple adapters.

@iMacTia iMacTia closed this Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants