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

Fix OpenSSL::SSL::Context::Client#alpn_protocol= #12724

Merged
merged 1 commit into from Nov 16, 2022

Conversation

jaclarke
Copy link
Contributor

@jaclarke jaclarke commented Nov 6, 2022

Fixes #11895

The current OpenSSL::SSL::Context#alpn_protocol= setter calls LibSSL.ssl_ctx_set_alpn_select_cb, which only works for server SSL contexts. This PR moves this setter into the Context::Server subclass, and adds a Context::Client#alpn_protocol= setter that calls the correct LibSSL.ssl_ctx_set_alpn_protos method for client contexts.

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jaclarke 🙏

@straight-shoota straight-shoota added this to the 1.7.0 milestone Nov 15, 2022
@straight-shoota straight-shoota merged commit 4a0e38b into crystal-lang:master Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It seems that OpenSSL::SSL::Context::Client.alpn_protocol= does not work
4 participants