jdk/test/sun/security/krb5/auto/DupEtypes.java
changeset 17443 0a7ace07ea11
parent 10432 ef33e56c55a9
child 23010 6dadb192ad81
equal deleted inserted replaced
17442:1444a769a68a 17443:0a7ace07ea11
    32  * @run main/othervm DupEtypes 4
    32  * @run main/othervm DupEtypes 4
    33  * @run main/othervm DupEtypes 5
    33  * @run main/othervm DupEtypes 5
    34  */
    34  */
    35 
    35 
    36 import sun.security.jgss.GSSUtil;
    36 import sun.security.jgss.GSSUtil;
       
    37 import sun.security.krb5.Config;
    37 
    38 
    38 public class DupEtypes {
    39 public class DupEtypes {
    39 
    40 
    40     public static void main(String[] args) throws Exception {
    41     public static void main(String[] args) throws Exception {
    41 
    42 
    42         OneKDC kdc = new OneKDC(null);
    43         OneKDC kdc = new OneKDC(null);
    43         kdc.writeJAASConf();
    44         kdc.writeJAASConf();
       
    45 
       
    46         KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
       
    47                 "default_keytab_name = " + OneKDC.KTAB,
       
    48                 "allow_weak_crypto = true");
       
    49         Config.refresh();
       
    50 
       
    51         // Rewrite to include DES keys
       
    52         kdc.writeKtab(OneKDC.KTAB);
    44 
    53 
    45         // Different test cases, read KDC.processAsReq for details
    54         // Different test cases, read KDC.processAsReq for details
    46         kdc.setOption(KDC.Option.DUP_ETYPE, Integer.parseInt(args[0]));
    55         kdc.setOption(KDC.Option.DUP_ETYPE, Integer.parseInt(args[0]));
    47 
    56 
    48         Context c, s;
    57         Context c, s;