< prev index next >

test/jdk/sun/security/ssl/ProtocolVersion/HttpsProtocols.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -21,11 +21,11 @@
  * questions.
  */
 
 /*
  * @test
- * @bug 4671289
+ * @bug 4671289 8190492
  * @summary passing https.protocols from command line doesn't work.
  * @run main/othervm -Dhttps.protocols=SSLv3 HttpsProtocols
  * @author Brad Wetmore
  */
 

@@ -86,10 +86,13 @@
         SSLServerSocketFactory sslssf =
             (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
         SSLServerSocket sslServerSocket =
             (SSLServerSocket) sslssf.createServerSocket(serverPort);
 
+        // Enable all supported protocols on server side to test SSLv3
+        sslServerSocket.setEnabledProtocols(sslServerSocket.getSupportedProtocols());
+
         serverPort = sslServerSocket.getLocalPort();
 
         /*
          * Signal Client, we're ready for his connect.
          */
< prev index next >