Examples of ETypeInfoEntryContainer


Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

        }

        // Now, let's decode the ETYPE-INFO-ENTRY
        Asn1Decoder etypeInfoEntryDecoder = new Asn1Decoder();

        ETypeInfoEntryContainer etypeInfoEntryContainer = new ETypeInfoEntryContainer();
        etypeInfoEntryContainer.setStream( eTypeInfoContainer.getStream() );

        // Compute the start position in the stream for the ETypeInfoEntry to decode :
        // We have to move back to the ETypeInfoEntry tag
        eTypeInfoContainer.rewind();

        // Decode the ETypeInfoEntry PDU
        try
        {
            etypeInfoEntryDecoder.decode( eTypeInfoContainer.getStream(), etypeInfoEntryContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

        // Update the expected length for the current TLV
        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );

        // Update the parent
        eTypeInfoContainer.updateParent();

        // Store the ETypeInfoEntry in the container
        ETypeInfoEntry etypeInfoEntry = etypeInfoEntryContainer.getETypeInfoEntry();
        eTypeInfoContainer.addEtypeInfoEntry( etypeInfoEntry );

        if ( IS_DEBUG )
        {
            LOG.debug( "ETYPE-INFO-ENTRY added : {}", etypeInfoEntry );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x00 // salt
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x00
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();

            fail( de.getMessage() );
        }

        ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();

        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );
        assertNull( etypeInforEntry.getSalt() );

        ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x30, 0x00
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x04, 0x00
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                ( byte ) 0xA0, 0x00
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x02, 0x00
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        krbDecoder.decode( stream, container );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

                0x02, 0x01, 0x40
        } );

        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();

            fail( de.getMessage() );
        }

        ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();

        assertEquals( EncryptionType.UNKNOWN, etypeInforEntry.getEType() );
        assertNull( etypeInforEntry.getSalt() );

        ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

        } );

        String decodedPdu = Strings.dumpBytes( stream.array() );
        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();

            fail( de.getMessage() );
        }

        ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();

        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8( "1234" ), etypeInforEntry.getSalt() ) );

        ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer

        } );

        String decodedPdu = Strings.dumpBytes( stream.array() );
        stream.flip();

        ETypeInfoEntryContainer container = new ETypeInfoEntryContainer();

        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();

            fail( de.getMessage() );
        }

        ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();

        assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );
        assertNull( etypeInforEntry.getSalt() );

        ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.