OpenSSL::SSL::SSLContext does not implement npn_protocols
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 https://github.com/jruby/jruby/issues/3987 as requested.
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!
alpn_protocols and alpn_select_cb are to be available from https://github.com/jruby/jruby-openssl/pull/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.