equal
deleted
inserted
replaced
30 * @library /lib/testlibrary/ / |
30 * @library /lib/testlibrary/ / |
31 * @build jdk.testlibrary.SimpleSSLContext ProxyServer |
31 * @build jdk.testlibrary.SimpleSSLContext ProxyServer |
32 * @compile ../../../com/sun/net/httpserver/LogFilter.java |
32 * @compile ../../../com/sun/net/httpserver/LogFilter.java |
33 * @compile ../../../com/sun/net/httpserver/EchoHandler.java |
33 * @compile ../../../com/sun/net/httpserver/EchoHandler.java |
34 * @compile ../../../com/sun/net/httpserver/FileServerHandler.java |
34 * @compile ../../../com/sun/net/httpserver/FileServerHandler.java |
35 * @run main/othervm -Djdk.internal.httpclient.debug=true -Djdk.httpclient.HttpClient.log=errors,trace SmokeTest |
35 * @run main/othervm -Djdk.internal.httpclient.debugX=true -Djdk.httpclient.HttpClient.log=errors,ssl,trace SmokeTest |
36 */ |
36 */ |
37 |
37 |
38 import com.sun.net.httpserver.Headers; |
38 import com.sun.net.httpserver.Headers; |
39 import com.sun.net.httpserver.HttpContext; |
39 import com.sun.net.httpserver.HttpContext; |
40 import com.sun.net.httpserver.HttpExchange; |
40 import com.sun.net.httpserver.HttpExchange; |
751 |
751 |
752 executor = Executors.newCachedThreadPool(); |
752 executor = Executors.newCachedThreadPool(); |
753 s1.setExecutor(executor); |
753 s1.setExecutor(executor); |
754 s2.setExecutor(executor); |
754 s2.setExecutor(executor); |
755 ctx = new SimpleSSLContext().get(); |
755 ctx = new SimpleSSLContext().get(); |
756 sslparams = ctx.getSupportedSSLParameters(); |
756 sslparams = ctx.getDefaultSSLParameters(); |
|
757 //sslparams.setProtocols(new String[]{"TLSv1.2"}); |
757 s2.setHttpsConfigurator(new Configurator(ctx)); |
758 s2.setHttpsConfigurator(new Configurator(ctx)); |
758 s1.start(); |
759 s1.start(); |
759 s2.start(); |
760 s2.start(); |
760 |
761 |
761 port = s1.getAddress().getPort(); |
762 port = s1.getAddress().getPort(); |
872 public Configurator(SSLContext ctx) { |
873 public Configurator(SSLContext ctx) { |
873 super(ctx); |
874 super(ctx); |
874 } |
875 } |
875 |
876 |
876 public void configure (HttpsParameters params) { |
877 public void configure (HttpsParameters params) { |
877 params.setSSLParameters (getSSLContext().getSupportedSSLParameters()); |
878 SSLParameters p = getSSLContext().getDefaultSSLParameters(); |
|
879 //p.setProtocols(new String[]{"TLSv1.2"}); |
|
880 params.setSSLParameters (p); |
878 } |
881 } |
879 } |
882 } |
880 |
883 |
881 static Path getTempFile(int size) throws IOException { |
884 static Path getTempFile(int size) throws IOException { |
882 File f = File.createTempFile("test", "txt"); |
885 File f = File.createTempFile("test", "txt"); |