jdk/src/windows/classes/sun/security/krb5/internal/tools/Kinit.java
changeset 3949 00603a93b589
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
3948:736156ecc24c 3949:00603a93b589
     1 /*
     1 /*
     2  * Portions Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Portions Copyright 2000-2009 Sun Microsystems, Inc.  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.  Sun designates this
     7  * published by the Free Software Foundation.  Sun designates this
   250                 if (DEBUG) {
   250                 if (DEBUG) {
   251                     System.out.println("Kinit: PREAUTH FAILED/REQ, re-send AS-REQ");
   251                     System.out.println("Kinit: PREAUTH FAILED/REQ, re-send AS-REQ");
   252                 }
   252                 }
   253                 KRBError error = ke.getError();
   253                 KRBError error = ke.getError();
   254                 int etype = error.getEType();
   254                 int etype = error.getEType();
   255                 byte[] salt = error.getSalt();
   255                 String salt = error.getSalt();
   256                 byte[] s2kparams = error.getParams();
   256                 byte[] s2kparams = error.getParams();
   257                 if (useKeytab) {
   257                 if (useKeytab) {
   258                     as_req = new KrbAsReq(skeys, true, etype, salt, s2kparams,
   258                     as_req = new KrbAsReq(skeys, true, etype, salt,
   259                                         opt, principal, sname,
   259                                         s2kparams, opt, principal, sname,
   260                                         null, null, null, null, addresses, null);
   260                                         null, null, null, null, addresses, null);
   261                 } else {
   261                 } else {
   262                     as_req = new KrbAsReq(psswd, true, etype, salt, s2kparams,
   262                     as_req = new KrbAsReq(psswd, true, etype, salt,
   263                                         opt, principal, sname,
   263                                         s2kparams, opt, principal, sname,
   264                                         null, null, null, null, addresses, null);
   264                                         null, null, null, null, addresses, null);
   265                 }
   265                 }
   266                 as_rep = sendASRequest(as_req, useKeytab, realm, psswd, skeys);
   266                 as_rep = sendASRequest(as_req, useKeytab, realm, psswd, skeys);
   267             } else {
   267             } else {
   268                 throw ke;
   268                 throw ke;