Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally alias constants for TLSv1.3 to support older OpenSSL releases #652

Closed
michaelklishin opened this issue Jan 25, 2023 · 0 comments · Fixed by #653
Closed

Conditionally alias constants for TLSv1.3 to support older OpenSSL releases #652

michaelklishin opened this issue Jan 25, 2023 · 0 comments · Fixed by #653
Milestone

Comments

@michaelklishin
Copy link
Member

michaelklishin commented Jan 25, 2023

See #629, #646.

For environments that do provide a supported Ruby version but do not provide a TLS 1.3-compatible
OpenSSL versions, it would be great to avoid a module load time exception and simply not have
1.3 as a supported version. Conditionally populating the map of TLS aliases in Bunny::Transport
should be enough.

However, a quick investigation suggests that it is not entirely trivial: older OpenSSL module
versions do not provide the same set of constants, and reproducing an environment with, say,
Ubuntu 18.04 and Ruby 2.6 will take extra effort:

  • Before Ruby 2.6, OpenSSL::SSL::TLS1_2_VERSION and similar constants were not available
  • Ruby 2.6 is not available in standard Ubuntu repositories, they go from 2.5 in 18.04 to 2.7 in 20.04 and then 3.0 in 22.04
  • Using defined?(OpenSSL::SSL::TLS1_3_VERSION) should be enough to work around this but to test it I'd have to build Ruby 2.6 on Ubuntu 18.04
  • Building Ruby 2.6 on arm64 hosts does not seem to be possible (likely because it pre-dates ARM64 Macs in wide use)
@michaelklishin michaelklishin changed the title Conditionally alias constants for TLSv1.3 Conditionally alias constants for TLSv1.3 to support older OpenSSL releases Jan 25, 2023
michaelklishin added a commit that referenced this issue Jan 25, 2023
so that the module does not fail to load on/with older OpenSSL
versions that do not support TLS 1.3.

References #629, #646.

Closes #652.
@michaelklishin michaelklishin modified the milestone: 2.20.3 Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant