Merge pull request #3744 from eclipse/jetty-9.4.x-3648-websocket-client-ssl

Issue #3648 - SSL based on WebSocket behavior (CLIENT vs SERVER)
This commit is contained in:
Joakim Erdfelt 2019-06-18 08:05:33 -05:00 committed by GitHub
commit a847f54cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -84,7 +84,10 @@ public class SimpleContainerScope extends ContainerLifeCycle implements WebSocke
if (ssl == null)
{
this.sslContextFactory = new SslContextFactory.Server();
if (policy.getBehavior() == WebSocketBehavior.CLIENT)
this.sslContextFactory = new SslContextFactory.Client();
else if (policy.getBehavior() == WebSocketBehavior.SERVER)
this.sslContextFactory = new SslContextFactory.Server();
}
else
{