Configure default EndpointIdentificationAlgorithm for WebSocketCoreClient

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-12-13 09:36:13 +11:00
parent 9a67114c43
commit 52d0d62594
3 changed files with 6 additions and 4 deletions

View File

@ -85,9 +85,9 @@
<Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.eclipse.jetty.webapp.JmxConfiguration</Item>
<Item>org.eclipse.jetty.osgi.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.websocket.server.JettyWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.websocket.javax.server.JavaxWebSocketConfiguration</Item>
<Item>org.eclipse.jetty.osgi.annotations.AnnotationConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration</Item>
<Item>org.eclipse.jetty.osgi.boot.OSGiMetaInfConfiguration</Item>
</Array>

View File

@ -113,7 +113,7 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable
}};
private static final Logger LOG = Log.getLogger(SslContextFactory.class);
private static final Logger LOG_CONFIG = LOG.getLogger("config");
private static final Logger LOG_CONFIG = LOG.getLogger("SslContextFactoryConfig");
public static final String DEFAULT_KEYMANAGERFACTORY_ALGORITHM =
(Security.getProperty("ssl.KeyManagerFactory.algorithm") == null ?

View File

@ -52,9 +52,11 @@ public class WebSocketCoreClient extends ContainerLifeCycle implements FrameHand
public WebSocketCoreClient()
{
this(new HttpClient(new SslContextFactory()));
this.httpClient.setName("WSCoreClient");
// TODO is there more HttpClient configuration we should do by default?
httpClient.getSslContextFactory().setEndpointIdentificationAlgorithm("HTTPS");
httpClient.setName("WSCoreClient");
// Internally created, let websocket client's lifecycle manage it.
this.addManaged(httpClient);
addManaged(httpClient);
}
public WebSocketCoreClient(HttpClient httpClient)