This commit is contained in:
Trustin Lee 2014-05-22 10:28:38 +09:00
parent af3b358892
commit d803a75e2f

View File

@ -106,18 +106,22 @@ public final class JdkSslClientContext extends JdkSslContext {
super(ciphers); super(ciphers);
if (nextProtocols != null && nextProtocols.iterator().hasNext() && !JettyNpnSslEngine.isAvailable()) { if (nextProtocols != null && nextProtocols.iterator().hasNext()) {
throw new SSLException("NPN/ALPN unsupported: " + nextProtocols); if (!JettyNpnSslEngine.isAvailable()) {
} throw new SSLException("NPN/ALPN unsupported: " + nextProtocols);
List<String> nextProtoList = new ArrayList<String>();
for (String p: nextProtocols) {
if (p == null) {
break;
} }
nextProtoList.add(p);
List<String> nextProtoList = new ArrayList<String>();
for (String p: nextProtocols) {
if (p == null) {
break;
}
nextProtoList.add(p);
}
this.nextProtocols = Collections.unmodifiableList(nextProtoList);
} else {
this.nextProtocols = Collections.emptyList();
} }
this.nextProtocols = Collections.unmodifiableList(nextProtoList);
try { try {
if (certChainFile == null) { if (certChainFile == null) {