Actions
Bug #20458
closedOpensSSL::SSL::SSLContext#min_version= and #max_version no longer accept Symbol values
    Bug #20458:
    OpensSSL::SSL::SSLContext#min_version= and #max_version no longer accept Symbol values
  
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux]
Description
It appears that OpenSSL::SSL::SSLContext#min_version= and #max_version= no longer accept Symbol values, contrary to their documentation. Instead it appears they are being converted to Strings.
Steps To Reproduce¶
require 'openssl'
context = OpenSSL::SSL::SSLContext.new
context.min_version = :TLSv1
require 'openssl'
context = OpenSSL::SSL::SSLContext.new
context.max_version = :TLSv1_2
Expected Results¶
Sets min_version and max_version to the according OpenSSL::SSL::TLS1_VERSION and OpenSSL::SSL::TLS1_2_VERSION values, respectively.
Actual Results¶
/usr/share/ruby/openssl/ssl.rb:179:in `set_minmax_proto_version': unrecognized version "TLSv1" (ArgumentError)
        set_minmax_proto_version(version, @max_proto_version ||= nil)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /usr/share/ruby/openssl/ssl.rb:179:in `min_version='
/usr/share/ruby/openssl/ssl.rb:191:in `set_minmax_proto_version': unrecognized version "TLSv1_2" (ArgumentError)
        set_minmax_proto_version(@min_proto_version ||= nil, version)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /usr/share/ruby/openssl/ssl.rb:191:in `max_version='
Version Info¶
Tested on:
- 
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]andopensslgem version3.1.0
- 
ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux]andopensslgem version3.2.0
Actions