RequestBody requestBody = null;
byte[] bodyBytes = null;
for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements(); )
{
DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
int tag = object.getTagNo();
DEREncodable derObject = object.getObject();
switch ( tag )
{
case 1:
DERInteger tag1 = ( DERInteger ) derObject;
pvno = tag1.intValue();
break;
case 2:
DERInteger tag2 = ( DERInteger ) derObject;
msgType = KerberosMessageType.getTypeByOrdinal( tag2.intValue() );
break;
case 3:
DERSequence tag3 = ( DERSequence ) derObject;
paData = PreAuthenticationDataDecoder.decodeSequence( tag3 );
break;
case 4:
DERSequence tag4 = ( DERSequence ) derObject;
requestBody = decodeRequestBody( tag4 );
/**
* Get the raw bytes of the KDC-REQ-BODY for checksum calculation and
* comparison with the authenticator checksum during the verification
* stage of ticket grant processing.
*/
bodyBytes = object.getOctets();
break;
}
}