You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2015/12/10 18:40:02 UTC

svn commit: r1719122 - in /tomcat/trunk/test/org/apache/tomcat/util/net: TestSsl.java TesterSupport.java

Author: remm
Date: Thu Dec 10 17:40:02 2015
New Revision: 1719122

URL: http://svn.apache.org/viewvc?rev=1719122&view=rev
Log:
- Unless I misunderstood something, there's only one SSL test that is really extremely nasty since it attempts a client initiated renegotiation (hehe) in the middle of sending data.
- With my fixes things appear to be "ok" with NIO now (JSSE and OpenSSL), so let's see what the CI runs say about it.

Modified:
    tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
    tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1719122&r1=1719121&r2=1719122&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Thu Dec 10 17:40:02 2015
@@ -95,7 +95,7 @@ public class TestSsl extends TomcatBaseT
         Tomcat tomcat = getTomcatInstance();
 
         Assume.assumeTrue("SSL renegotiation has to be supported for this test",
-                TesterSupport.isRenegotiationSupported(getTomcatInstance()));
+                TesterSupport.isClientRenegotiationSupported(getTomcatInstance()));
 
         Context root = tomcat.addContext("", TEMP_DIR);
         Wrapper w =

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1719122&r1=1719121&r2=1719122&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Thu Dec 10 17:40:02 2015
@@ -144,10 +144,25 @@ public final class TesterSupport {
             // 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")) {
+            // Disabled by default in 1.1.20 windows binary (2010-07-27)
+            return false;
+        }
         if (protocol.contains("NioProtocol") || (protocol.contains("Nio2Protocol") && isMacOs())) {
             // Doesn't work on all platforms - see BZ 56448.
             return false;
         }
+        String sslImplementation = System.getProperty("tomcat.test.sslImplementation");
+        if (sslImplementation != null && !"${test.sslImplementation}".equals(sslImplementation)) {
+            // Assume custom SSL is not supporting this
+            return false;
+        }
 
         return true;
     }



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