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

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


        optionalFieldValueList.add( new FieldValueHolder( "timestamp", timestamp ) );

        usec = 1;
        optionalFieldValueList.add( new FieldValueHolder( "usec", usec ) );

        senderAddress = new HostAddress( InetAddress.getByName( "localhost" ) );
        optionalFieldValueList.add( new FieldValueHolder( "senderAddress", senderAddress ) );

        recipientAddress = new HostAddress( InetAddress.getByName( "localhost" ) );
        optionalFieldValueList.add( new FieldValueHolder( "recipientAddress", recipientAddress ) );
    }
View Full Code Here


            throw new KerberosException( ErrorType.KRB_AP_ERR_BADMATCH );
        }

        if ( ticket.getEncTicketPart().getClientAddresses() != null )
        {
            if ( !ticket.getEncTicketPart().getClientAddresses().contains( new HostAddress( clientAddress ) ) )
            {
                throw new KerberosException( ErrorType.KRB_AP_ERR_BADADDR );
            }
        }
        else
View Full Code Here

   
   
    public void addHost( String hostNameOrIpAddress ) throws UnknownHostException
    {
        InetAddress address = InetAddress.getByName( hostNameOrIpAddress );
        hostAddresses.add( new HostAddress( address ) );
    }
View Full Code Here

                byte[] result = new byte[addrLength];
                for (int j = 0; j < addrLength; j++)
                {
                    result[j] = (byte)readByte();
                }
                addrs[i] = new HostAddress( HostAddrType.getTypeByOrdinal( addrType ), result );
            }
            return addrs;
        }
       
        return null;
View Full Code Here

       
        boolean skey = readskey();
       
        int flags = readFlags();
        TicketFlags tFlags = new TicketFlags(flags);
        HostAddress addr[] = readAddr();
        HostAddresses addrs = null;
        if (addr != null)
        {
            addrs = new HostAddresses(addr);
        }
View Full Code Here

        body.addEType( EncryptionType.AES256_CTS_HMAC_SHA1_96 );
        body.addEType( EncryptionType.DES3_CBC_MD5 );
        body.addEType( EncryptionType.AES128_CTS_HMAC_SHA1_96 );

        HostAddresses addresses = new HostAddresses();
        addresses.addHostAddress( new HostAddress( HostAddrType.ADDRTYPE_INET, "192.168.0.1".getBytes() ) );
        addresses.addHostAddress( new HostAddress( HostAddrType.ADDRTYPE_INET, "192.168.0.2".getBytes() ) );
        body.setAddresses( addresses );

        EncryptedData encAuthorizationData = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96,
            "abcdef".getBytes() );
        body.setEncAuthorizationData( encAuthorizationData );
View Full Code Here

        KerberosTime requestedEndTime = new KerberosTime( now + 1 * KerberosTime.DAY );
        kdcReqBody.setTill( requestedEndTime );

        HostAddress[] address =
            { new HostAddress( InetAddress.getByName( null ) ) };
        HostAddresses addresses = new HostAddresses( address );
        kdcReqBody.setAddresses( addresses );

        KdcReq message = getKdcRequest( tgt, kdcReqBody );

View Full Code Here

        KerberosTime requestedEndTime = new KerberosTime( now + 1 * KerberosTime.DAY );
        kdcReqBody.setTill( requestedEndTime );

        HostAddress[] address =
            { new HostAddress( InetAddress.getByName( null ) ) };
        HostAddresses addresses = new HostAddresses( address );
        kdcReqBody.setAddresses( addresses );

        KdcReq message = getKdcRequest( tgt, kdcReqBody );

View Full Code Here

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

        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

        KerberosTime requestedEndTime = new KerberosTime( now + 1 * KerberosTime.DAY );
        kdcReqBody.setTill( requestedEndTime );

        HostAddress[] address =
            { new HostAddress( InetAddress.getByName( "127.0.0.1" ) ) };
        HostAddresses addresses = new HostAddresses( address );
        kdcReqBody.setAddresses( addresses );

        KdcReq message = getKdcRequest( tgt, kdcReqBody );

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.