diff options
-rw-r--r-- | ext/openssl/lib/openssl/ssl.rb | 16 | ||||
-rw-r--r-- | test/net/http/test_https.rb | 4 |
2 files changed, 4 insertions, 16 deletions
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb index 4bbbcf6c26..6a6f2b9431 100644 --- a/ext/openssl/lib/openssl/ssl.rb +++ b/ext/openssl/lib/openssl/ssl.rb @@ -148,7 +148,7 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3 # call-seq: # ctx.min_version = OpenSSL::SSL::TLS1_2_VERSION - # ctx.min_version = :TLSv1_2 + # ctx.min_version = :TLS1_2 # ctx.min_version = nil # # Sets the lower bound on the supported SSL/TLS protocol version. The @@ -167,30 +167,18 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3 # sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx) # sock.connect # Initiates a connection using either TLS 1.1 or TLS 1.2 def min_version=(version) - case version - when nil, Integer - else - version = (METHODS_MAP[version] or - raise ArgumentError, "unknown SSL version `#{version.inspect}'") - end set_minmax_proto_version(version, @max_proto_version ||= nil) @min_proto_version = version end # call-seq: # ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION - # ctx.max_version = :TLSv1_2 + # ctx.max_version = :TLS1_2 # ctx.max_version = nil # # Sets the upper bound of the supported SSL/TLS protocol version. See # #min_version= for the possible values. def max_version=(version) - case version - when nil, Integer - else - version = (METHODS_MAP[version] or - raise ArgumentError, "unknown SSL version `#{version.inspect}'") - end set_minmax_proto_version(@min_proto_version ||= nil, version) @max_proto_version = version end diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb index 23631111b7..8004d5c5f2 100644 --- a/test/net/http/test_https.rb +++ b/test/net/http/test_https.rb @@ -195,7 +195,7 @@ class TestNetHTTPS < Test::Unit::TestCase def test_min_version http = Net::HTTP.new("127.0.0.1", config("port")) http.use_ssl = true - http.min_version = :TLSv1 + http.min_version = :TLS1 http.verify_callback = Proc.new do |preverify_ok, store_ctx| true end @@ -208,7 +208,7 @@ class TestNetHTTPS < Test::Unit::TestCase def test_max_version http = Net::HTTP.new("127.0.0.1", config("port")) http.use_ssl = true - http.max_version = :SSLv2 + http.max_version = :SSL2 http.verify_callback = Proc.new do |preverify_ok, store_ctx| true end |