jdk/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java
author xuelei
Fri, 06 Jan 2017 01:09:03 +0000
changeset 43008 c6c74a38f1ad
parent 39140 86f21a96d0ab
child 45028 b0ea3c0bfb81
permissions -rw-r--r--
8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException Reviewed-by: wetmore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39140
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     1
/*
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     4
 *
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it under
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     6
 * the terms of the GNU General Public License version 2 only, as published by
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     7
 * the Free Software Foundation.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     8
 *
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT ANY
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    10
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    11
 * A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    12
 * details (a copy is included in the LICENSE file that accompanied this code).
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    13
 *
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version 2
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    15
 * along with this work; if not, write to the Free Software Foundation, Inc., 51
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    16
 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    17
 *
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    19
 * visit www.oracle.com if you need additional information or have any
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    20
 * questions.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    21
 */
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    22
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    23
/*
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    24
 * @test
43008
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    25
 * @bug 8049429 8172273
39140
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    26
 * @modules java.management
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    27
 *          jdk.crypto.ec/sun.security.ec
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    28
 * @summary Test that all cipher suites work in all versions and all client
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    29
 *          authentication types. The way this is setup the server is stateless
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    30
 *          and all checking is done on the client side.
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    31
 * @compile CipherTestUtils.java JSSEClient.java JSSEServer.java
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    32
 * @run main/othervm
43008
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    33
 *              -DSERVER_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    34
 *              -DCLIENT_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    35
 *              -DCIPHER=SSL_RSA_WITH_RC4_128_MD5
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    36
 *          TestJSSE
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    37
 * @run main/othervm
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    38
 *              -DSERVER_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    39
 *              -DCLIENT_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    40
 *              -DCIPHER=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    41
 *          TestJSSE
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    42
 * @run main/othervm
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    43
 *              -DSERVER_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    44
 *              -DCLIENT_PROTOCOL=SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    45
 *              -DCIPHER=TLS_DHE_RSA_WITH_AES_128_CBC_SHA
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    46
 *          TestJSSE
c6c74a38f1ad 8172273: SSLEngine.unwrap fails with ArrayIndexOutOfBoundsException
xuelei
parents: 39140
diff changeset
    47
 * @run main/othervm
39140
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    48
 *              -DSERVER_PROTOCOL=SSLv3
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    49
 *              -DCLIENT_PROTOCOL=SSLv3
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    50
 *              -DCIPHER=SSL_RSA_WITH_RC4_128_MD5
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    51
 *          TestJSSE
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    52
 * @run main/othervm
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    53
 *              -DSERVER_PROTOCOL=SSLv3,TLSv1
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    54
 *              -DCLIENT_PROTOCOL=TLSv1
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    55
 *              -DCIPHER=SSL_RSA_WITH_RC4_128_MD5
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    56
 *          TestJSSE
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    57
 * @run main/othervm
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    58
 *              -DSERVER_PROTOCOL=SSLv3,TLSv1,TLSv1.1
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    59
 *              -DCLIENT_PROTOCOL=TLSv1.1
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    60
 *              -DCIPHER=SSL_RSA_WITH_RC4_128_MD5
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    61
 *          TestJSSE
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    62
 * @run main/othervm
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    63
 *              -DSERVER_PROTOCOL=SSLv3,TLSv1,TLSv1.1,TLSv1.2
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    64
 *              -DCLIENT_PROTOCOL=TLSv1.2
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    65
 *              -DCIPHER=SSL_RSA_WITH_RC4_128_MD5
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    66
 *          TestJSSE
86f21a96d0ab 8152745: javax/net/ssl/TLS/TestJSSE.java fails intermittently: Unsupported or unrecognized SSL message
asmotrak
parents:
diff changeset
    67
 */