Package org.apache.directory.shared.kerberos.components

Examples of org.apache.directory.shared.kerberos.components.HostAddress


        // Make changes to test.
        encTicketPart.setFlag( TicketFlag.PROXIABLE );

        HostAddress[] address =
            { new HostAddress( InetAddress.getByAddress( new byte[4] ) ) };
        HostAddresses addresses = new HostAddresses( address );
        encTicketPart.setClientAddresses( addresses );

        // Seal the ticket for the server.
        KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
View Full Code Here


           
           
            KrbPriv privateMessage = new KrbPriv();
           
            EncKrbPrivPart part = new EncKrbPrivPart();
            part.setSenderAddress( new HostAddress( InetAddress.getLocalHost() ) );
            part.setSeqNumber( authenticator.getSeqNumber() );
            part.setTimestamp( authenticator.getCtime() );

            short changePwdPVNO = ChangePasswordRequest.PVNO;
           
View Full Code Here

        {
            fail( de.getMessage() );
        }

        // Check the decoded HostAddress
        HostAddress hostAddress = ( ( HostAddressContainer ) hostAddressContainer ).getHostAddress();

        assertEquals( HostAddrType.ADDRTYPE_INET, hostAddress.getAddrType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8( "192.168.0.1" ), hostAddress.getAddress() ) );

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( hostAddress.computeLength() );

        try
        {
            bb = hostAddress.encode( bb );

            // Check the length
            assertEquals( 0x16, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );
View Full Code Here

            boolean caddrContainsSender = false;
            if ( tgt.getEncTicketPart().getClientAddresses() != null )
            {
                caddrContainsSender = tgt.getEncTicketPart().getClientAddresses()
                    .contains( new HostAddress( clientAddress ) );
            }

            StringBuffer sb = new StringBuffer();

            sb.append( "Monitoring " + SERVICE_NAME + " context:" );
View Full Code Here

        {
            throw de;
        }

        // Store the HostAddress in the container
        HostAddress hostAddress = hostAddressContainer.getHostAddress();

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

        // Update the parent
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected void setIntegerValue( int value, HostAddressContainer hostAddressContainer )
    {
        HostAddress hostAddressData = hostAddressContainer.getHostAddress();

        HostAddrType hostAddrType = HostAddrType.getTypeByOrdinal( value );
        hostAddressData.setAddrType( hostAddrType );

        if ( IS_DEBUG )
        {
            LOG.debug( "addr-type : {}", hostAddrType );
        }
View Full Code Here

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

        HostAddress hostAddress = new HostAddress();
        hostAddressContainer.setHostAddress( hostAddress );

        if ( IS_DEBUG )
        {
            LOG.debug( "HostAddress created" );
View Full Code Here

        // Update the parent
        hostAddressesContainer.updateParent();

        // Store the hostAddress in the container
        HostAddress hostAddress = hostAddressContainer.getHostAddress();
        hostAddressesContainer.addHostAddress( hostAddress );

        if ( IS_DEBUG )
        {
            LOG.debug( "HostAddress added : {}", hostAddress );
View Full Code Here

        }

        EncKrbPrivPart encKrbPrivPart = container.getEncKrbPrivPart();

        String time = "20101119080043Z";
        HostAddress ad = new HostAddress( InetAddress.getByName( "127.0.0.1" ) );

        assertTrue( Arrays.equals( new byte[]
            { 0, 1 }, encKrbPrivPart.getUserData() ) );
        assertEquals( time, encKrbPrivPart.getTimestamp().getDate() );
        assertEquals( 1, encKrbPrivPart.getUsec() );
View Full Code Here

            fail();
        }

        EncKrbPrivPart enKrbPrivPart = container.getEncKrbPrivPart();

        HostAddress ad = new HostAddress( InetAddress.getByName( "127.0.0.1" ) );

        assertTrue( Arrays.equals( new byte[]
            { 0, 1 }, enKrbPrivPart.getUserData() ) );
        assertNull( enKrbPrivPart.getTimestamp() );
        assertEquals( 1, enKrbPrivPart.getUsec() );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.kerberos.components.HostAddress

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.