Path: blob/master/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncASRepPart.java
41161 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324/*25*26* (C) Copyright IBM Corp. 1999 All Rights Reserved.27* Copyright 1997 The Open Group Research Institute. All rights reserved.28*/2930package sun.security.krb5.internal;3132import sun.security.krb5.*;33import sun.security.util.*;34import java.io.IOException;3536public class EncASRepPart extends EncKDCRepPart {3738public EncASRepPart(39EncryptionKey new_key,40LastReq new_lastReq,41int new_nonce,42KerberosTime new_keyExpiration,43TicketFlags new_flags,44KerberosTime new_authtime,45KerberosTime new_starttime,46KerberosTime new_endtime,47KerberosTime new_renewTill,48PrincipalName new_sname,49HostAddresses new_caddr,50PAData[] new_pAData) {51super(52new_key,53new_lastReq,54new_nonce,55new_keyExpiration,56new_flags,57new_authtime,58new_starttime,59new_endtime,60new_renewTill,61new_sname,62new_caddr,63new_pAData,64Krb5.KRB_ENC_AS_REP_PART65);66//may need to use Krb5.KRB_ENC_TGS_REP_PART to mimic67//behavior of other implementaions, instead of above68}6970public EncASRepPart(byte[] data) throws Asn1Exception,71IOException, KrbException {72init(new DerValue(data));73}7475public EncASRepPart(DerValue encoding) throws Asn1Exception,76IOException, KrbException {77init(encoding);78}7980private void init(DerValue encoding) throws Asn1Exception,81IOException, KrbException {82init(encoding, Krb5.KRB_ENC_AS_REP_PART);83}8485public byte[] asn1Encode() throws Asn1Exception,86IOException {87return asn1Encode(Krb5.KRB_ENC_AS_REP_PART);88}89}909192