Author: markt
Date: Fri Feb  1 20:40:46 2019
New Revision: 1852772

URL: http://svn.apache.org/viewvc?rev=1852772&view=rev
Log:
Fix failing TLS 1.3 test with Java 11

Modified:
    
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TestClientCertTls13.java
    tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TestClientCertTls13.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TestClientCertTls13.java?rev=1852772&r1=1852771&r2=1852772&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TestClientCertTls13.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TestClientCertTls13.java 
Fri Feb  1 20:40:46 2019
@@ -75,8 +75,8 @@ public class TestClientCertTls13 extends
         // Need to override some of the previous settings
         tomcat.getConnector().setProperty("sslEnabledProtocols", 
Constants.SSL_PROTO_TLSv1_3);
         // And add force authentication to occur on the initial handshake
-        tomcat.getConnector().setProperty("clientAuth", "required");
-
-        TesterSupport.configureClientSsl();
+        tomcat.getConnector().setProperty("clientAuth", "true");
+        // Force client to use TLS 1.3
+        TesterSupport.configureClientSsl("TLSv1.3");
     }
 }

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1852772&r1=1852771&r2=1852772&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Fri 
Feb  1 20:40:46 2019
@@ -176,8 +176,13 @@ public final class TesterSupport {
 
 
     protected static void configureClientSsl() {
+        configureClientSsl("TLSv1");
+    }
+
+
+    protected static void configureClientSsl(String protocol) {
         try {
-            System.setProperty("https.protocols", "TLSv1");
+            System.setProperty("https.protocols", protocol);
             SSLContext sc = SSLContext.getInstance(Constants.SSL_PROTO_TLS);
             sc.init(TesterSupport.getUser1KeyManagers(),
                     TesterSupport.getTrustManagers(),



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

Reply via email to