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
}
| Modifier and Type | Field and Description |
|---|---|
private PrincipalName |
cName
the client's principal
|
private int |
cNameLength |
private java.lang.String |
cRealm
the name of the realm to which the requesting client belongs
|
private byte[] |
crealmBytes |
private int |
cRealmLength |
private KerberosTime |
cTime
the current time of client
|
private int |
cTimeLength |
private java.lang.Integer |
cusec
microseconds of the client's current time
|
private int |
cusecLength |
private byte[] |
eData
the error data
|
private int |
eDataLength |
private ErrorType |
errorCode
the error code
|
private int |
errorCodeLength |
private java.lang.String |
eText
the error text
|
private byte[] |
eTextBytes |
private int |
eTextLength |
private static boolean |
IS_DEBUG
Speedup for logs
|
private int |
krbErrorLength |
private int |
krbErrorSeqLength |
private static org.slf4j.Logger |
log
The logger
|
private int |
msgTypeLength |
private int |
pvnoLength |
private java.lang.String |
realm
the realm that issued the ticket
|
private byte[] |
realmBytes |
private int |
realmLength |
private PrincipalName |
sName
the server's principal
|
private int |
sNameLength |
private KerberosTime |
sTime
current time on the server
|
private int |
sTimeLength |
private int |
susec
microseconds of the server's time
|
private int |
susecLength |
| Constructor and Description |
|---|
KrbError()
Creates a new instance of KrbError.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the KRB-ERROR length
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the KRB-ERROR message to a PDU.
|
PrincipalName |
getCName() |
java.lang.String |
getCRealm() |
KerberosTime |
getCTime() |
int |
getCusec() |
byte[] |
getEData() |
ErrorType |
getErrorCode() |
java.lang.String |
getEText() |
java.lang.String |
getRealm() |
PrincipalName |
getSName() |
KerberosTime |
getSTime() |
int |
getSusec() |
void |
setCName(PrincipalName cName) |
void |
setCRealm(java.lang.String cRealm) |
void |
setCTime(KerberosTime cTime) |
void |
setCusec(int cusec) |
void |
setEData(byte[] eData) |
void |
setErrorCode(ErrorType errorCode) |
void |
setEText(java.lang.String eText) |
void |
setRealm(java.lang.String realm) |
void |
setSName(PrincipalName sName) |
void |
setSTime(KerberosTime sTime) |
void |
setSusec(int susec) |
java.lang.String |
toString() |
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumberprivate static final org.slf4j.Logger log
private static final boolean IS_DEBUG
private KerberosTime cTime
private java.lang.Integer cusec
private KerberosTime sTime
private int susec
private ErrorType errorCode
private java.lang.String cRealm
private PrincipalName cName
private java.lang.String realm
private PrincipalName sName
private java.lang.String eText
private byte[] eData
private int pvnoLength
private int msgTypeLength
private int cTimeLength
private int cusecLength
private int sTimeLength
private int susecLength
private int errorCodeLength
private int cRealmLength
private byte[] crealmBytes
private int cNameLength
private int realmLength
private byte[] realmBytes
private int sNameLength
private int eTextLength
private byte[] eTextBytes
private int eDataLength
private int krbErrorSeqLength
private int krbErrorLength
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 java.lang.String getCRealm()
public void setCRealm(java.lang.String cRealm)
cRealm - the cRealm to setpublic PrincipalName getCName()
public void setCName(PrincipalName cName)
cName - the cName to setpublic java.lang.String getRealm()
public void setRealm(java.lang.String realm)
realm - the realm to setpublic PrincipalName getSName()
public void setSName(PrincipalName sName)
sName - the sName to setpublic java.lang.String getEText()
public void setEText(java.lang.String eText)
eText - the eText 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 java.nio.ByteBuffer encode(java.nio.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.EncoderExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()