Skip to content

Commit

Permalink
fixup! ssl: rework SSLContext#ssl_version=
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenium committed Sep 1, 2017
1 parent 4e5d926 commit d05e16a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,17 @@ def test_options_disable_versions
end
end

def test_ssl_methods_constant
EnvUtil.suppress_warning { # Deprecated in v2.1.0
base = [:TLSv1_2, :TLSv1_1, :TLSv1, :SSLv3, :SSLv2, :SSLv23]
base.each do |name|
assert_include OpenSSL::SSL::SSLContext::METHODS, name
assert_include OpenSSL::SSL::SSLContext::METHODS, :"#{name}_client"
assert_include OpenSSL::SSL::SSLContext::METHODS, :"#{name}_server"
end
}
end

def test_renegotiation_cb
num_handshakes = 0
renegotiation_cb = Proc.new { |ssl| num_handshakes += 1 }
Expand Down

0 comments on commit d05e16a

Please sign in to comment.