jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java
author kshefov
Fri, 05 Jun 2015 12:22:36 +0300
changeset 31057 babdeee3c007
child 40949 be7a612613ae
permissions -rw-r--r--
8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS) Reviewed-by: xuelei, asmotrak, rhalade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31057
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     1
/*
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     4
 *
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     8
 *
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    13
 * accompanied this code).
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    14
 *
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    18
 *
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    21
 * questions.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    22
 */
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    23
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    24
/*
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    25
 * @test
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    26
 * @bug 8043758
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    27
 * @summary Testing DTLS buffer overflow and underflow status when dealing with
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    28
 *          application data.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    29
 * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    30
 * @run main/othervm -Dtest.security.protocol=DTLSv1.0
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    31
 *      -Dtest.mode=norm DTLSv10BufferOverflowUnderflowTest
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    32
 * @run main/othervm -Dtest.security.protocol=DTLSv1.0
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    33
 *      -Dtest.mode=norm_sni DTLSv10BufferOverflowUnderflowTest
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    34
 * @run main/othervm -Dtest.security.protocol=DTLSv1.0
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    35
 *      -Dtest.mode=krb DTLSv10BufferOverflowUnderflowTest
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    36
 */
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    37
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    38
/**
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    39
 * Testing DTLS incorrect app data packages unwrapping.
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    40
 */
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    41
public class DTLSv10BufferOverflowUnderflowTest {
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    42
    public static void main(String[] args) {
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    43
        BufferOverflowUnderflowTest.main(args);
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    44
    }
babdeee3c007 8072515: Test Task: Develop new tests for JEP 219: Datagram Transport Layer Security (DTLS)
kshefov
parents:
diff changeset
    45
}