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

OpenSSL::SSL::SSLContext does not implement npn_protocols #99

Open
ostinelli opened this issue Jul 7, 2016 · 3 comments
Open

OpenSSL::SSL::SSLContext does not implement npn_protocols #99

ostinelli opened this issue Jul 7, 2016 · 3 comments

Comments

@ostinelli
Copy link

ostinelli commented Jul 7, 2016

jruby-9.0.5.0
Darwin 14.5.0 Darwin Kernel Version 14.5.0: root:xnu-2782.50.3~1/RELEASE_X86_64 x86_64

npn_protocols allows to set the protocols to be advertised as the list of supported protocols for Next Protocol Negotiation. This is very useful in HTTP/2, since the protocol is still in draft and some servers will not accept calls without a clear statement on the protocol used in the request.

Without this method, it is not possible to build highly-compatible HTTP/2 clients in JRuby.

Moved from jruby/jruby#3987 as requested.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35819756-openssl-ssl-sslcontext-does-not-implement-npn_protocols?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github).
@kenichi
Copy link

kenichi commented Sep 1, 2017

also note that it is not possible to build proper H2 servers using JRuby without some sort of subsequent protocol negotiation.

looks like jruby-openssl is up to 1.1.0, and since this is an H2 request, perhaps it should be considered to use ALPN instead of older NPN as specified in the HTTP/2 spec. for reference, here is the commit that added ALPN to MRI.

i would be open to trying to help code-wise, but my java is extremely rusty and it may be better for me to put some dollars on the bounty. if that would get some movement here, i'd be happy to do so. thanks!

@HoneyryderChuck
Copy link
Contributor

ALPN support just landed in Bouncy Castle 1.69

@kares
Copy link
Member

kares commented Feb 3, 2022

alpn_protocols and alpn_select_cb are to be available from #247
... for the older npn_protocols counterpart I am not sure that's going to be needed given the NPN functionality overlaps with ALPN. we could alias npn_xxx to alpn_xxx but I am not sure about the differences in ALPN vs NPN in terms of OpenSSL.

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

No branches or pull requests

4 participants