diff --git a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/DefaultWebSocketClientSslProvider.java b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/DefaultWebSocketClientSslProvider.java index d8044c7403..003288c441 100644 --- a/websockets-jsr/src/main/java/io/undertow/websockets/jsr/DefaultWebSocketClientSslProvider.java +++ b/websockets-jsr/src/main/java/io/undertow/websockets/jsr/DefaultWebSocketClientSslProvider.java @@ -63,6 +63,9 @@ public XnioSsl getSsl(XnioWorker worker, Endpoint endpoint, ClientEndpointConfig } //look for some SSL config SSLContext sslContext = (SSLContext) cec.getUserProperties().get(SSL_CONTEXT); + if (sslContext == null) { + sslContext = cec.getSSLContext(); + } if (sslContext != null) { return new UndertowXnioSsl(worker.getXnio(), OptionMap.EMPTY, sslContext);