Re: [tomcat] branch master updated: Add support for ALPN on Java 8

2020-07-02 Thread Mark Thomas
On 02/07/2020 17:21, Mark Thomas wrote:
> On 02/07/2020 10:27, Rémy Maucherat wrote:



>> So, two months later I plan to make the change since the required
>> OpenJDK build is now old enough, and most importantly this is a minor
>> API change that needs to happen before 10.0 goes out of M mode.
>> Basically, this is the right time for the cleanup.
>>
>> The main problem is that CI still hasn't been updated (issue to follow
>> is: https://issues.apache.org/jira/browse/INFRA-20385 ), so the trunk CI
>> build will break for the time being. This is "fine" as far as I am
>> concerned since there are now the test runs from github. Also the 9
>> branch CI is not affected.
>>
>> Comments ?
> 
> Let me see if I can move that ticket along.

latest1.8 is now at OpenJDK 8u252-b09

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Add support for ALPN on Java 8

2020-07-02 Thread Mark Thomas
On 02/07/2020 10:27, Rémy Maucherat wrote:
> On Sat, May 9, 2020 at 4:53 PM Rémy Maucherat  > wrote:
> 
> On Fri, May 8, 2020 at 6:36 PM  > wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this
> push:
>      new 19ce500  Add support for ALPN on Java 8
> 19ce500 is described below
> 
> commit 19ce5009930289f59e63250592f894aaa53cf302
> Author: remm mailto:r...@apache.org>>
> AuthorDate: Fri May 8 18:36:10 2020 +0200
> 
>     Add support for ALPN on Java 8
> 
>     HTTP/2 with a browser does work for me now. Feel free to
> test, it needs
>     a very recent Java 8.
>     It is also possible to get rid of the reflection and
> JreCompat for ALPN,
>     but it would create a hard dependency on the newest Java 8s.
> OTOH,
>     previous releases will soon be insecure so update is more or
> less
>     required. I will start with that change in Tomcat 10, and it
> could be
>     backported later to Tomcat 9 and 8.5, when we consider not
> using a
>     compatible Java 8 is a problem.
> 
> 
> I intend to make the additional cleanup in Tomcat 10 only for now,
> after CI is updated to a newer Java 8 JVM.
> 
> For reference, the JVM change for Java 8 is here:
> https://bugs.openjdk.java.net/browse/JDK-8230977
> 
> 
> So, two months later I plan to make the change since the required
> OpenJDK build is now old enough, and most importantly this is a minor
> API change that needs to happen before 10.0 goes out of M mode.
> Basically, this is the right time for the cleanup.
> 
> The main problem is that CI still hasn't been updated (issue to follow
> is: https://issues.apache.org/jira/browse/INFRA-20385 ), so the trunk CI
> build will break for the time being. This is "fine" as far as I am
> concerned since there are now the test runs from github. Also the 9
> branch CI is not affected.
> 
> Comments ?

Let me see if I can move that ticket along.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Add support for ALPN on Java 8

2020-07-02 Thread Rémy Maucherat
On Sat, May 9, 2020 at 4:53 PM Rémy Maucherat  wrote:

> On Fri, May 8, 2020 at 6:36 PM  wrote:
>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> remm pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>  new 19ce500  Add support for ALPN on Java 8
>> 19ce500 is described below
>>
>> commit 19ce5009930289f59e63250592f894aaa53cf302
>> Author: remm 
>> AuthorDate: Fri May 8 18:36:10 2020 +0200
>>
>> Add support for ALPN on Java 8
>>
>> HTTP/2 with a browser does work for me now. Feel free to test, it
>> needs
>> a very recent Java 8.
>> It is also possible to get rid of the reflection and JreCompat for
>> ALPN,
>> but it would create a hard dependency on the newest Java 8s. OTOH,
>> previous releases will soon be insecure so update is more or less
>> required. I will start with that change in Tomcat 10, and it could be
>> backported later to Tomcat 9 and 8.5, when we consider not using a
>> compatible Java 8 is a problem.
>>
>
> I intend to make the additional cleanup in Tomcat 10 only for now, after
> CI is updated to a newer Java 8 JVM.
>
> For reference, the JVM change for Java 8 is here:
> https://bugs.openjdk.java.net/browse/JDK-8230977
>

So, two months later I plan to make the change since the required OpenJDK
build is now old enough, and most importantly this is a minor API change
that needs to happen before 10.0 goes out of M mode. Basically, this is the
right time for the cleanup.

The main problem is that CI still hasn't been updated (issue to follow is:
https://issues.apache.org/jira/browse/INFRA-20385 ), so the trunk CI build
will break for the time being. This is "fine" as far as I am concerned
since there are now the test runs from github. Also the 9 branch CI is not
affected.

Comments ?

Rémy


Re: [tomcat] branch master updated: Add support for ALPN on Java 8

2020-05-09 Thread Rémy Maucherat
On Fri, May 8, 2020 at 6:36 PM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> remm pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>  new 19ce500  Add support for ALPN on Java 8
> 19ce500 is described below
>
> commit 19ce5009930289f59e63250592f894aaa53cf302
> Author: remm 
> AuthorDate: Fri May 8 18:36:10 2020 +0200
>
> Add support for ALPN on Java 8
>
> HTTP/2 with a browser does work for me now. Feel free to test, it needs
> a very recent Java 8.
> It is also possible to get rid of the reflection and JreCompat for
> ALPN,
> but it would create a hard dependency on the newest Java 8s. OTOH,
> previous releases will soon be insecure so update is more or less
> required. I will start with that change in Tomcat 10, and it could be
> backported later to Tomcat 9 and 8.5, when we consider not using a
> compatible Java 8 is a problem.
>

I intend to make the additional cleanup in Tomcat 10 only for now, after CI
is updated to a newer Java 8 JVM.

For reference, the JVM change for Java 8 is here:
https://bugs.openjdk.java.net/browse/JDK-8230977

Rémy


[tomcat] branch master updated: Add support for ALPN on Java 8

2020-05-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 19ce500  Add support for ALPN on Java 8
19ce500 is described below

commit 19ce5009930289f59e63250592f894aaa53cf302
Author: remm 
AuthorDate: Fri May 8 18:36:10 2020 +0200

Add support for ALPN on Java 8

HTTP/2 with a browser does work for me now. Feel free to test, it needs
a very recent Java 8.
It is also possible to get rid of the reflection and JreCompat for ALPN,
but it would create a hard dependency on the newest Java 8s. OTOH,
previous releases will soon be insecure so update is more or less
required. I will start with that change in Tomcat 10, and it could be
backported later to Tomcat 9 and 8.5, when we consider not using a
compatible Java 8 is a problem.
---
 java/org/apache/tomcat/util/compat/Jre9Compat.java | 31 
 java/org/apache/tomcat/util/compat/JreCompat.java  | 41 --
 .../tomcat/util/net/AbstractJsseEndpoint.java  |  2 +-
 .../apache/tomcat/util/net/SecureNio2Channel.java  |  2 +-
 .../apache/tomcat/util/net/SecureNioChannel.java   |  2 +-
 .../tomcat/util/net/jsse/JSSEImplementation.java   |  2 +-
 webapps/docs/changelog.xml |  7 
 7 files changed, 50 insertions(+), 37 deletions(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre9Compat.java 
b/java/org/apache/tomcat/util/compat/Jre9Compat.java
index 29fef06..8e0812c 100644
--- a/java/org/apache/tomcat/util/compat/Jre9Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre9Compat.java
@@ -31,9 +31,6 @@ import java.util.Set;
 import java.util.jar.JarFile;
 import java.util.zip.ZipFile;
 
-import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLParameters;
-
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -44,8 +41,6 @@ class Jre9Compat extends JreCompat {
 private static final StringManager sm = 
StringManager.getManager(Jre9Compat.class);
 
 private static final Class inaccessibleObjectExceptionClazz;
-private static final Method setApplicationProtocolsMethod;
-private static final Method getApplicationProtocolMethod;
 private static final Method setDefaultUseCachesMethod;
 private static final Method bootMethod;
 private static final Method configurationMethod;
@@ -64,8 +59,6 @@ class Jre9Compat extends JreCompat {
 
 static {
 Class c1 = null;
-Method m2 = null;
-Method m3 = null;
 Method m4 = null;
 Method m5 = null;
 Method m6 = null;
@@ -96,8 +89,6 @@ class Jre9Compat extends JreCompat {
 Method runtimeVersionMethod = 
JarFile.class.getMethod("runtimeVersion");
 Method majorMethod = versionClazz.getMethod("major");
 
-m2 = SSLParameters.class.getMethod("setApplicationProtocols", 
String[].class);
-m3 = SSLEngine.class.getMethod("getApplicationProtocol");
 m4 = URLConnection.class.getMethod("setDefaultUseCaches", 
String.class, boolean.class);
 m5 = moduleLayerClazz.getMethod("boot");
 m6 = moduleLayerClazz.getMethod("configuration");
@@ -129,8 +120,6 @@ class Jre9Compat extends JreCompat {
 }
 
 inaccessibleObjectExceptionClazz = c1;
-setApplicationProtocolsMethod = m2;
-getApplicationProtocolMethod = m3;
 setDefaultUseCachesMethod = m4;
 bootMethod = m5;
 configurationMethod = m6;
@@ -172,26 +161,6 @@ class Jre9Compat extends JreCompat {
 
 
 @Override
-public void setApplicationProtocols(SSLParameters sslParameters, String[] 
protocols) {
-try {
-setApplicationProtocolsMethod.invoke(sslParameters, (Object) 
protocols);
-} catch (IllegalAccessException | IllegalArgumentException | 
InvocationTargetException e) {
-throw new UnsupportedOperationException(e);
-}
-}
-
-
-@Override
-public String getApplicationProtocol(SSLEngine sslEngine) {
-try {
-return (String) getApplicationProtocolMethod.invoke(sslEngine);
-} catch (IllegalAccessException | IllegalArgumentException | 
InvocationTargetException e) {
-throw new UnsupportedOperationException(e);
-}
-}
-
-
-@Override
 public void disableCachingForJarUrlConnections() throws IOException {
 try {
 setDefaultUseCachesMethod.invoke(null, "JAR", Boolean.FALSE);
diff --git a/java/org/apache/tomcat/util/compat/JreCompat.java 
b/java/org/apache/tomcat/util/compat/JreCompat.java
index 2ad6cae..8275e60 100644
--- a/java/org/apache/tomcat/util/compat/JreCompat.java
+++ b/java/org/apache/tomcat/util/compat/JreCompat.java
@@ -19,6 +19,8 @@ package org.apache.tomcat.util.compat;
 import