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

View File

@ -106,7 +106,8 @@ public final class JdkSslClientContext extends JdkSslContext {
super(ciphers); super(ciphers);
if (nextProtocols != null && nextProtocols.iterator().hasNext() && !JettyNpnSslEngine.isAvailable()) { if (nextProtocols != null && nextProtocols.iterator().hasNext()) {
if (!JettyNpnSslEngine.isAvailable()) {
throw new SSLException("NPN/ALPN unsupported: " + nextProtocols); throw new SSLException("NPN/ALPN unsupported: " + nextProtocols);
} }
@ -118,6 +119,9 @@ public final class JdkSslClientContext extends JdkSslContext {
nextProtoList.add(p); nextProtoList.add(p);
} }
this.nextProtocols = Collections.unmodifiableList(nextProtoList); this.nextProtocols = Collections.unmodifiableList(nextProtoList);
} else {
this.nextProtocols = Collections.emptyList();
}
try { try {
if (certChainFile == null) { if (certChainFile == null) {