| * Test the decoding of a EncAsRepPart message
*/
@Test
public void testDecodeFullEncAsRepPart() throws Exception
{
Asn1Decoder kerberosDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0xA2 );
stream.put( new byte[]
{
0x79, ( byte ) 0x81, ( byte ) 0x9F,
0x30, ( byte ) 0x81, ( byte ) 0x9C,
( byte ) 0xA0, 0x11,
0x30, 0x0F,
( byte ) 0xA0, 0x03,
0x02, 0x01, 0x11,
( byte ) 0xA1, 0x08,
0x04, 0x06,
0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
( byte ) 0xA1, 0x36,
0x30, 0x34,
0x30, 0x18,
( byte ) 0xA0, 0x03,
0x02, 0x01, 0x02,
( byte ) 0xA1, 0x11,
0x18, 0x0F,
0x32, 0x30, 0x31, 0x30, 0x31, 0x31, 0x32, 0x35, 0x31, 0x36, 0x31, 0x32, 0x35, 0x39, 0x5A,
0x30, 0x18,
( byte ) 0xA0, 0x03,
0x02, 0x01, 0x02,
( byte ) 0xA1, 0x11,
0x18, 0x0F,
0x32, 0x30, 0x31, 0x30, 0x31, 0x31, 0x32, 0x35, 0x31, 0x36, 0x31, 0x32, 0x35, 0x39, 0x5A,
( byte ) 0xA2, 0x03,
0x02, 0x01, 0x01,
( byte ) 0xA4, 0x07,
0x03, 0x05, 0x00, 0x40, 0x00, 0x00, 0x00,
( byte ) 0xA5, 0x11,
0x18, 0x0F,
0x32, 0x30, 0x31, 0x30, 0x31, 0x31, 0x32, 0x35, 0x31, 0x36, 0x31, 0x32, 0x35, 0x39, 0x5A,
( byte ) 0xA7, 0x11,
0x18, 0x0F,
0x32, 0x30, 0x31, 0x30, 0x31, 0x31, 0x32, 0x35, 0x31, 0x36, 0x31, 0x32, 0x35, 0x39, 0x5A,
( byte ) 0xA9, 0x06,
0x1B, 0x04, 'a', 'b', 'c', 'd',
( byte ) 0xAA, 0x13,
0x30, 0x11,
( byte ) 0xA0, 0x03,
0x02, 0x01, 0x01,
( byte ) 0xA1, 0x0A,
0x30, 0x08,
0x1B, 0x06,
0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
} );
stream.flip();
// Allocate a EncAsRepPart Container
EncAsRepPartContainer encAsRepPartContainer = new EncAsRepPartContainer( stream );
// Decode the EncAsRepPart PDU
try
{
kerberosDecoder.decode( stream, encAsRepPartContainer );
}
catch ( DecoderException de )
{
fail( de.getMessage() );
}
|