-- Encrypted AuthorizationData encoding
additional-tickets[11] SEQUENCE OF Ticket OPTIONAL
}*/
private RequestBody decodeRequestBody( DERSequence sequence ) throws IOException
{
RequestBodyModifier modifier = new RequestBodyModifier();
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:
DERBitString kdcOptions = ( DERBitString ) derObject;
modifier.setKdcOptions( new KdcOptions( kdcOptions.getOctets() ) );
break;
case 1:
DERSequence cName = ( DERSequence ) derObject;
modifier.setClientName( PrincipalNameDecoder.decode( cName ) );
break;
case 2:
DERGeneralString realm = ( DERGeneralString ) derObject;
modifier.setRealm( realm.getString() );
break;
case 3:
DERSequence sname = ( DERSequence ) derObject;
modifier.setServerName( PrincipalNameDecoder.decode( sname ) );
break;
case 4:
DERGeneralizedTime from = ( DERGeneralizedTime ) derObject;
modifier.setFrom( KerberosTimeDecoder.decode( from ) );
break;
case 5:
DERGeneralizedTime till = ( DERGeneralizedTime ) derObject;
modifier.setTill( KerberosTimeDecoder.decode( till ) );
break;
case 6:
DERGeneralizedTime rtime = ( DERGeneralizedTime ) derObject;
modifier.setRtime( KerberosTimeDecoder.decode( rtime ) );
break;
case 7:
DERInteger nonce = ( DERInteger ) derObject;
modifier.setNonce( nonce.intValue() );
break;
case 8:
DERSequence etype = ( DERSequence ) derObject;
modifier.setEType( EncryptionTypeDecoder.decode( etype ) );
break;
case 9:
DERSequence hostAddresses = ( DERSequence ) derObject;
modifier.setAddresses( HostAddressDecoder.decodeSequence( hostAddresses ) );
break;
case 10:
DERSequence encryptedData = ( DERSequence ) derObject;
modifier.setEncAuthorizationData( EncryptedDataDecoder.decode( encryptedData ) );
break;
case 11:
DERSequence tag11 = ( DERSequence ) derObject;
modifier.setAdditionalTickets( TicketDecoder.decodeSequence( tag11 ) );
break;
}
}
return modifier.getRequestBody();
}