Permalink
Browse files

logic correction...

  • Loading branch information...
1 parent 3cb26e8 commit 70f3eb3962d7eb6885200e9b6867a08c3f8f74da @taf2 committed Aug 7, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/faraday/adapter/net_http.rb
@@ -16,8 +16,8 @@ def call(env)
http = net_http_class(env).new(url.host, url.inferred_port)
if http.use_ssl = (url.scheme == 'https' && (ssl = env[:ssl]) && true)
- http.verify_mode = ssl[:verify_mode] || ssl.fetch(:verify, true) ?
- OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
+ http.verify_mode = ssl.key?(:verify_mode) ? (ssl[:verify_mode] ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE) :
+ ssl.fetch(:verify, true) ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
http.cert = ssl[:client_cert] if ssl[:client_cert]
http.key = ssl[:client_key] if ssl[:client_key]
http.ca_file = ssl[:ca_file] if ssl[:ca_file]

0 comments on commit 70f3eb3

Please sign in to comment.