/**
* {@inheritDoc}
*/
public void action( KrbCredContainer krbCredContainer ) throws DecoderException
{
TLV tlv = krbCredContainer.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 ) );
}
// decoder for Ticket
Asn1Decoder decoder = new Asn1Decoder();
// Ticket container
TicketContainer ticketContainer = new TicketContainer( krbCredContainer.getStream() );
krbCredContainer.rewind();
try
{
// decode Ticket
decoder.decode( krbCredContainer.getStream(), ticketContainer );
}
catch ( DecoderException e )
{
throw e;
}
Ticket ticket = ticketContainer.getTicket();
// add Ticket to the list of tickets
krbCredContainer.getKrbCred().addTicket( ticket );
// Update the expected length for the current TLV
tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
// Update the parent
krbCredContainer.updateParent();
if ( IS_DEBUG )