From 78b28b7659d905bfe2334cb811ba6762f266557f Mon Sep 17 00:00:00 2001 From: Diana Krepinska Date: Thu, 21 Mar 2024 01:04:51 +0100 Subject: [PATCH] [WFCORE-5101] Use ActiveSessionsSSLContext instead of DynamicSSLContext to avoid dependency on unsupported module --- .../org/wildfly/extension/elytron/SSLContextResource.java | 6 +++--- .../extension/elytron/elytron-subsystem-community-18.0.xml | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java b/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java index 3fe5ebabcd3..b83d88e23c7 100644 --- a/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java +++ b/elytron/src/main/java/org/wildfly/extension/elytron/SSLContextResource.java @@ -21,7 +21,7 @@ import org.jboss.msc.service.ServiceController; import org.jboss.msc.service.ServiceController.State; import org.wildfly.common.iteration.ByteIterator; -import org.wildfly.security.dynamic.ssl.DynamicSSLContext; +import org.wildfly.security.auth.client.ActiveSessionsSSLContext; /** * A {@link Resource} to represent a server-ssl-context/client-ssl-context, the majority is actually model @@ -130,8 +130,8 @@ public Resource clone() { */ private boolean hasActiveSessions() { final SSLContext sslContext = getSSLContext(sslContextServiceController); - if (sslContext instanceof DynamicSSLContext) { - return false; + if (sslContext instanceof ActiveSessionsSSLContext) { + return ((ActiveSessionsSSLContext) sslContext).hasActiveSessions(); } if (sslContext == null) return false; SSLSessionContext sslSessionContext = server ? sslContext.getServerSessionContext() : sslContext.getClientSessionContext(); diff --git a/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml b/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml index c7c78cc9245..79811affd81 100644 --- a/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml +++ b/elytron/src/test/resources/org/wildfly/extension/elytron/elytron-subsystem-community-18.0.xml @@ -5,6 +5,9 @@ + + + @@ -349,6 +352,9 @@ + + +