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

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit db14bf335eebc88a3d5ff36cdc0b4268055c708d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jan 3 19:45:15 2024 +0000

    Test is skipped due to JSSE vs Apr, not renegotiation
    
    Don't report a test as skipped if it can never pass
---
 .../apache/catalina/valves/rewrite/TestResolverSSL.java   |  4 ----
 .../apache/tomcat/util/net/TestCustomSslTrustManager.java |  9 +++++----
 test/org/apache/tomcat/util/net/TesterSupport.java        | 15 ---------------
 3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/test/org/apache/catalina/valves/rewrite/TestResolverSSL.java 
b/test/org/apache/catalina/valves/rewrite/TestResolverSSL.java
index e54f49103e..641b55eebf 100644
--- a/test/org/apache/catalina/valves/rewrite/TestResolverSSL.java
+++ b/test/org/apache/catalina/valves/rewrite/TestResolverSSL.java
@@ -22,7 +22,6 @@ import java.io.PrintWriter;
 import javax.servlet.ServletException;
 
 import org.junit.Assert;
-import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Container;
@@ -39,9 +38,6 @@ public class TestResolverSSL extends TomcatBaseTest {
 
     @Test
     public void testSslEnv() throws Exception {
-        Assume.assumeTrue("SSL renegotiation has to be supported for this 
test",
-                TesterSupport.isRenegotiationSupported(getTomcatInstance()));
-
         Tomcat tomcat = getTomcatInstance();
         Container root = tomcat.getHost().findChild("");
         root.getPipeline().addValve(new ResolverTestValve());
diff --git a/test/org/apache/tomcat/util/net/TestCustomSslTrustManager.java 
b/test/org/apache/tomcat/util/net/TestCustomSslTrustManager.java
index f2afd93806..1853a48f74 100644
--- a/test/org/apache/tomcat/util/net/TestCustomSslTrustManager.java
+++ b/test/org/apache/tomcat/util/net/TestCustomSslTrustManager.java
@@ -21,7 +21,6 @@ import java.net.SocketException;
 import javax.net.ssl.SSLException;
 
 import org.junit.Assert;
-import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.connector.Connector;
@@ -64,13 +63,15 @@ public class TestCustomSslTrustManager extends 
TomcatBaseTest {
 
         Tomcat tomcat = getTomcatInstance();
 
-        Assume.assumeTrue("SSL renegotiation has to be supported for this 
test",
-                TesterSupport.isRenegotiationSupported(tomcat));
-
         TesterSupport.configureClientCertContext(tomcat);
 
         Connector connector = tomcat.getConnector();
 
+        // This test is only for JSSE based SSL connectors
+        if (connector.getProtocolHandlerClassName().contains("Apr")) {
+            return;
+        }
+
         // Override the defaults
         ProtocolHandler handler = connector.getProtocolHandler();
         if (handler instanceof AbstractHttp11JsseProtocol) {
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 38603a75c5..568ea1ece8 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -29,7 +29,6 @@ import java.security.Principal;
 import java.security.PrivateKey;
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
-import java.util.Locale;
 
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
@@ -229,20 +228,6 @@ public final class TesterSupport {
         return ks;
     }
 
-    protected static boolean isMacOs() {
-        return 
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).startsWith("mac os 
x");
-    }
-
-    public static boolean isRenegotiationSupported(Tomcat tomcat) {
-        String protocol = tomcat.getConnector().getProtocolHandlerClassName();
-        if (protocol.contains("Apr")) {
-            // Disabled by default in 1.1.20 windows binary (2010-07-27)
-            return false;
-        }
-
-        return true;
-    }
-
     protected static boolean isClientRenegotiationSupported(Tomcat tomcat) {
         String protocol = tomcat.getConnector().getProtocolHandlerClassName();
         if (protocol.contains("Apr")) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to