public class KrbError extends KerberosMessage
KRB-ERROR ::= [APPLICATION 30] SEQUENCE { pvno [0] INTEGER (5), msg-type [1] INTEGER (30), ctime [2] KerberosTime OPTIONAL, cusec [3] Microseconds OPTIONAL, stime [4] KerberosTime, susec [5] Microseconds, error-code [6] Int32, crealm [7] Realm OPTIONAL, cname [8] PrincipalName OPTIONAL, realm [9] Realm -- service realm --, sname [10] PrincipalName -- service name --, e-text [11] KerberosString OPTIONAL, e-data [12] OCTET STRING OPTIONAL }
Constructor and Description |
---|
KrbError()
Creates a new instance of KrbError.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the KRB-ERROR length
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the KRB-ERROR message to a PDU.
|
PrincipalName |
getCName() |
String |
getCRealm() |
KerberosTime |
getCTime() |
int |
getCusec() |
byte[] |
getEData() |
ErrorType |
getErrorCode() |
String |
getEText() |
String |
getRealm() |
PrincipalName |
getSName() |
KerberosTime |
getSTime() |
int |
getSusec() |
void |
setCName(PrincipalName cName) |
void |
setCRealm(String cRealm) |
void |
setCTime(KerberosTime cTime) |
void |
setCusec(int cusec) |
void |
setEData(byte[] eData) |
void |
setErrorCode(ErrorType errorCode) |
void |
setEText(String eText) |
void |
setRealm(String realm) |
void |
setSName(PrincipalName sName) |
void |
setSTime(KerberosTime sTime) |
void |
setSusec(int susec) |
String |
toString() |
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumber
public KrbError()
public KerberosTime getCTime()
public void setCTime(KerberosTime cTime)
cTime
- the cTime to setpublic int getCusec()
public void setCusec(int cusec)
cusec
- the cusec to setpublic KerberosTime getSTime()
public void setSTime(KerberosTime sTime)
sTime
- the sTime to setpublic int getSusec()
public void setSusec(int susec)
susec
- the susec to setpublic ErrorType getErrorCode()
public void setErrorCode(ErrorType errorCode)
errorCode
- the errorCode to setpublic PrincipalName getCName()
public void setCName(PrincipalName cName)
cName
- the cName to setpublic PrincipalName getSName()
public void setSName(PrincipalName sName)
sName
- the sName to setpublic byte[] getEData()
public void setEData(byte[] eData)
eData
- the eData to setpublic int computeLength()
KRB-ERROR : 0x7E L1 KRB-ERROR APPLICATION[30] | +--> 0x30 L2 KRB-ERROR sequence | +--> 0xA0 0x03 pvno tag | | | +--> 0x02 0x01 0x05 pvno (5) | +--> 0xA1 0x03 msg-type tag | | | +--> 0x02 0x01 0x1E msg-type (30) | +--> 0xA2 0x11 ctime tag | | | +--> 0x18 0x0F ttt ctime (KerberosTime) | +--> 0xA3 L3 cusec tag | | | +--> 0x02 L3-1 cusec | +--> 0xA4 0x11 stime tag | | | +--> 0x18 0x0F ttt stime (KerberosTime) | +--> 0xA5 L4 susec tag | | | +--> 0x02 L4-1 susec (KerberosTime) | +--> 0xA6 L5 error-code tag | | | +--> 0x02 L5-1 nnn error-code | +--> 0xA7 L6 crealm tag | | | +--> 0x1B L6-1 crealm (KerberosString) | +--> 0xA8 L7 cname tag | | | +--> 0x30 L7-1 cname (PrincipalName) | +--> 0xA9 L8 realm tag | | | +--> 0x1B L8-1 realm (KerberosString) | +--> 0xAA L9 sname tag | | | +--> 0x30 L9-1 sname (PrincipalName) | +--> 0xAB L10 e-text tag | | | +--> 0x1B L10-1 e-text (KerberosString) | +--> 0xAC L11 e-data | +--> 0x04 L11-1 e-data (Octet String)
public ByteBuffer encode(ByteBuffer buffer) throws org.apache.directory.api.asn1.EncoderException
KRB-ERROR : 0x7E LL 0x30 LL 0xA0 0x03 0x02 0x01 0x05 pvno 0xA1 0x03 0x02 0x01 0x1E msg-type [0xA2 0x11 0x18 0x0F ttt] ctime [0xA3 LL 0x02 LL nnn] cusec 0xA4 0x11 0x18 0x0F ttt stime 0xA5 LL 0x02 LL nnn susec 0xA6 LL 0x02 LL nnn error-code [0xA7 LL 0x1B LL abcd] crealm [0xA8 LL 0x30 LL abcd] cname 0xA9 LL 0x1B LL abcd realm 0xAA LL 0x30 LL abcd sname [0xAB LL 0x1B LL abcd] e-text [0xAC LL 0x04 LL abcd] e-data
org.apache.directory.api.asn1.EncoderException
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.