48 * cname [4] PrincipalName,
49 * ticket [5] Ticket,
50 * enc-part [6] EncryptedData
51 * -- EncASRepPart or EncTGSRepPart,
52 * -- as appropriate
53 * }
54 * }</pre>
55 *
56 * <p>
57 * This definition reflects the Network Working Group RFC 4120
58 * specification available at
59 * <a href="http://www.ietf.org/rfc/rfc4120.txt">
60 * http://www.ietf.org/rfc/rfc4120.txt</a>.
61 */
62 public class KDCRep {
63
64 public PrincipalName cname;
65 public Ticket ticket;
66 public EncryptedData encPart;
67 public EncKDCRepPart encKDCRepPart; //not part of ASN.1 encoding
68 private int pvno;
69 private int msgType;
70 public PAData[] pAData = null; //optional
71 private boolean DEBUG = Krb5.DEBUG;
72
73 public KDCRep(
74 PAData[] new_pAData,
75 PrincipalName new_cname,
76 Ticket new_ticket,
77 EncryptedData new_encPart,
78 int req_type) throws IOException {
79 pvno = Krb5.PVNO;
80 msgType = req_type;
81 if (new_pAData != null) {
82 pAData = new PAData[new_pAData.length];
83 for (int i = 0; i < new_pAData.length; i++) {
84 if (new_pAData[i] == null) {
85 throw new IOException("Cannot create a KDCRep");
86 } else {
87 pAData[i] = (PAData) new_pAData[i].clone();
88 }
89 }
|
48 * cname [4] PrincipalName,
49 * ticket [5] Ticket,
50 * enc-part [6] EncryptedData
51 * -- EncASRepPart or EncTGSRepPart,
52 * -- as appropriate
53 * }
54 * }</pre>
55 *
56 * <p>
57 * This definition reflects the Network Working Group RFC 4120
58 * specification available at
59 * <a href="http://www.ietf.org/rfc/rfc4120.txt">
60 * http://www.ietf.org/rfc/rfc4120.txt</a>.
61 */
62 public class KDCRep {
63
64 public PrincipalName cname;
65 public Ticket ticket;
66 public EncryptedData encPart;
67 public EncKDCRepPart encKDCRepPart; //not part of ASN.1 encoding
68 public int msgType;
69 private int pvno;
70 public PAData[] pAData = null; //optional
71 private boolean DEBUG = Krb5.DEBUG;
72
73 public KDCRep(
74 PAData[] new_pAData,
75 PrincipalName new_cname,
76 Ticket new_ticket,
77 EncryptedData new_encPart,
78 int req_type) throws IOException {
79 pvno = Krb5.PVNO;
80 msgType = req_type;
81 if (new_pAData != null) {
82 pAData = new PAData[new_pAData.length];
83 for (int i = 0; i < new_pAData.length; i++) {
84 if (new_pAData[i] == null) {
85 throw new IOException("Cannot create a KDCRep");
86 } else {
87 pAData[i] = (PAData) new_pAData[i].clone();
88 }
89 }
|