This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 97a803bed0 Fix SSL socket factory configuration in the JNDI realm
97a803bed0 is described below

commit 97a803bed018478fb082d6fd8530078d1136e3f2
Author: remm <[email protected]>
AuthorDate: Mon Nov 3 10:10:44 2025 +0100

    Fix SSL socket factory configuration in the JNDI realm
    
    Based on PR#915 by Joshua Rogers.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 2 +-
 webapps/docs/changelog.xml                    | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index ad28f57ea1..85c4a2ee16 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -2582,7 +2582,7 @@ public class JNDIRealm extends RealmBase {
         try {
             Object o = constructInstance(className);
             if (o instanceof SSLSocketFactory) {
-                return sslSocketFactory;
+                return (SSLSocketFactory) o;
             } else {
                 throw new 
IllegalArgumentException(sm.getString("jndiRealm.invalidSslSocketFactory", 
className));
             }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3b10e75e8c..0cac4c4905 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -112,6 +112,10 @@
         individual class path components to avoid a potential
         <code>NullPointerException</code>. Identified by Coverity Scan. (markt)
       </fix>
+      <fix>
+        Fix SSL socket factory configuration in the JNDI realm. Based on pull
+        request <pr>915</pr> by Joshua Rogers. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to