< prev index next >

test/jdk/javax/net/ssl/ServerName/SSLSocketExplorer.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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.

@@ -26,11 +26,11 @@
 // system properties in samevm/agentvm mode.
 //
 
 /**
  * @test
- * @bug 7068321
+ * @bug 7068321 8190492
  * @summary Support TLS Server Name Indication (SNI) Extension in JSSE Server
  * @library ../templates
  * @build SSLCapabilities SSLExplorer
  * @run main/othervm SSLSocketExplorer SSLv2Hello,SSLv3
  * @run main/othervm SSLSocketExplorer SSLv3

@@ -146,10 +146,13 @@
             (SSLSocketFactory) SSLSocketFactory.getDefault();
         ByteArrayInputStream bais =
             new ByteArrayInputStream(buffer, 0, position);
         SSLSocket sslSocket = (SSLSocket)sslsf.createSocket(socket, bais, true);
 
+        // Enable all supported protocols on server side to test SSLv3
+        sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
+
         InputStream sslIS = sslSocket.getInputStream();
         OutputStream sslOS = sslSocket.getOutputStream();
 
         sslIS.read();
         sslOS.write(85);
< prev index next >