APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.krb5.internal

public Class KDCReq

extends Object
Class Inheritance
Known Direct Subclasses
sun.security.krb5.internal.TGSReq, sun.security.krb5.internal.ASReq
Imports
sun.security.krb5.*, sun.security.util.*, java.io.IOException, java.math.BigInteger

Implements the ASN.1 KRB_KDC_REQ type.
KDC-REQ              ::= SEQUENCE {
     -- NOTE: first tag is [1], not [0]
     pvno            [1] INTEGER (5) ,
     msg-type        [2] INTEGER (10 -- AS -- | 12 -- TGS --),
     padata          [3] SEQUENCE OF PA-DATA OPTIONAL
                           -- NOTE: not empty --,
     req-body        [4] KDC-REQ-BODY
}

This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.

Field Summary

Modifier and TypeField and Description
private int
public PAData[]
private int
public KDCReqBody

Constructor Summary

AccessConstructor and Description
public
KDCReq(PAData[] new_pAData, KDCReqBody new_reqBody, int req_type)

public
public
KDCReq(byte[] data, int req_type)

public
KDCReq(DerValue
a DER value of an KDCReq object.
der
,
int
a encoded asn1 type value.
req_type
)

Creates an KDCReq object from a DerValue object and asn1 type.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

an byte array of encoded data.
asn1Encode
()

Encodes this object to a byte array.

protected void
init(DerValue
a DER-encoded KDCReq object.
encoding
,
int
an int indicating whether it's KRB_AS_REQ or KRB_TGS_REQ type
req_type
)

Initializes a KDCReq object from a DerValue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

msgTypeback to summary
private int msgType
pADataback to summary
public PAData[] pAData
pvnoback to summary
private int pvno
reqBodyback to summary
public KDCReqBody reqBody

Constructor Detail

KDCReqback to summary
public KDCReq(PAData[] new_pAData, KDCReqBody new_reqBody, int req_type) throws IOException
KDCReqback to summary
public KDCReq()
KDCReqback to summary
public KDCReq(byte[] data, int req_type) throws Asn1Exception, IOException, KrbException
KDCReqback to summary
public KDCReq(DerValue der, int req_type) throws Asn1Exception, IOException, KrbException

Creates an KDCReq object from a DerValue object and asn1 type.

Parameters
der:DerValue

a DER value of an KDCReq object.

req_type:int

a encoded asn1 type value.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.

Method Detail

asn1Encodeback to summary
public byte[] asn1Encode() throws Asn1Exception, IOException

Encodes this object to a byte array.

Returns:byte[]

an byte array of encoded data.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.
initback to summary
protected void init(DerValue encoding, int req_type) throws Asn1Exception, IOException, KrbException

Initializes a KDCReq object from a DerValue. The DER encoding must be in the format specified by the KRB_KDC_REQ ASN.1 notation.

Parameters
encoding:DerValue

a DER-encoded KDCReq object.

req_type:int

an int indicating whether it's KRB_AS_REQ or KRB_TGS_REQ type

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.
KrbException:
if an error occurs while constructing a Realm object, or a Krb object from DER-encoded data.