summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-25 14:12:07 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-25 14:12:07 +0000
commit55953e374db2193ffb6ca84e2cb83d480ecd68ac (patch)
tree1625e8bb1dfbef1410a5a89e80d85a6fcf5e472b /ext
parentc56ac0863637b1315099be600fa5ef624d658ebb (diff)
openssl: revert changes in SSLContext#{min,max}_version= in r60310
And adapt a net/http test to their old behavior. [ruby-core:83491] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/lib/openssl/ssl.rb16
1 files changed, 2 insertions, 14 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