Examples of PaDataContainer


Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

        }

        // Now, let's decode the PA-DATA
        Asn1Decoder paDataDecoder = new Asn1Decoder();

        PaDataContainer paDataContainer = new PaDataContainer();
        paDataContainer.setStream( kdcReqContainer.getStream() );

        // We have to move back to the PA-DATA tag
        kdcReqContainer.rewind();

        // Decode the PA-DATA PDU
        try
        {
            paDataDecoder.decode( kdcReqContainer.getStream(), paDataContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

        // Update the parent
        kdcReqContainer.updateParent();

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

        // Store the PData in the container
        PaData paData = paDataContainer.getPaData();
        KdcReq kdcReq = kdcReqContainer.getKdcReq();
        kdcReq.addPaData( paData );

        if ( IS_DEBUG )
        {
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

        }

        // Now, let's decode the PA-DATA
        Asn1Decoder paDataDecoder = new Asn1Decoder();

        PaDataContainer paDataContainer = new PaDataContainer();
        paDataContainer.setStream( kdcRepContainer.getStream() );

        // We have to move back to the PA-DATA tag
        kdcRepContainer.rewind();

        // Decode the PA-DATA PDU
        try
        {
            paDataDecoder.decode( kdcRepContainer.getStream(), paDataContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

        // Update the parent
        kdcRepContainer.updateParent();

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

        // Store the PData in the container
        PaData paData = paDataContainer.getPaData();
        KdcRep kdcRep = kdcRepContainer.getKdcRep();
        kdcRep.addPaData( paData );

        if ( IS_DEBUG )
        {
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

        }

        // Now, let's decode the PA-DATA
        Asn1Decoder paDataDecoder = new Asn1Decoder();

        PaDataContainer paDataContainer = new PaDataContainer();
        paDataContainer.setStream( methodDataContainer.getStream() );

        // Compute the start position in the stream for the PA-DATA to decode :
        // We have to move back to the PA-DATA tag
        methodDataContainer.rewind();

        // Decode the PA-DATA PDU
        try
        {
            paDataDecoder.decode( methodDataContainer.getStream(), paDataContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

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

        // Update the parent
        methodDataContainer.updateParent();

        // Store the PA-DATA in the container
        PaData paData = paDataContainer.getPaData();
        methodDataContainer.addPaData( paData );

        if ( IS_DEBUG )
        {
            LOG.debug( "PA-DATA added : {}", paData );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

        } );

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

        PaDataContainer container = new PaDataContainer();

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

            fail( de.getMessage() );
        }

        PaData checksum = container.getPaData();

        assertEquals( PaDataType.getTypeByValue( 2 ), checksum.getPaDataType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8( "padata" ), checksum.getPaDataValue() ) );

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

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

                'a'
        } );

        stream.flip();

        PaDataContainer chkContainer = new PaDataContainer();

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

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

                0x02
        } );

        stream.flip();

        PaDataContainer container = new PaDataContainer();

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

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

                0x00
        } );

        stream.flip();

        PaDataContainer container = new PaDataContainer();

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

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

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

        PaDataContainer container = new PaDataContainer();
       
        try
        {
            krbDecoder.decode( stream, container );
        }
        catch ( DecoderException de )
        {
            de.printStackTrace();
           
            fail( de.getMessage() );
        }

        PaData checksum = container.getPaData();
       
        assertEquals( PaDataType.getTypeByValue( 2 ), checksum.getPaDataType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8("padata"), checksum.getPaDataValue() ) );
       
        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

                      0x04, 0x06, 'p', 'a', 'd', 'a', 't', 'a'
            } );
       
        stream.flip();

        PaDataContainer chkContainer = new PaDataContainer();
       
        krbDecoder.decode( stream, chkContainer );
        fail();
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.codec.padata.PaDataContainer

                    0x02, 0x01, 0x02
            } );
       
        stream.flip();

        PaDataContainer container = new PaDataContainer();
       
        krbDecoder.decode( stream, container );
        fail();
    }
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.