01: /*
02: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
03: *
04: * This code is free software; you can redistribute it and/or modify it
05: * under the terms of the GNU General Public License version 2 only, as
06: * published by the Free Software Foundation. Sun designates this
07: * particular file as subject to the "Classpath" exception as provided
08: * by Sun in the LICENSE file that accompanied this code.
09: *
10: * This code is distributed in the hope that it will be useful, but WITHOUT
11: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * version 2 for more details (a copy is included in the LICENSE file that
14: * accompanied this code).
15: *
16: * You should have received a copy of the GNU General Public License version
17: * 2 along with this work; if not, write to the Free Software Foundation,
18: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21: * CA 95054 USA or visit www.sun.com if you need additional information or
22: * have any questions.
23: */
24:
25: /*
26: * (C) Copyright IBM Corp. 1999 All Rights Reserved.
27: * Copyright 1997 The Open Group Research Institute. All rights reserved.
28: */
29:
30: package sun.security.krb5.internal;
31:
32: import sun.security.krb5.*;
33: import sun.security.util.*;
34: import java.io.IOException;
35:
36: public class EncTGSRepPart extends EncKDCRepPart {
37:
38: public EncTGSRepPart(EncryptionKey new_key, LastReq new_lastReq,
39: int new_nonce, KerberosTime new_keyExpiration,
40: TicketFlags new_flags, KerberosTime new_authtime,
41: KerberosTime new_starttime, KerberosTime new_endtime,
42: KerberosTime new_renewTill, Realm new_srealm,
43: PrincipalName new_sname, HostAddresses new_caddr) {
44: super (new_key, new_lastReq, new_nonce, new_keyExpiration,
45: new_flags, new_authtime, new_starttime, new_endtime,
46: new_renewTill, new_srealm, new_sname, new_caddr,
47: Krb5.KRB_ENC_TGS_REP_PART);
48: }
49:
50: public EncTGSRepPart(byte[] data) throws Asn1Exception,
51: IOException, KrbException {
52: init(new DerValue(data));
53: }
54:
55: public EncTGSRepPart(DerValue encoding) throws Asn1Exception,
56: IOException, KrbException {
57: init(encoding);
58: }
59:
60: private void init(DerValue encoding) throws Asn1Exception,
61: IOException, KrbException {
62: init(encoding, Krb5.KRB_ENC_TGS_REP_PART);
63: }
64:
65: public byte[] asn1Encode() throws Asn1Exception, IOException {
66: return asn1Encode(Krb5.KRB_ENC_TGS_REP_PART);
67: }
68:
69: }
|