Skip to content

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

Description

@ostinelli
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).

Activity

  1. kenichi commented on Sep 1, 2017

    @kenichi

    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!

  2. HoneyryderChuck commented on Aug 5, 2021

    @HoneyryderChuck
    Contributor
  3. kares commented on Feb 3, 2022

    @kares
    Member

    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.

  4. kares commented on Sep 25, 2026

    @kares
    Member

    JOSSL can not implement npn_protocols, while it's a limitation alpn has been a much better replacement protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions