Skip to content

Commit d05e16a

Browse files
committed
fixup! ssl: rework SSLContext#ssl_version=
1 parent 4e5d926 commit d05e16a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/test_ssl.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,17 @@ def test_options_disable_versions
969969
end
970970
end
971971

972+
def test_ssl_methods_constant
973+
EnvUtil.suppress_warning { # Deprecated in v2.1.0
974+
base = [:TLSv1_2, :TLSv1_1, :TLSv1, :SSLv3, :SSLv2, :SSLv23]
975+
base.each do |name|
976+
assert_include OpenSSL::SSL::SSLContext::METHODS, name
977+
assert_include OpenSSL::SSL::SSLContext::METHODS, :"#{name}_client"
978+
assert_include OpenSSL::SSL::SSLContext::METHODS, :"#{name}_server"
979+
end
980+
}
981+
end
982+
972983
def test_renegotiation_cb
973984
num_handshakes = 0
974985
renegotiation_cb = Proc.new { |ssl| num_handshakes += 1 }

0 commit comments

Comments
 (0)