< prev index next >

test/jdk/javax/net/ssl/SSLEngine/IllegalHandshakeMessage.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 //
  25 // This test case relies on updated static security property, no way to re-use
  26 // security property in samevm/agentvm mode.
  27 //
  28 
  29 /*
  30  * @test
  31  * @bug 8180643
  32  * @summary Illegal handshake message
  33  *
  34  * @run main/othervm IllegalHandshakeMessage
  35  */
  36 
  37 import javax.net.ssl.*;
  38 import javax.net.ssl.SSLEngineResult.*;
  39 import java.io.*;
  40 import java.security.*;
  41 import java.nio.*;
  42 
  43 public class IllegalHandshakeMessage {
  44 
  45     public static void main(String args[]) throws Exception {
  46         SSLContext context = SSLContext.getDefault();
  47 
  48         SSLEngine cliEngine = context.createSSLEngine();
  49         cliEngine.setUseClientMode(true);
  50         SSLEngine srvEngine = context.createSSLEngine();
  51         srvEngine.setUseClientMode(false);
  52 
  53         SSLSession session = cliEngine.getSession();




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 //
  25 // This test case relies on updated static security property, no way to re-use
  26 // security property in samevm/agentvm mode.
  27 //
  28 
  29 /*
  30  * @test
  31  * @bug 8180643
  32  * @summary Illegal handshake message
  33  * @ignore the dependent implementation details are changed
  34  * @run main/othervm IllegalHandshakeMessage
  35  */
  36 
  37 import javax.net.ssl.*;
  38 import javax.net.ssl.SSLEngineResult.*;
  39 import java.io.*;
  40 import java.security.*;
  41 import java.nio.*;
  42 
  43 public class IllegalHandshakeMessage {
  44 
  45     public static void main(String args[]) throws Exception {
  46         SSLContext context = SSLContext.getDefault();
  47 
  48         SSLEngine cliEngine = context.createSSLEngine();
  49         cliEngine.setUseClientMode(true);
  50         SSLEngine srvEngine = context.createSSLEngine();
  51         srvEngine.setUseClientMode(false);
  52 
  53         SSLSession session = cliEngine.getSession();


< prev index next >