Skip to content

Commit ecfe0d7

Browse files
committed
Make the test more obvious
1 parent 1c975c8 commit ecfe0d7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/org/apache/tomcat/util/net/TestSSLHostConfigProtocol.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ public void testTlsVersionMismatchServerTls13ClientTls12() throws Exception {
113113
Tomcat tomcat = getTomcatInstance();
114114
tomcat.start();
115115

116-
TesterSupport.configureClientSsl(true);
116+
SSLContext sc = SSLContext.getInstance(Constants.SSL_PROTO_TLSv1_2);
117+
sc.init(null, new TrustManager[] { new TesterSupport.TrustAllCerts() }, null);
118+
TesterSupport.ClientSSLSocketFactory clientSSLSocketFactory = new TesterSupport.ClientSSLSocketFactory(sc.getSocketFactory());
119+
clientSSLSocketFactory.setProtocols(new String[] { Constants.SSL_PROTO_TLSv1_2 });
120+
HttpsURLConnection.setDefaultSSLSocketFactory(clientSSLSocketFactory);
117121

118122
getUrl("https://localhost:" + getPort() + "/");
119123
}

0 commit comments

Comments
 (0)