We are already JDK9 compatible, if the JDK9 API's are present they will be used.

I have not tested on IBM, although AFAIK the Jetty hack does not work there at the moment, so we are no worse off that what we currently are. If the ALPN reflection hack is disabled (either via system property or because a reflection lookup fails due to structural changes in the JDK) it will revert to trying to use the boot classpath hack.


On Thu, Jun 2, 2016 at 9:21 PM, David M. Lloyd <david.lloyd@redhat.com> wrote:
On 06/01/2016 06:22 PM, Stuart Douglas wrote:
> Hi All,
> I would like to propose that we add support for HTTP/2 out of the box in
> Wildfly 10.1.

+1 from me.

> At the moment there are two main barriers to getting HTTP/2 two work:
> - You need to set up a HTTPS connector, including generating keys etc.
> For new users this is not as straightforward as it could be.
> - You need to find the correct version of the Jetty ALPN jar and add it
> to your boot class path. This is essentially a hack that modifies the
> JDK SSL classes to allow them to support ALPN. A new version is needed
> for every JDK8 release, so if you ever update the JVM HTTP/2 will stop
> working (JDK9 has support for ALPN so this is not nessesary).
> I am proposing that we do the following to address these issues:
> - Add support for lazily generated self signed certificates, and include
> this in the default config. This would mean that we would have a working
> HTTPS connector in the default config, although the first request would
> be a bit slow as it would need to generate a new self signed certificate
> for localhost. This allows for SSL out of the box, without any impact on
> startup time or any need for an installer to generate the certificate.
> - I have dealt with the ALPN issue in Undertow using a reflection based
> hack. I have created some code that parses and modifies the SSL
> Server/Client hello messages to add/read APLN information, and I then
> use reflection to update the HandshakeHash maintained by the engine so
> the engines internal hash state used to generate the Finished frames
> matches the data that was actually sent over the wire.

Nice.  I think this is a pretty decent interim solution (though I think
we'll want to verify that this works on IBM too, and maybe come up with
a parallel code path for that case; also we'll want to be JDK 9
compatible ASAP so we should detect that too).  Yeah it's kind of ugly,
but not so much when you compare it against the alternatives of using
the boot classpath for the Jetty kludge or writing our own JSSE.

wildfly-dev mailing list