J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 3 | * |
| 4 | * This code is free software; you can redistribute it and/or modify it |
| 5 | * under the terms of the GNU General Public License version 2 only, as |
| 6 | * published by the Free Software Foundation. Sun designates this |
| 7 | * particular file as subject to the "Classpath" exception as provided |
| 8 | * by Sun in the LICENSE file that accompanied this code. |
| 9 | * |
| 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( |
| 39 | EncryptionKey new_key, |
| 40 | LastReq new_lastReq, |
| 41 | int new_nonce, |
| 42 | KerberosTime new_keyExpiration, |
| 43 | TicketFlags new_flags, |
| 44 | KerberosTime new_authtime, |
| 45 | KerberosTime new_starttime, |
| 46 | KerberosTime new_endtime, |
| 47 | KerberosTime new_renewTill, |
| 48 | Realm new_srealm, |
| 49 | PrincipalName new_sname, |
| 50 | HostAddresses new_caddr |
| 51 | ) { |
| 52 | super( |
| 53 | new_key, |
| 54 | new_lastReq, |
| 55 | new_nonce, |
| 56 | new_keyExpiration, |
| 57 | new_flags, |
| 58 | new_authtime, |
| 59 | new_starttime, |
| 60 | new_endtime, |
| 61 | new_renewTill, |
| 62 | new_srealm, |
| 63 | new_sname, |
| 64 | new_caddr, |
| 65 | Krb5.KRB_ENC_TGS_REP_PART |
| 66 | ); |
| 67 | } |
| 68 | |
| 69 | public EncTGSRepPart(byte[] data) throws Asn1Exception, |
| 70 | IOException, KrbException { |
| 71 | init(new DerValue(data)); |
| 72 | } |
| 73 | |
| 74 | public EncTGSRepPart(DerValue encoding) throws Asn1Exception, |
| 75 | IOException, KrbException { |
| 76 | init(encoding); |
| 77 | } |
| 78 | |
| 79 | private void init(DerValue encoding) throws Asn1Exception, |
| 80 | IOException, KrbException { |
| 81 | init(encoding, Krb5.KRB_ENC_TGS_REP_PART); |
| 82 | } |
| 83 | |
| 84 | public byte[] asn1Encode() throws Asn1Exception, |
| 85 | IOException { |
| 86 | return asn1Encode(Krb5.KRB_ENC_TGS_REP_PART); |
| 87 | } |
| 88 | |
| 89 | } |