-
Notifications
You must be signed in to change notification settings - Fork 171
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
Undefine OpenSSL::SSL
for no socket platforms
#558
Merged
rhenium
merged 3 commits into
ruby:master
from
kateinoigakukun:katei/fix-no-sock-support
Dec 22, 2022
Merged
Undefine OpenSSL::SSL
for no socket platforms
#558
rhenium
merged 3 commits into
ruby:master
from
kateinoigakukun:katei/fix-no-sock-support
Dec 22, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Should we disable OpenSSL::SSL entirely on |
76d7d1e
to
033fac7
Compare
SSLContext#servername_cb=
and part of OpenSSL::Session
under OPENSSL_NO_SOCKOpenSSL::SSL
for no socket platforms
033fac7
to
7a9b09e
Compare
@rhenium That makes sense to me 👍 |
rhenium
reviewed
Dec 22, 2022
Let me push some additional commits. |
ad098d0
to
2ad1ff0
Compare
Oops. We crossed each other. |
Okay, no worries 🙏 now CI is green |
This module was introduced in 2015 for internal use within this library. Neither of the two constants in it is used anymore. I don't think we will be adding a new constant in the foreseeable future, either. OPENSSL_NO_SOCK is unused since commit 998d667 (r55191). HAVE_TLSEXT_HOST_NAME is unused since commit 4eb4b32.
This fixes a linkage error about `ossl_ssl_type` on platforms which do not have socket, like WASI. Even before this patch, some items are disabled under `OPENSSL_NO_SOCK` since ruby/ruby@ee22fad However, due to some new use of OpenSSL::SSL::Socket over the past few years, the build under `OPENSSL_NO_SOCK` had been broken. This patch guards whole `OpenSSL::SSL` items by `OPENSSL_NO_SOCK`. [ky: adjusted to apply on top of my previous commit that removed the OpenSSL::ExtConfig, and added a guard to lib/openssl/ssl.rb.]
2ad1ff0
to
b0cfac6
Compare
Merged, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a linkage error about
ossl_ssl_type
on platforms that do not have socket, like WASI.Even before this patch,
OpenSSL::SSL::Socket.new
throwsNotImplementedError
underOPENSSL_NO_SOCK
since ruby/ruby@ee22fad However, due to some new use of OpenSSL::SSL::Socket over the past few years, the build underOPENSSL_NO_SOCK
had been broken.This patch guards those new use of
OpenSSL::SSL::Socket
byOPENSSL_NO_SOCK
.SSLContext#servername_cb=
, which sets a callback taking a socket.OpenSSL::Session
, which can accept a socket to create a new session.