446063 - ALPN Fail SSL Handshake if no supported Application Protocols.

This commit is contained in:
Simone Bordet 2014-10-16 15:31:24 +02:00
parent 1729fb045c
commit 6f42d21ed5
24 changed files with 55 additions and 90 deletions

View File

@ -44,12 +44,6 @@ public class ALPNClientConnection extends NegotiatingClientConnection implements
ALPN.put(sslEngine, this);
}
@Override
public boolean supports()
{
return true;
}
@Override
public void unsupported()
{

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

View File

@ -54,12 +54,6 @@ public class ALPNNegotiationTest extends AbstractALPNTest
ALPN.put(client, new ALPN.ClientProvider()
{
@Override
public boolean supports()
{
return true;
}
@Override
public void unsupported()
{
@ -113,12 +107,6 @@ public class ALPNNegotiationTest extends AbstractALPNTest
ALPN.put(client, new ALPN.ClientProvider()
{
@Override
public boolean supports()
{
return true;
}
@Override
public void unsupported()
{
@ -172,12 +160,6 @@ public class ALPNNegotiationTest extends AbstractALPNTest
ALPN.put(client, new ALPN.ClientProvider()
{
@Override
public boolean supports()
{
return false;
}
@Override
public void unsupported()
{

View File

@ -22,6 +22,7 @@ package org.eclipse.jetty.spdy.server;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.Arrays;
import java.util.List;
import javax.net.ssl.SSLEngine;
@ -43,12 +44,6 @@ public class ALPNSynReplyTest extends AbstractALPNTest
sslEngine.setUseClientMode(true);
ALPN.put(sslEngine, new ALPN.ClientProvider()
{
@Override
public boolean supports()
{
return true;
}
@Override
public void unsupported()
{
@ -57,7 +52,7 @@ public class ALPNSynReplyTest extends AbstractALPNTest
@Override
public List<String> protocols()
{
return null;
return Arrays.asList("test");
}
@Override
@ -108,12 +103,6 @@ public class ALPNSynReplyTest extends AbstractALPNTest
sslEngine.setUseClientMode(true);
ALPN.put(sslEngine, new ALPN.ClientProvider()
{
@Override
public boolean supports()
{
return true;
}
@Override
public void unsupported()
{
@ -122,7 +111,7 @@ public class ALPNSynReplyTest extends AbstractALPNTest
@Override
public List<String> protocols()
{
return null;
return Arrays.asList("test");
}
@Override

View File

@ -62,7 +62,7 @@ JVM|-Xms1024m
JVM|-Xmx1024m
# Downloads
DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
DOWNLOAD|http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/plain/jetty-server/src/main/config/etc/keystore|etc/keystore
# Files

View File

@ -37,11 +37,11 @@ PROP|spdy.port=8443
PROP|spdy.timeout=30000
# The Downloads
DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
DOWNLOAD|http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/plain/jetty-server/src/main/config/etc/keystore|etc/keystore
# The Bootlib
BOOTLIB|-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
BOOTLIB|-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar
# The Files
FILE|lib/

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.0.0.v20140317/alpn-boot-7.0.0.v20140317.jar|lib/alpn/alpn-boot-7.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/7.1.0.v20141016/alpn-boot-7.1.0.v20141016.jar|lib/alpn/alpn-boot-7.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-7.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-7.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

View File

@ -2,7 +2,7 @@
protonego-boot
[files]
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.0.0.v20140317/alpn-boot-8.0.0.v20140317.jar|lib/alpn/alpn-boot-8.0.0.v20140317.jar
http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.0.v20141016/alpn-boot-8.1.0.v20141016.jar|lib/alpn/alpn-boot-8.1.0.v20141016.jar
[exec]
-Xbootclasspath/p:lib/alpn/alpn-boot-8.0.0.v20140317.jar
-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar

26
pom.xml
View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-parent</artifactId>
<version>22</version>
<version>23</version>
</parent>
<artifactId>jetty-project</artifactId>
<version>9.2.4-SNAPSHOT</version>
@ -17,7 +17,7 @@
<slf4j-version>1.6.6</slf4j-version>
<jetty-test-policy-version>1.2</jetty-test-policy-version>
<npn.api.version>1.1.1.v20141010</npn.api.version>
<alpn.api.version>1.0.0</alpn.api.version>
<alpn.api.version>1.1.0.v20141014</alpn.api.version>
<!-- default values are unsupported, but required to be defined for reactor sanity reasons -->
<npn.version>undefined</npn.version>
<alpn.version>undefined</alpn.version>
@ -838,7 +838,7 @@
</activation>
<properties>
<npn.version>1.1.6.v20130911</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -851,7 +851,7 @@
</activation>
<properties>
<npn.version>1.1.6.v20130911</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -864,7 +864,7 @@
</activation>
<properties>
<npn.version>1.1.6.v20130911</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -877,7 +877,7 @@
</activation>
<properties>
<npn.version>1.1.8.v20141013</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -890,7 +890,7 @@
</activation>
<properties>
<npn.version>1.1.8.v20141013</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -903,7 +903,7 @@
</activation>
<properties>
<npn.version>1.1.8.v20141013</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -916,7 +916,7 @@
</activation>
<properties>
<npn.version>1.1.8.v20141013</npn.version>
<alpn.version>7.0.0.v20140317</alpn.version>
<alpn.version>7.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -928,7 +928,7 @@
</property>
</activation>
<properties>
<alpn.version>8.0.0.v20140317</alpn.version>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -940,7 +940,7 @@
</property>
</activation>
<properties>
<alpn.version>8.0.0.v20140317</alpn.version>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -952,7 +952,7 @@
</property>
</activation>
<properties>
<alpn.version>8.0.0.v20140317</alpn.version>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
@ -964,7 +964,7 @@
</property>
</activation>
<properties>
<alpn.version>8.0.0.v20140317</alpn.version>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
</profiles>