From 7761d772af8f038d93d707359d012b3c0f9ca4c4 Mon Sep 17 00:00:00 2001 From: masuda Date: Tue, 13 Feb 2024 12:46:45 +0900 Subject: [PATCH] get SSLContext from ClientEndpointConfig --- .../websockets/jsr/DefaultWebSocketClientSslProvider.java | 3 +++ 1 file changed, 3 insertions(+) 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);