test/jdk/sun/security/krb5/auto/BasicKrb5Test.java
changeset 48651 67abfee27e69
parent 47216 71c04702a3d5
child 48668 2da4a52715d8
equal deleted inserted replaced
48650:e7164f73c4d3 48651:67abfee27e69
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 6706974
    26  * @bug 6706974 8014628
    27  * @summary Add krb5 test infrastructure
    27  * @summary Add krb5 test infrastructure
    28  * @compile -XDignore.symbol.file BasicKrb5Test.java
    28  * @compile -XDignore.symbol.file BasicKrb5Test.java
    29  * @run main/othervm BasicKrb5Test
    29  * @run main/othervm BasicKrb5Test
    30  * @run main/othervm BasicKrb5Test des-cbc-crc
    30  * @run main/othervm BasicKrb5Test des-cbc-crc
    31  * @run main/othervm BasicKrb5Test des-cbc-md5
    31  * @run main/othervm BasicKrb5Test des-cbc-md5
    32  * @run main/othervm BasicKrb5Test des3-cbc-sha1
    32  * @run main/othervm BasicKrb5Test des3-cbc-sha1
    33  * @run main/othervm BasicKrb5Test aes128-cts
    33  * @run main/othervm BasicKrb5Test aes128-sha1
    34  * @run main/othervm BasicKrb5Test aes256-cts
    34  * @run main/othervm BasicKrb5Test aes256-sha1
       
    35  * @run main/othervm BasicKrb5Test aes128-sha2
       
    36  * @run main/othervm BasicKrb5Test aes256-sha2
    35  * @run main/othervm BasicKrb5Test rc4-hmac
    37  * @run main/othervm BasicKrb5Test rc4-hmac
    36  * @run main/othervm BasicKrb5Test -s
    38  * @run main/othervm BasicKrb5Test -s
    37  * @run main/othervm BasicKrb5Test des-cbc-crc -s
    39  * @run main/othervm BasicKrb5Test des-cbc-crc -s
    38  * @run main/othervm BasicKrb5Test des-cbc-md5 -s
    40  * @run main/othervm BasicKrb5Test des-cbc-md5 -s
    39  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s
    41  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s
    40  * @run main/othervm BasicKrb5Test aes128-cts -s
    42  * @run main/othervm BasicKrb5Test aes128-sha1 -s
    41  * @run main/othervm BasicKrb5Test aes256-cts -s
    43  * @run main/othervm BasicKrb5Test aes256-sha1 -s
       
    44  * @run main/othervm BasicKrb5Test aes128-sha2 -s
       
    45  * @run main/othervm BasicKrb5Test aes256-sha2 -s
    42  * @run main/othervm BasicKrb5Test rc4-hmac -s
    46  * @run main/othervm BasicKrb5Test rc4-hmac -s
    43  * @run main/othervm BasicKrb5Test -C
    47  * @run main/othervm BasicKrb5Test -C
    44  * @run main/othervm BasicKrb5Test des-cbc-crc -C
    48  * @run main/othervm BasicKrb5Test des-cbc-crc -C
    45  * @run main/othervm BasicKrb5Test des-cbc-md5 -C
    49  * @run main/othervm BasicKrb5Test des-cbc-md5 -C
    46  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -C
    50  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -C
    47  * @run main/othervm BasicKrb5Test aes128-cts -C
    51  * @run main/othervm BasicKrb5Test aes128-sha1 -C
    48  * @run main/othervm BasicKrb5Test aes256-cts -C
    52  * @run main/othervm BasicKrb5Test aes256-sha1 -C
       
    53  * @run main/othervm BasicKrb5Test aes128-sha2 -C
       
    54  * @run main/othervm BasicKrb5Test aes256-sha2 -C
    49  * @run main/othervm BasicKrb5Test rc4-hmac -C
    55  * @run main/othervm BasicKrb5Test rc4-hmac -C
    50  * @run main/othervm BasicKrb5Test -s -C
    56  * @run main/othervm BasicKrb5Test -s -C
    51  * @run main/othervm BasicKrb5Test des-cbc-crc -s -C
    57  * @run main/othervm BasicKrb5Test des-cbc-crc -s -C
    52  * @run main/othervm BasicKrb5Test des-cbc-md5 -s -C
    58  * @run main/othervm BasicKrb5Test des-cbc-md5 -s -C
    53  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s -C
    59  * @run main/othervm BasicKrb5Test des3-cbc-sha1 -s -C
    54  * @run main/othervm BasicKrb5Test aes128-cts -s -C
    60  * @run main/othervm BasicKrb5Test aes128-sha1 -s -C
    55  * @run main/othervm BasicKrb5Test aes256-cts -s -C
    61  * @run main/othervm BasicKrb5Test aes256-sha1 -s -C
       
    62  * @run main/othervm BasicKrb5Test aes128-sha2 -s -C
       
    63  * @run main/othervm BasicKrb5Test aes256-sha2 -s -C
    56  * @run main/othervm BasicKrb5Test rc4-hmac -s -C
    64  * @run main/othervm BasicKrb5Test rc4-hmac -s -C
    57  */
    65  */
    58 
    66 
    59 import org.ietf.jgss.GSSName;
    67 import org.ietf.jgss.GSSName;
    60 import sun.security.jgss.GSSUtil;
    68 import sun.security.jgss.GSSUtil;
    61 import sun.security.krb5.Config;
       
    62 import sun.security.krb5.KrbException;
    69 import sun.security.krb5.KrbException;
    63 import sun.security.krb5.internal.crypto.EType;
       
    64 
    70 
    65 /**
    71 /**
    66  * Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each
    72  * Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each
    67  * party uses JAAS login to get subjects and executes JGSS calls using
    73  * party uses JAAS login to get subjects and executes JGSS calls using
    68  * Subject.doAs.
    74  * Subject.doAs.