Package org.apache.directory.api.asn1.ber.tlv

Examples of org.apache.directory.api.asn1.ber.tlv.TLV


    /**
     * {@inheritDoc}
     */
    public void action( EncTicketPartContainer encTicketPartContainer ) throws DecoderException
    {
        TLV tlv = encTicketPartContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public void action( TgsRepContainer tgsRepContainer ) throws DecoderException
    {
        TLV tlv = tgsRepContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        // Now, let's decode the KDC-REP
        Asn1Decoder kdcRepDecoder = new Asn1Decoder();

        KdcRepContainer kdcRepContainer = new KdcRepContainer( tgsRepContainer.getStream() );

        // Store the created TGS-REP object into the KDC-REP container
        TgsRep tgsRep = new TgsRep();
        kdcRepContainer.setKdcRep( tgsRep );

        // Decode the KDC_REP PDU
        try
        {
            kdcRepDecoder.decode( tgsRepContainer.getStream(), kdcRepContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

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

        // Update the parent
        tgsRepContainer.updateParent();

        if ( tgsRep.getMessageType() != KerberosMessageType.TGS_REP )
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( ChangePasswdDataContainer chngPwdDataContainer ) throws DecoderException
    {
        TLV tlv = chngPwdDataContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( AdKdcIssuedContainer adKdcIssuedContainer ) throws DecoderException
    {
        TLV tlv = adKdcIssuedContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( EncTicketPartContainer encTicketPartContainer ) throws DecoderException
    {
        TLV tlv = encTicketPartContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        TransitedEncodingContainer transitedContainer = new TransitedEncodingContainer();

        // Now, let's decode the TransitedEncoding
        Asn1Decoder transitedEncodingDecoder = new Asn1Decoder();

        try
        {
            transitedEncodingDecoder.decode( encTicketPartContainer.getStream(), transitedContainer );
        }
        catch ( DecoderException de )
        {
            throw de;
        }

        TransitedEncoding te = transitedContainer.getTransitedEncoding();

        if ( IS_DEBUG )
        {
            LOG.debug( "TransitedEncoding {}", te );
        }

        encTicketPartContainer.getEncTicketPart().setTransited( te );

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

        // Update the parent
        encTicketPartContainer.updateParent();
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( AdAndOrContainer adAndOrContainer ) throws DecoderException
    {
        TLV tlv = adAndOrContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( ETypeInfoEntryContainer eTypeInfoEntryContainer ) throws DecoderException
    {
        TLV tlv = eTypeInfoEntryContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        // The etype is an integer
        BerValue value = tlv.getValue();

        EncryptionType etype = null;
        ETypeInfoEntry etypeInfoEntry = eTypeInfoEntryContainer.getETypeInfoEntry();

        try
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public final void action( E container ) throws DecoderException
    {
        TLV tlv = container.getCurrentTLV();

        // The Length should not be null and should be 1
        if ( tlv.getLength() != 1 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
        }

        BerValue value = tlv.getValue();

        try
        {
            int msgTypeValue = IntegerDecoder.parse( value );

View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( EncApRepPartContainer encApRepPartContainer ) throws DecoderException
    {
        TLV tlv = encApRepPartContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void action( KrbErrorContainer krbErrorContainer ) throws DecoderException
    {
        TLV tlv = krbErrorContainer.getCurrentTLV();

        // The Length should not be null
        if ( tlv.getLength() == 0 )
        {
            LOG.error( I18n.err( I18n.ERR_04066 ) );

            // This will generate a PROTOCOL_ERROR
            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
View Full Code Here

TOP

Related Classes of org.apache.directory.api.asn1.ber.tlv.TLV

Copyright © 2018 www.massapicom. 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.