/**
* {@inheritDoc}
*/
public void action( TgsReqContainer tgsReqContainer ) throws DecoderException
{
TLV tlv = tgsReqContainer.getCurrentTLV();
// The Length should not be null
if ( tlv.getLength() == 0 )
{
LOG.error( I18n.err( I18n.ERR_04066 ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
}
// Now, let's decode the KDC-REQ
Asn1Decoder kdcReqDecoder = new Asn1Decoder();
KdcReqContainer kdcReqContainer = new KdcReqContainer( tgsReqContainer.getStream() );
// Store the created TGS-REQ object into the KDC-REQ container
TgsReq tgsReq = new TgsReq();
kdcReqContainer.setKdcReq( tgsReq );
// Decode the KDC_REQ PDU
try
{
kdcReqDecoder.decode( tgsReqContainer.getStream(), kdcReqContainer );
}
catch ( DecoderException de )
{
throw de;
}
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
// Update the parent
tgsReqContainer.updateParent();
if ( tgsReq.getMessageType() != KerberosMessageType.TGS_REQ )