Skip to content

Commit

Permalink
Merge 8f2b1bf into 7bc8ed8
Browse files Browse the repository at this point in the history
  • Loading branch information
webhoernchen committed Jan 2, 2018
2 parents 7bc8ed8 + 8f2b1bf commit 90e0bf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rvm:
- 2.1.8
- 2.2.4
- 2.3.0
- 2.5.0
- jruby
env:
global:
Expand Down
10 changes: 9 additions & 1 deletion lib/httpi/auth/ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ class SSL

VERIFY_MODES = [:none, :peer, :fail_if_no_peer_cert, :client_once]
CERT_TYPES = [:pem, :der]
SSL_VERSIONS = OpenSSL::SSL::SSLContext::METHODS.reject { |method| method.match(/server|client/) }.sort.reverse

# Fix for
# httpi/auth/ssl.rb:13: warning: constant OpenSSL::SSL::SSLContext::METHODS is deprecated
ssl_context = OpenSSL::SSL::SSLContext
SSL_VERSIONS = if ssl_context.const_defined? :METHODS_MAP
ssl_context.const_get(:METHODS_MAP).keys
else
ssl_context::METHODS.reject { |method| method.match(/server|client/) }
end.sort.reverse

# Returns whether SSL configuration is present.
def present?
Expand Down

0 comments on commit 90e0bf3

Please sign in to comment.