Issue #9390 has been updated by Aaron Patterson.

File 0001-add-ALPN-extension-support.patch added

> I think we need to keep °∆selected°« markable by GC as longas anything
> may use °∆out°« . Otherwise °∆out°« can referto a freed region.
> 
> Perhaps add the following here:
>
> rb_iv_set(sslctx_obj, "@_alpn_selected", selected);
> Side note: StringValue is redundant if using StringValuePtr

Thanks for spotting these!  I've attached a new patch with these changes.

----------------------------------------
Feature #9390: Support for the ALPN TLS extension
https://bugs.ruby-lang.org/issues/9390#change-53415

* Author: Ilya Grigorik
* Status: Assigned
* Priority: Normal
* Assignee: Martin Bosslet
----------------------------------------
ALPN [1] is a successor [2] to NPN, support for which was added in 2.0.0 [3].

HTTP/2 [4] is using ALPN to negotiate protocol support, and the spec is moving fast -- it'd be great to have ALPN support in one of the upcoming Ruby releases. Current status of ALPN support in various TLS libraries and languages: https://github.com/http2/http2-spec/wiki/ALPN-Status. 

As a side note, for anyone interested, I have an implementation of draft-06http/2 spec: https://github.com/igrigorik/http-2

[1] http://tools.ietf.org/html/draft-friedl-tls-applayerprotoneg-02
[2] https://www.imperialviolet.org/2013/03/20/alpn.html
[3] https://bugs.ruby-lang.org/issues/6503
[4] http://tools.ietf.org/html/draft-ietf-httpbis-http2-00

---Files--------------------------------
0001-add-ALPN-extension-support.patch (7.75 KB)
0001-add-ALPN-extension-support.patch (7.78 KB)


-- 
https://bugs.ruby-lang.org/