public abstract class KdcReq extends KerberosMessage
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> }
Constructor and Description |
---|
KdcReq(KerberosMessageType msgType)
Creates a new instance of KDC-REQ.
|
Modifier and Type | Method and Description |
---|---|
void |
addPaData(PaData paData) |
int |
computeLength()
Compute the KDC-REQ length
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the KDC-REQ component
|
KdcReqBody |
getKdcReqBody() |
List<PaData> |
getPaData() |
int |
getPvno() |
void |
setKdcReqBody(KdcReqBody kdcReqBody) |
void |
setPvno(int pvno) |
String |
toString() |
String |
toString(String tabs)
Pretty print the instance
|
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumber
public KdcReq(KerberosMessageType msgType)
public int getPvno()
public void setPvno(int pvno)
pvno
- the pvno to setpublic KdcReqBody getKdcReqBody()
public void setKdcReqBody(KdcReqBody kdcReqBody)
kdcReqBody
- the kdcReqBody to setpublic int computeLength()
KDC-REQ : 0x30 L1 KDC-REQ sequence | +--> 0xA1 0x03 pvno tag | | | +--> 0x02 0x01 0x05 pvno (5) | +--> 0xA2 0x03 msg-type tag | | | +--> 0x02 0x01 0x0A/0x0C msg-type : either AS-REQ (0x0A) or TGS-REQ (0x0C) | +--> 0xA3 L2 pa-data tag | | | +--> 0x30 L2-1 pa-data SEQ | | | +--> 0x30 L2-1-1 pa-data | | | +--> 0x30 L2-1-2 pa-data | : | +--> 0xA4 L3 req-body tag | | | +--> 0x30 L3-1 req-body (KDC-REQ-BODY)
public ByteBuffer encode(ByteBuffer buffer) throws org.apache.directory.api.asn1.EncoderException
buffer
- The buffer containing the encoded resultorg.apache.directory.api.asn1.EncoderException
- If the encoding failedpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.