NameError: uninitialized constant OpenSSL::SSL::TLS1_3_VERSION (bunny-2.20.0, ruby 2.6) #646
Replies: 12 comments 4 replies
-
What happens on Ruby 2.7 or 3.x? |
Beta Was this translation helpful? Give feedback.
-
I am not particularly interested in spending time on Ruby 2.6 compatibility, if 2.7 and 3.x do not run into this, I'd simply bump the minimum supported version for new releases. Also, we need a way to reproduce since quite obviously only you have access to your CI env. |
Beta Was this translation helpful? Give feedback.
-
Looking at the code in begin
require "openssl"
rescue LoadError => _le
$stderr.puts "Could not load OpenSSL"
end makes me wonder if the OpenSSL version on your CI host is too old to support TLS 1.3, and thus the OpenSSL Ruby extension infers that and doesn't make the constant available. Older Ruby versions and cutting edge TLS won't necessarily play well together. It took I could not reproduce on 2.7 or 3.x, and could not build Ruby 2.6 on ARM64 locally. Trying out a Docker image next. |
Beta Was this translation helpful? Give feedback.
-
I cannot reproduce using
|
Beta Was this translation helpful? Give feedback.
-
I can reproduce with ruby 3.1.2 on Ubuntu 16.04.6 with openssl 1.0.2g
|
Beta Was this translation helpful? Give feedback.
-
Getting the same error here with fully updated Ubuntu 18.04 LTS, openSSL 1.1.1 and Ruby 3.0.3. |
Beta Was this translation helpful? Give feedback.
-
Can confirm this error on ubuntu 18.04 LTS, openssl 1.1.1 and ruby 2.7.6. I think it is a problem with the openssl version, not the ruby version. This is a breaking change IMHO and should thus not be just a minor release - 2.19.0 works as expected. |
Beta Was this translation helpful? Give feedback.
-
I am afraid I am not interested in working around OpenSSL issues specific to Ubuntu 16.04 (close to 7 years old) and 18.04 (close to 5). |
Beta Was this translation helpful? Give feedback.
-
Aye, thanks for this clear statement. Maybe you could mention it in the changelog that it is not compatible to openssl 1.1.1 anymore since version 2.20 so poor souls like us who still have to support systems which stick to openssl 1.1.1 for whatever reasons will see it immediately? |
Beta Was this translation helpful? Give feedback.
-
A quick investigation suggests that
|
Beta Was this translation helpful? Give feedback.
-
#653 is one workaround I could think of, there may be others. |
Beta Was this translation helpful? Give feedback.
-
Should be addressed in |
Beta Was this translation helpful? Give feedback.
-
Via dependabot;
Strangely, this constant should probably be available even as far back as Ruby 2.5.1:
https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html
It might just be a load order issue on our side of things; however Bunny 2.19.0 doesn't appear to experience the issue.
Beta Was this translation helpful? Give feedback.
All reactions