Package org.apache.directory.shared.kerberos.messages

Examples of org.apache.directory.shared.kerberos.messages.KrbError


        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getCTime() );
        assertEquals( 0, krbError.getCusec() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here


        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getCRealm() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getCName() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getCRealm() );
        assertNull( krbError.getCName() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getEText() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getEData() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getEText() );
        assertNull( krbError.getEData() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        catch ( DecoderException e )
        {
            fail();
        }

        KrbError krbError = container.getKrbError();

        assertNull( krbError.getCTime() );
        assertEquals( 0, krbError.getCusec() );
        assertNull( krbError.getCRealm() );
        assertNull( krbError.getCName() );
        assertNull( krbError.getEText() );
        assertNull( krbError.getEData() );

        int encodedLen = krbError.computeLength();

        assertEquals( streamLen, encodedLen );

        ByteBuffer buffer = ByteBuffer.allocate( streamLen );
        try
        {
            buffer = krbError.encode( buffer );

            assertEquals( decoded, Strings.dumpBytes( buffer.array() ) );
        }
        catch ( EncoderException e )
        {
View Full Code Here

        handler.messageReceived( session, message );

        Object msg = session.getMessage();
        assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
        KrbError error = ( KrbError ) msg;
        assertEquals( "Requested protocol version number not supported", ErrorType.KDC_ERR_BAD_PVNO, error.getErrorCode() );
    }
View Full Code Here

        handler.messageReceived( session, message );

        Object msg = session.getMessage();
        assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
        KrbError error = ( KrbError ) msg;
        assertEquals( "Server not found in Kerberos database", ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN, error.getErrorCode() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.kerberos.messages.KrbError

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.