| * Test the decoding of a EncApRepPart message
*/
@Test
public void testDecodeFullEncApRepPart() throws Exception
{
Asn1Decoder kerberosDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x33 );
stream.put( new byte[]
{
0x7B, 0x31,
0x30, 0x2F,
( byte ) 0xA0, 0x11, // ctime
0x18,
0x0F,
'2',
'0',
'1',
'0',
'1',
'1',
'1',
'0',
'1',
'5',
'4',
'5',
'2',
'5',
'Z',
( byte ) 0xA1,
0x03, // cusec
0x02,
0x01,
0x7F,
( byte ) 0xA2,
0x0F, // subkey
0x30,
0x0D,
( byte ) 0xA0,
0x03,
0x02,
0x01,
0x01,
( byte ) 0xA1,
0x06,
0x04,
0x04,
'A',
'B',
'C',
'D',
( byte ) 0xA3,
0x04, // seq-number
0x02,
0x02,
0x30,
0x39,
} );
String decodedPdu = Strings.dumpBytes( stream.array() );
stream.flip();
// Allocate a EncApRepPart Container
Asn1Container encApRepPartContainer = new EncApRepPartContainer( stream );
// Decode the EncApRepPart PDU
try
{
kerberosDecoder.decode( stream, encApRepPartContainer );
}
catch ( DecoderException de )
{
fail( de.getMessage() );
}
|