authenticator[4] EncryptedData
}
*/
private ApplicationRequest decodeApplicationRequestSequence( DERSequence sequence ) throws IOException
{
ApplicationRequest authHeader = new ApplicationRequest();
for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements(); )
{
DERTaggedObject object = ( ( DERTaggedObject ) e.nextElement() );
int tag = object.getTagNo();
DEREncodable derObject = object.getObject();
switch ( tag )
{
case 0:
DERInteger tag0 = ( DERInteger ) derObject;
authHeader.setProtocolVersionNumber( tag0.intValue() );
break;
case 1:
DERInteger tag1 = ( DERInteger ) derObject;
authHeader.setMessageType( KerberosMessageType.getTypeByOrdinal( tag1.intValue() ) );
break;
case 2:
DERBitString apOptions = ( DERBitString ) derObject;
authHeader.setApOptions( new ApOptions( apOptions.getOctets() ) );
break;
case 3:
DERApplicationSpecific tag3 = ( DERApplicationSpecific ) derObject;
authHeader.setTicket( TicketDecoder.decode( tag3 ) );
break;
case 4:
DERSequence tag4 = ( DERSequence ) derObject;
authHeader.setEncPart( EncryptedDataDecoder.decode( tag4 ) );
break;
}
}
return authHeader;