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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new cac481b83a Align with some of the changes made for APR support in 9.0.x
cac481b83a is described below

commit cac481b83a84ccfd24900f343ab46f2bb791ea4f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jan 15 17:56:59 2026 +0000

    Align with some of the changes made for APR support in 9.0.x
---
 test/org/apache/tomcat/security/TestSecurity2017Ocsp.java | 4 ++--
 test/org/apache/tomcat/util/net/TesterSupport.java        | 9 +++++++--
 test/org/apache/tomcat/util/net/ocsp/OcspBaseTest.java    | 2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java 
b/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
index cd69cd218c..add90fd086 100644
--- a/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
+++ b/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
@@ -84,8 +84,8 @@ public class TestSecurity2017Ocsp extends OcspBaseTest {
         Tomcat.addServlet(ctx, "simple", new SimpleServlet());
         ctx.addServletMappingDecoded("/simple", "simple");
 
-        // User a valid (non-revoked) server certificate
-        TesterSupport.initSsl(tomcat, TesterSupport.LOCALHOST_RSA_JKS, 
useOpenSSLTrust);
+        // Use the default (valid, non-revoked) server certificate
+        TesterSupport.initSsl(tomcat, useOpenSSLTrust);
 
         // Require client certificates and enable verification
         SSLHostConfig sslHostConfig = 
tomcat.getConnector().findSslHostConfigs()[0];
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 383d8f4064..2f146990db 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -128,8 +128,13 @@ public final class TesterSupport {
     }
 
     public static void initSsl(Tomcat tomcat) {
-        // TLS material for tests uses default password
-        initSsl(tomcat, LOCALHOST_RSA_JKS, false);
+        // By default, use JSSE JSSE trust
+        initSsl(tomcat, false);
+    }
+
+    public static void initSsl(Tomcat tomcat, boolean opensslTrust) {
+        // By default, use valid JSSE configuration
+        initSsl(tomcat, LOCALHOST_RSA_JKS, opensslTrust);
     }
 
     public static void initSsl(Tomcat tomcat, String keystore, boolean 
opensslTrust) {
diff --git a/test/org/apache/tomcat/util/net/ocsp/OcspBaseTest.java 
b/test/org/apache/tomcat/util/net/ocsp/OcspBaseTest.java
index 69b59c93cc..f473584d57 100644
--- a/test/org/apache/tomcat/util/net/ocsp/OcspBaseTest.java
+++ b/test/org/apache/tomcat/util/net/ocsp/OcspBaseTest.java
@@ -123,7 +123,7 @@ public class OcspBaseTest extends TomcatBaseTest {
         ctx.addServletMappingDecoded("/simple", "simple");
 
         if (serverCertValid) {
-            TesterSupport.initSsl(tomcat, TesterSupport.LOCALHOST_RSA_JKS, 
useOpenSSLTrust);
+            TesterSupport.initSsl(tomcat, useOpenSSLTrust);
         } else {
             TesterSupport.initSsl(tomcat, TesterSupport.LOCALHOST_CRL_RSA_JKS, 
useOpenSSLTrust);
         }


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

Reply via email to