directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r264844 [3/6] - in /directory/shared/kerberos/trunk/common: ./ src/java/org/apache/kerberos/chain/ src/java/org/apache/kerberos/chain/impl/ src/java/org/apache/kerberos/crypto/ src/java/org/apache/kerberos/crypto/checksum/ src/java/org/apac...
Date Tue, 30 Aug 2005 20:04:01 GMT
Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERInteger;
@@ -23,17 +22,15 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptionKey;
 
-
 public class EncryptionKeyEncoder
 {
-	protected static DERSequence encode( EncryptionKey key )
-	{
-		DERSequence vector = new DERSequence();
-		
-		vector.add( new DERTaggedObject( 0, DERInteger.valueOf( key.getKeyType().getOrdinal() ) ) );
-		vector.add( new DERTaggedObject( 1, new DEROctetString( key.getKeyValue() ) ) );
-		
-		return vector;
-	}
-}
+    protected static DERSequence encode( EncryptionKey key )
+    {
+        DERSequence vector = new DERSequence();
 
+        vector.add( new DERTaggedObject( 0, DERInteger.valueOf( key.getKeyType().getOrdinal() ) ) );
+        vector.add( new DERTaggedObject( 1, new DEROctetString( key.getKeyValue() ) ) );
+
+        return vector;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,30 +14,27 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERInteger;
 import org.apache.asn1.der.DERSequence;
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 
-
 public class EncryptionTypeEncoder
 {
-	/**
+    /**
      * etype[8]             SEQUENCE OF INTEGER, -- EncryptionEngine,
      *             -- in preference order
      */
-	protected static DERSequence encode( EncryptionType[] eType )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		for ( int ii = 0; ii < eType.length; ii++ )
-		{
-			sequence.add( DERInteger.valueOf( eType[ii].getOrdinal() ) );
-		}
-		
-		return sequence;
-	}
-}
+    protected static DERSequence encode( EncryptionType[] eType )
+    {
+        DERSequence sequence = new DERSequence();
 
+        for ( int ii = 0; ii < eType.length; ii++ )
+        {
+            sequence.add( DERInteger.valueOf( eType[ ii ].getOrdinal() ) );
+        }
+
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.ByteArrayOutputStream;
@@ -27,53 +26,50 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptionTypeInfoEntry;
 
-
 public class EncryptionTypeInfoEncoder
 {
-	public static byte[] encode( EncryptionTypeInfoEntry[] entries )
-			throws IOException
-	{
-	    ByteArrayOutputStream baos = new ByteArrayOutputStream();
-	    ASN1OutputStream aos = new ASN1OutputStream( baos );
-	    aos.writeObject( encodeSequence( entries ) );
-	    aos.close();
-	    
-	    return baos.toByteArray();
-	}
-	
-	/**
-	 * ETYPE-INFO              ::= SEQUENCE OF ETYPE-INFO-ENTRY
-	 */
-	protected static DERSequence encodeSequence( EncryptionTypeInfoEntry[] entries )
-	{
-	    DERSequence sequence = new DERSequence();
-	    
-	    for ( int ii = 0; ii < entries.length; ii++ )
-	    {
-	        sequence.add( encode( entries[ ii ] ) );
-	    }
-	    
-	    return sequence;
-	}
-    
-	/**
-	 * ETYPE-INFO-ENTRY        ::= SEQUENCE {
+    public static byte[] encode( EncryptionTypeInfoEntry[] entries ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+        aos.writeObject( encodeSequence( entries ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+    /**
+     * ETYPE-INFO              ::= SEQUENCE OF ETYPE-INFO-ENTRY
+     */
+    protected static DERSequence encodeSequence( EncryptionTypeInfoEntry[] entries )
+    {
+        DERSequence sequence = new DERSequence();
+
+        for ( int ii = 0; ii < entries.length; ii++ )
+        {
+            sequence.add( encode( entries[ ii ] ) );
+        }
+
+        return sequence;
+    }
+
+    /**
+     * ETYPE-INFO-ENTRY        ::= SEQUENCE {
      *     etype               [0] Int32,
      *     salt                [1] OCTET STRING OPTIONAL
      * }
-	 */
-	protected static DERSequence encode( EncryptionTypeInfoEntry entry )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( entry.getEncryptionType().getOrdinal() ) ) );
-		
-		if ( entry.getSalt() != null )
-		{
-		    sequence.add( new DERTaggedObject( 1, new DEROctetString( entry.getSalt() ) ) );
-		}
-		
-		return sequence;
-	}
-}
+     */
+    protected static DERSequence encode( EncryptionTypeInfoEntry entry )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( entry.getEncryptionType().getOrdinal() ) ) );
+
+        if ( entry.getSalt() != null )
+        {
+            sequence.add( new DERTaggedObject( 1, new DEROctetString( entry.getSalt() ) ) );
+        }
 
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.ByteArrayOutputStream;
@@ -30,7 +29,6 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.ErrorMessage;
 
-
 public class ErrorMessageEncoder
 {
 	public void encode( ErrorMessage message, ByteBuffer out ) throws IOException
@@ -107,4 +105,3 @@
 		return sequence;
 	}
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERInteger;
@@ -24,42 +23,40 @@
 import org.apache.kerberos.messages.value.HostAddress;
 import org.apache.kerberos.messages.value.HostAddresses;
 
-
 public class HostAddressesEncoder
 {
-	/**
-	 * HostAddresses ::=   SEQUENCE OF SEQUENCE {
-	 *                     addr-type[0]             INTEGER,
-	 *                     address[1]               OCTET STRING
-	 * }
-	 */
-	protected static DERSequence encodeSequence( HostAddresses hosts )
-	{
-		HostAddress[] addresses = hosts.getAddresses();
-		DERSequence sequence = new DERSequence();
-		
-		for ( int ii = 0; ii < addresses.length; ii++ )
-		{
-			sequence.add( encode( addresses[ ii ] ) );
-		}
-		
-		return sequence;
-	}
-	
-	/**
-	 *  HostAddress ::=     SEQUENCE  {
+    /**
+     * HostAddresses ::=   SEQUENCE OF SEQUENCE {
      *                     addr-type[0]             INTEGER,
      *                     address[1]               OCTET STRING
      * }
      */
-	protected static DERSequence encode( HostAddress host )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( host.getAddressType().getOrdinal() ) ) );
-		sequence.add( new DERTaggedObject( 1, new DEROctetString( host.getAddress() ) ) );
-		
-		return sequence;
-	}
-}
+    protected static DERSequence encodeSequence( HostAddresses hosts )
+    {
+        HostAddress[] addresses = hosts.getAddresses();
+        DERSequence sequence = new DERSequence();
+
+        for ( int ii = 0; ii < addresses.length; ii++ )
+        {
+            sequence.add( encode( addresses[ ii ] ) );
+        }
+
+        return sequence;
+    }
+
+    /**
+     *  HostAddress ::=     SEQUENCE  {
+     *                     addr-type[0]             INTEGER,
+     *                     address[1]               OCTET STRING
+     * }
+     */
+    protected static DERSequence encode( HostAddress host )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( host.getAddressType().getOrdinal() ) ) );
+        sequence.add( new DERTaggedObject( 1, new DEROctetString( host.getAddress() ) ) );
 
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.IOException;
@@ -30,7 +29,6 @@
 import org.apache.kerberos.messages.KdcReply;
 import org.apache.kerberos.messages.value.PreAuthenticationData;
 
-
 public class KdcReplyEncoder
 {
 	/*
@@ -103,4 +101,3 @@
 		return preAuth;
 	}
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.ByteArrayOutputStream;
@@ -28,7 +27,6 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.KdcRequest;
 
-
 public class KdcReqBodyEncoder
 {
 	public byte[] encode( KdcRequest request ) throws IOException
@@ -122,4 +120,3 @@
 		return sequence;
 	}
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,22 +14,19 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERGeneralizedTime;
 import org.apache.kerberos.messages.value.KerberosTime;
 
-
 public class KerberosTimeEncoder
 {
-	/**
-	 * KerberosTime ::=   GeneralizedTime
-	 *             -- Specifying UTC time zone (Z)
-	 */
+    /**
+     * KerberosTime ::=   GeneralizedTime
+     *             -- Specifying UTC time zone (Z)
+     */
     protected static DERGeneralizedTime encode( KerberosTime time )
     {
-    	return DERGeneralizedTime.valueOf( time.toDate() );
+        return DERGeneralizedTime.valueOf( time.toDate() );
     }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERGeneralizedTime;
@@ -24,29 +23,27 @@
 import org.apache.kerberos.messages.value.LastRequest;
 import org.apache.kerberos.messages.value.LastRequestEntry;
 
-
 public class LastRequestEncoder
 {
-	/**
-	 * LastReq ::=   SEQUENCE OF SEQUENCE {
-	 * lr-type[0]               INTEGER,
-	 * lr-value[1]              KerberosTime
-	 * }
-	 */
-	protected static DERSequence encode( LastRequest lastReq )
-	{
-		LastRequestEntry[] entries = lastReq.getEntries();
-		DERSequence outerSequence = new DERSequence();
-		
-		for ( int ii = 0; ii < entries.length; ii++ )
-		{
-			DERSequence sequence = new DERSequence();
-			sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( entries[ii].getLastRequestType().getOrdinal() ) ) );
-			sequence.add( new DERTaggedObject( 1, DERGeneralizedTime.valueOf( entries[ii].getLastRequestValue().toDate() ) ) );
-			outerSequence.add( sequence );
-		}
-		
-		return outerSequence;
-	}
-}
+    /**
+     * LastReq ::=   SEQUENCE OF SEQUENCE {
+     * lr-type[0]               INTEGER,
+     * lr-value[1]              KerberosTime
+     * }
+     */
+    protected static DERSequence encode( LastRequest lastReq )
+    {
+        LastRequestEntry[] entries = lastReq.getEntries();
+        DERSequence outerSequence = new DERSequence();
 
+        for ( int ii = 0; ii < entries.length; ii++ )
+        {
+            DERSequence sequence = new DERSequence();
+            sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( entries[ ii ].getLastRequestType().getOrdinal() ) ) );
+            sequence.add( new DERTaggedObject( 1, DERGeneralizedTime.valueOf( entries[ ii ].getLastRequestValue().toDate() ) ) );
+            outerSequence.add( sequence );
+        }
+
+        return outerSequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.ByteArrayOutputStream;
@@ -27,51 +26,48 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.PreAuthenticationData;
 
-
 public class PreAuthenticationDataEncoder
 {
-	public static byte[] encode( PreAuthenticationData[] preAuth )
-			throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		aos.writeObject( encodeSequence( preAuth ) );
-		aos.close();
-
-		return baos.toByteArray();
-	}
-	
-	protected static DERSequence encodeSequence( PreAuthenticationData[] preAuth )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		for ( int ii = 0; ii < preAuth.length; ii++ )
-		{
-			sequence.add( encode( preAuth[ ii ] ) );
-		}
-		
-		return sequence;
-	}
-	
-	/**
-	 * PA-DATA ::=        SEQUENCE {
-	 *         padata-type[1]        INTEGER,
-	 *         padata-value[2]       OCTET STRING
-	 * }
-	 */
-	protected static DERSequence encode( PreAuthenticationData preAuth )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( preAuth.getDataType().getOrdinal() ) ) );
-		
-		if ( preAuth.getDataValue() != null )
-		{
-		    sequence.add( new DERTaggedObject( 2, new DEROctetString( preAuth.getDataValue() ) ) );
-		}
-		
-		return sequence;
-	}
-}
+    public static byte[] encode( PreAuthenticationData[] preAuth ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        aos.writeObject( encodeSequence( preAuth ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+    protected static DERSequence encodeSequence( PreAuthenticationData[] preAuth )
+    {
+        DERSequence sequence = new DERSequence();
+
+        for ( int ii = 0; ii < preAuth.length; ii++ )
+        {
+            sequence.add( encode( preAuth[ ii ] ) );
+        }
+
+        return sequence;
+    }
+
+    /**
+     * PA-DATA ::=        SEQUENCE {
+     *         padata-type[1]        INTEGER,
+     *         padata-value[2]       OCTET STRING
+     * }
+     */
+    protected static DERSequence encode( PreAuthenticationData preAuth )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( preAuth.getDataType().getOrdinal() ) ) );
+
+        if ( preAuth.getDataValue() != null )
+        {
+            sequence.add( new DERTaggedObject( 2, new DEROctetString( preAuth.getDataValue() ) ) );
+        }
 
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.util.Arrays;
@@ -28,47 +27,45 @@
 import org.apache.asn1.der.DERSequence;
 import org.apache.asn1.der.DERTaggedObject;
 
-
 public class PrincipalNameEncoder
 {
-	private static final String COMPONENT_SEPARATOR = "/";
-	private static final String REALM_SEPARATOR     = "@";
-	
-	/**
-	 * PrincipalName ::=   SEQUENCE {
-	 *               name-type[0]     INTEGER,
-	 *               name-string[1]   SEQUENCE OF GeneralString
-	 * }
-	 */
-	protected static DERSequence encode( KerberosPrincipal principal )
-	{
-		DERSequence vector = new DERSequence();
-		
-		vector.add( new DERTaggedObject( 0, DERInteger.valueOf( principal.getNameType() ) ) );
-		vector.add( new DERTaggedObject( 1, encodeNameSequence( principal ) ) );
-		
-		return vector;
-	}
-	
-	private static DERSequence encodeNameSequence( KerberosPrincipal principal )
-	{
-		Iterator it = getNameStrings( principal ).iterator();
-		
-		DERSequence vector = new DERSequence();
-		
-		while ( it.hasNext() )
-		{
-			vector.add( DERGeneralString.valueOf( (String)it.next() ) );
-		}
-		
-		return vector;
-	}
-	
-	private static List getNameStrings( KerberosPrincipal principal )
-	{
-		String nameComponent = principal.getName().split( REALM_SEPARATOR )[0];
-		String[] components = nameComponent.split( COMPONENT_SEPARATOR );
-		return Arrays.asList( components );
-	}
-}
+    private static final String COMPONENT_SEPARATOR = "/";
+    private static final String REALM_SEPARATOR = "@";
 
+    /**
+     * PrincipalName ::=   SEQUENCE {
+     *               name-type[0]     INTEGER,
+     *               name-string[1]   SEQUENCE OF GeneralString
+     * }
+     */
+    protected static DERSequence encode( KerberosPrincipal principal )
+    {
+        DERSequence vector = new DERSequence();
+
+        vector.add( new DERTaggedObject( 0, DERInteger.valueOf( principal.getNameType() ) ) );
+        vector.add( new DERTaggedObject( 1, encodeNameSequence( principal ) ) );
+
+        return vector;
+    }
+
+    private static DERSequence encodeNameSequence( KerberosPrincipal principal )
+    {
+        Iterator it = getNameStrings( principal ).iterator();
+
+        DERSequence vector = new DERSequence();
+
+        while ( it.hasNext() )
+        {
+            vector.add( DERGeneralString.valueOf( (String) it.next() ) );
+        }
+
+        return vector;
+    }
+
+    private static List getNameStrings( KerberosPrincipal principal )
+    {
+        String nameComponent = principal.getName().split( REALM_SEPARATOR )[ 0 ];
+        String[] components = nameComponent.split( COMPONENT_SEPARATOR );
+        return Arrays.asList( components );
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import java.io.ByteArrayOutputStream;
@@ -27,30 +26,28 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.application.PrivateMessage;
 
-
 public class PrivateMessageEncoder
 {
-	public byte[] encode( PrivateMessage message ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence privateMessageSequence = encodePrivateMessageSequence( message );
-		aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), privateMessageSequence ) );
-		aos.close();
-		
-		return baos.toByteArray();
-	}
-	
-	private DERSequence encodePrivateMessageSequence( PrivateMessage message )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( message.getProtocolVersionNumber() ) ) );
-		sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( message.getMessageType().getOrdinal() ) ) );
-		sequence.add( new DERTaggedObject( 3, EncryptedDataEncoder.encodeSequence( message.getEncryptedPart() ) ) );
-		
-		return sequence;
-	}
-}
+    public byte[] encode( PrivateMessage message ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence privateMessageSequence = encodePrivateMessageSequence( message );
+        aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), privateMessageSequence ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+    private DERSequence encodePrivateMessageSequence( PrivateMessage message )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( message.getProtocolVersionNumber() ) ) );
+        sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( message.getMessageType().getOrdinal() ) ) );
+        sequence.add( new DERTaggedObject( 3, EncryptedDataEncoder.encodeSequence( message.getEncryptedPart() ) ) );
 
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TicketEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TicketEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TicketEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TicketEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERApplicationSpecific;
@@ -24,11 +23,10 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.components.Ticket;
 
-
 public class TicketEncoder
 {
-	/**
-	 * Ticket ::=                    [APPLICATION 1] SEQUENCE {
+    /**
+     * Ticket ::=                    [APPLICATION 1] SEQUENCE {
      *     tkt-vno[0]                   INTEGER,
      *     realm[1]                     Realm,
      *     sname[2]                     PrincipalName,
@@ -37,39 +35,38 @@
      */
     protected static DERApplicationSpecific encode( Ticket ticket )
     {
-		DERSequence vector = new DERSequence();
-		
-		vector.add( new DERTaggedObject( 0, DERInteger.valueOf( ticket.getTicketVersionNumber() ) ) );
-		vector.add( new DERTaggedObject( 1, DERGeneralString.valueOf( ticket.getRealm() ) ) );
-		vector.add( new DERTaggedObject( 2, PrincipalNameEncoder.encode( ticket.getServerPrincipal() ) ) );
-		vector.add( new DERTaggedObject( 3, EncryptedDataEncoder.encodeSequence( ticket.getEncPart() ) ) );
-		
-		DERApplicationSpecific ticketSequence = null;
-		
-		try
-		{
-			ticketSequence = DERApplicationSpecific.valueOf( 1, vector );
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-		}
-		
-		return ticketSequence;
+        DERSequence vector = new DERSequence();
+
+        vector.add( new DERTaggedObject( 0, DERInteger.valueOf( ticket.getVersionNumber() ) ) );
+        vector.add( new DERTaggedObject( 1, DERGeneralString.valueOf( ticket.getRealm() ) ) );
+        vector.add( new DERTaggedObject( 2, PrincipalNameEncoder.encode( ticket.getServerPrincipal() ) ) );
+        vector.add( new DERTaggedObject( 3, EncryptedDataEncoder.encodeSequence( ticket.getEncPart() ) ) );
+
+        DERApplicationSpecific ticketSequence = null;
+
+        try
+        {
+            ticketSequence = DERApplicationSpecific.valueOf( 1, vector );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+
+        return ticketSequence;
     }
-    
-	protected static DERSequence encodeSequence( Ticket[] tickets )
-	{
-		DERSequence outerVector = new DERSequence();
-
-		for ( int ii = 0; ii < tickets.length; ii++ )
-		{
-			DERSequence vector = new DERSequence();
-			vector.add( encode( tickets[ii] ) );
-			outerVector.add( vector );
-		}
-		
-		return outerVector;
-	}
-}
 
+    protected static DERSequence encodeSequence( Ticket[] tickets )
+    {
+        DERSequence outerVector = new DERSequence();
+
+        for ( int ii = 0; ii < tickets.length; ii++ )
+        {
+            DERSequence vector = new DERSequence();
+            vector.add( encode( tickets[ ii ] ) );
+            outerVector.add( vector );
+        }
+
+        return outerVector;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.io.encoder;
 
 import org.apache.asn1.der.DERInteger;
@@ -23,24 +22,22 @@
 import org.apache.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.TransitedEncoding;
 
-
 public class TransitedEncodingEncoder
 {
-	/**
-	 * TransitedEncoding ::=         SEQUENCE {
+    /**
+     * TransitedEncoding ::=         SEQUENCE {
      *     tr-type[0]  INTEGER, -- must be registered
      *     contents[1]          OCTET STRING
      * }
      */
-	protected static DERSequence encode( TransitedEncoding te )
-	{
-		
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( te.getType().getOrdinal() ) ) );
-		sequence.add( new DERTaggedObject( 1, new DEROctetString( te.getContents() ) ) );
-		
-		return sequence;
-	}
-}
+    protected static DERSequence encode( TransitedEncoding te )
+    {
 
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( te.getType().getOrdinal() ) ) );
+        sequence.add( new DERTaggedObject( 1, new DEROctetString( te.getContents() ) ) );
+
+        return sequence;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.jaas;
 
 import java.io.IOException;
@@ -25,42 +24,40 @@
 import javax.security.auth.callback.PasswordCallback;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
-
 public class CallbackHandlerBean implements CallbackHandler
 {
-	private String name;
-	private String password;
+    private String name;
+    private String password;
 
-	public CallbackHandlerBean( String name, String password )
-	{
-		this.name     = name;
-		this.password = password;
-	}
-
-	public void handle( Callback[] callbacks )
-			throws UnsupportedCallbackException, IOException
-	{
-		for ( int ii = 0; ii < callbacks.length; ii++ )
-		{
-			Callback callBack = callbacks[ii];
-
-			// Handles username callback.
-			if ( callBack instanceof NameCallback )
-			{
-				NameCallback nameCallback = (NameCallback) callBack;
-				nameCallback.setName(name);
-			// Handles password callback.
-			}
-			else if ( callBack instanceof PasswordCallback )
-			{
-				PasswordCallback passwordCallback = (PasswordCallback) callBack;
-				passwordCallback.setPassword( password.toCharArray() );
-			}
-			else
-			{
-				throw new UnsupportedCallbackException( callBack, "Callback not supported" );
-			}
-		}
-	}
+    public CallbackHandlerBean( String name, String password )
+    {
+        this.name = name;
+        this.password = password;
+    }
+
+    public void handle( Callback[] callbacks ) throws UnsupportedCallbackException, IOException
+    {
+        for ( int ii = 0; ii < callbacks.length; ii++ )
+        {
+            Callback callBack = callbacks[ ii ];
+
+            // Handles username callback.
+            if ( callBack instanceof NameCallback )
+            {
+                NameCallback nameCallback = (NameCallback) callBack;
+                nameCallback.setName( name );
+                // Handles password callback.
+            }
+            else
+                if ( callBack instanceof PasswordCallback )
+                {
+                    PasswordCallback passwordCallback = (PasswordCallback) callBack;
+                    passwordCallback.setPassword( password.toCharArray() );
+                }
+                else
+                {
+                    throw new UnsupportedCallbackException( callBack, "Callback not supported" );
+                }
+        }
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.jaas;
 
 import java.util.HashMap;
@@ -23,33 +22,31 @@
 import javax.security.auth.login.Configuration;
 import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
 
-
 public class Krb5LoginConfiguration extends Configuration
 {
-	private static AppConfigurationEntry[] configList = new AppConfigurationEntry[1];
-	
-	public Krb5LoginConfiguration()
+    private static AppConfigurationEntry[] configList = new AppConfigurationEntry[ 1 ];
+
+    public Krb5LoginConfiguration()
     {
-		String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
-		LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
-		configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
-	}
-
-	/**
-	 * Interface method requiring us to return all the LoginModules we know about.
-	 */
-	public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
+        String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
+        LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
+        configList[ 0 ] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
+    }
+
+    /**
+     * Interface method requiring us to return all the LoginModules we know about.
+     */
+    public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
     {
-		// We will ignore the applicationName, since we want all apps to use Kerberos V5
-		return configList;
-	}
-
-	/**
-	 * Interface method for reloading the configuration.  We don't need this.
-	 */
-	public void refresh()
+        // We will ignore the applicationName, since we want all apps to use Kerberos V5
+        return configList;
+    }
+
+    /**
+     * Interface method for reloading the configuration.  We don't need this.
+     */
+    public void refresh()
     {
-		// Right now this is a load once scheme and we will not implement the refresh method
-	}
+        // Right now this is a load once scheme and we will not implement the refresh method
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ApplicationRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ApplicationRequest.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ApplicationRequest.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ApplicationRequest.java Tue Aug 30 13:02:20 2005
@@ -16,67 +16,88 @@
  */
 package org.apache.kerberos.messages;
 
-import org.apache.kerberos.messages.components.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.components.Authenticator;
+import org.apache.kerberos.messages.components.Ticket;
+import org.apache.kerberos.messages.value.ApOptions;
+import org.apache.kerberos.messages.value.EncryptedData;
 
-public class ApplicationRequest extends KerberosMessage {
+public class ApplicationRequest extends KerberosMessage
+{
+    private ApOptions apOptions;
+    private Ticket ticket;
+    private EncryptedData encPart;
+    private Authenticator authenticator;
 
-	private ApOptions     _apOptions;
-	private Ticket        _ticket;
-	private EncryptedData _encPart;
-	private Authenticator _authenticator;
-	
-	/**
-	 * Class constructors
-	 */
-	public ApplicationRequest() {
-		super(MessageType.KRB_AP_REQ);
-		// used by ASN1 decoder
-	}
-	
-	public ApplicationRequest(ApOptions apOptions, Ticket ticket, EncryptedData encPart) {
-		super(MessageType.KRB_AP_REQ);
-		_apOptions = apOptions;
-		_ticket    = ticket;
-		_encPart   = encPart;
-	}
-	
-	public ApOptions getApOptions() {
-		return _apOptions;
-	}
-	public Authenticator getAuthenticator() {
-		return _authenticator;
-	}
-	public Ticket getTicket() {
-		return _ticket;
-	}
-	
-	// delegate ApOptions methods
-	public boolean getOption(int option) {
-		return _apOptions.get(option);
-	}
-	public void setOption(int option) {
-		_apOptions.set(option);
-	}
-	public void clearOption(int option) {
-		_apOptions.clear(option);
-	}
-	
-	public EncryptedData getEncPart() {
-		return _encPart;
-	}
-	public void setEncPart(EncryptedData data) {
-		_encPart = data;
-	}
-	
-	public void setApOptions(ApOptions options) {
-		_apOptions = options;
-	}
-	public void setAuthenticator(Authenticator authenticator) {
-		_authenticator = authenticator;
-	}
-	public void setTicket(Ticket ticket) {
-		_ticket = ticket;
-	}
-}
+    /**
+     * Class constructors
+     */
+    public ApplicationRequest()
+    {
+        super( MessageType.KRB_AP_REQ );
+        // used by ASN1 decoder
+    }
+
+    public ApplicationRequest( ApOptions apOptions, Ticket ticket, EncryptedData encPart )
+    {
+        super( MessageType.KRB_AP_REQ );
+        this.apOptions = apOptions;
+        this.ticket = ticket;
+        this.encPart = encPart;
+    }
+
+    public ApOptions getApOptions()
+    {
+        return apOptions;
+    }
+
+    public Authenticator getAuthenticator()
+    {
+        return authenticator;
+    }
+
+    public Ticket getTicket()
+    {
+        return ticket;
+    }
+
+    // delegate ApOptions methods
+    public boolean getOption( int option )
+    {
+        return apOptions.get( option );
+    }
+
+    public void setOption( int option )
+    {
+        apOptions.set( option );
+    }
 
+    public void clearOption( int option )
+    {
+        apOptions.clear( option );
+    }
+
+    public EncryptedData getEncPart()
+    {
+        return encPart;
+    }
+
+    public void setEncPart( EncryptedData data )
+    {
+        encPart = data;
+    }
+
+    public void setApOptions( ApOptions options )
+    {
+        apOptions = options;
+    }
+
+    public void setAuthenticator( Authenticator authenticator )
+    {
+        this.authenticator = authenticator;
+    }
+
+    public void setTicket( Ticket ticket )
+    {
+        this.ticket = ticket;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/AuthenticationReply.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/AuthenticationReply.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/AuthenticationReply.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/AuthenticationReply.java Tue Aug 30 13:02:20 2005
@@ -16,23 +16,25 @@
  */
 package org.apache.kerberos.messages;
 
-import org.apache.kerberos.messages.components.*;
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.components.Ticket;
+import org.apache.kerberos.messages.value.EncryptedData;
+import org.apache.kerberos.messages.value.PreAuthenticationData;
 
-public class AuthenticationReply extends KdcReply {
-	
-	/**
-	 * Class constructors
-	 */
-	public AuthenticationReply() {
-		super(MessageType.KRB_AS_REP);
-	}
-	
-	public AuthenticationReply(PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal,
-			Ticket ticket, EncryptedData encPart) {
-		super(paData, clientPrincipal, ticket, encPart, MessageType.KRB_AS_REP);
-	}
-}
+public class AuthenticationReply extends KdcReply
+{
+    /**
+     * Class constructors
+     */
+    public AuthenticationReply()
+    {
+        super( MessageType.KRB_AS_REP );
+    }
 
+    public AuthenticationReply( PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal,
+            Ticket ticket, EncryptedData encPart )
+    {
+        super( paData, clientPrincipal, ticket, encPart, MessageType.KRB_AS_REP );
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessage.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessage.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessage.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessage.java Tue Aug 30 13:02:20 2005
@@ -14,14 +14,12 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.kerberos.messages.value.KerberosTime;
 
-
 public class ErrorMessage extends KerberosMessage
 {
 	private KerberosTime      clientTime;        //optional
@@ -33,8 +31,7 @@
 	private KerberosPrincipal serverPrincipal;
 	private String            explanatoryText;   //optional
 	private byte[]            explanatoryData;   //optional
-	
-	
+
 	public ErrorMessage( KerberosTime clientTime, Integer clientMicroSecond, KerberosTime serverTime,
 	        int serverMicroSecond, int errorCode, KerberosPrincipal clientPrincipal,
 	        KerberosPrincipal serverPrincipal, String explanatoryText, byte[] explanatoryData )
@@ -51,51 +48,49 @@
 		this.explanatoryText   = explanatoryText;
 		this.explanatoryData   = explanatoryData;
 	}
-	
-	
+
 	public KerberosPrincipal getClientPrincipal()
-	{
-		return clientPrincipal;
-	}
-	
-	public KerberosTime getClientTime()
-	{
-		return clientTime;
-	}
-	
-	public Integer getClientMicroSecond()
-	{
-		return clientMicroSecond;
-	}
-	
-	public byte[] getExplanatoryData()
-	{
-		return explanatoryData;
-	}
-	
-	public int getErrorCode()
-	{
-		return errorCode;
-	}
-	
-	public String getExplanatoryText()
-	{
-		return explanatoryText;
-	}
-	
-	public KerberosPrincipal getServerPrincipal()
-	{
-		return serverPrincipal;
-	}
-	
-	public KerberosTime getServerTime()
-	{
-		return serverTime;
-	}
-	
-	public int getServerMicroSecond()
-	{
-		return serverMicroSecond;
-	}
+    {
+        return clientPrincipal;
+    }
+
+    public KerberosTime getClientTime()
+    {
+        return clientTime;
+    }
+
+    public Integer getClientMicroSecond()
+    {
+        return clientMicroSecond;
+    }
+
+    public byte[] getExplanatoryData()
+    {
+        return explanatoryData;
+    }
+
+    public int getErrorCode()
+    {
+        return errorCode;
+    }
+
+    public String getExplanatoryText()
+    {
+        return explanatoryText;
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return serverPrincipal;
+    }
+
+    public KerberosTime getServerTime()
+    {
+        return serverTime;
+    }
+
+    public int getServerMicroSecond()
+    {
+        return serverMicroSecond;
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessageModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessageModifier.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessageModifier.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/ErrorMessageModifier.java Tue Aug 30 13:02:20 2005
@@ -14,14 +14,12 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.kerberos.messages.value.KerberosTime;
 
-
 public class ErrorMessageModifier
 {
 	private KerberosTime      clientTime;        //optional
@@ -33,58 +31,55 @@
 	private KerberosPrincipal serverPrincipal;
 	private String            explanatoryText;   //optional
 	private byte[]            explanatoryData;   //optional
-	
-	
+
 	public ErrorMessage getErrorMessage()
-	{
-		return new ErrorMessage( clientTime, clientMicroSecond, serverTime, serverMicroSecond,
-		        errorCode, clientPrincipal, serverPrincipal, explanatoryText, explanatoryData );
-	}
-	
-	
-	public void setClientPrincipal( KerberosPrincipal principal )
-	{
-		this.clientPrincipal = principal;
-	}
-	
-	public void setClientTime( KerberosTime time )
-	{
-		this.clientTime = time;
-	}
-	
-	public void setClientMicroSecond( Integer clientMicroSecond )
-	{
-		this.clientMicroSecond = clientMicroSecond;
-	}
-	
-	public void setExplanatoryData( byte[] data )
-	{
-		this.explanatoryData = data;
-	}
-	
-	public void setErrorCode( int code )
-	{
-		this.errorCode = code;
-	}
-	
-	public void setExplanatoryText( String text )
-	{
-		this.explanatoryText = text;
-	}
-	
-	public void setServerPrincipal( KerberosPrincipal principal )
-	{
-		this.serverPrincipal = principal;
-	}
-	
-	public void setServerTime( KerberosTime time )
-	{
-		this.serverTime = time;
-	}
-	
-	public void setServerMicroSecond( int serverMicroSecond )
-	{
-		this.serverMicroSecond = serverMicroSecond;
-	}	
+    {
+        return new ErrorMessage( clientTime, clientMicroSecond, serverTime, serverMicroSecond,
+                errorCode, clientPrincipal, serverPrincipal, explanatoryText, explanatoryData );
+    }
+
+    public void setClientPrincipal( KerberosPrincipal principal )
+    {
+        this.clientPrincipal = principal;
+    }
+
+    public void setClientTime( KerberosTime time )
+    {
+        this.clientTime = time;
+    }
+
+    public void setClientMicroSecond( Integer clientMicroSecond )
+    {
+        this.clientMicroSecond = clientMicroSecond;
+    }
+
+    public void setExplanatoryData( byte[] data )
+    {
+        this.explanatoryData = data;
+    }
+
+    public void setErrorCode( int code )
+    {
+        this.errorCode = code;
+    }
+
+    public void setExplanatoryText( String text )
+    {
+        this.explanatoryText = text;
+    }
+
+    public void setServerPrincipal( KerberosPrincipal principal )
+    {
+        this.serverPrincipal = principal;
+    }
+
+    public void setServerTime( KerberosTime time )
+    {
+        this.serverTime = time;
+    }
+
+    public void setServerMicroSecond( int serverMicroSecond )
+    {
+        this.serverMicroSecond = serverMicroSecond;
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcReply.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcReply.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcReply.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcReply.java Tue Aug 30 13:02:20 2005
@@ -16,139 +16,208 @@
  */
 package org.apache.kerberos.messages;
 
-import org.apache.kerberos.messages.components.*;
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.components.EncKdcRepPart;
+import org.apache.kerberos.messages.components.Ticket;
+import org.apache.kerberos.messages.value.EncryptedData;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.LastRequest;
+import org.apache.kerberos.messages.value.PreAuthenticationData;
+import org.apache.kerberos.messages.value.TicketFlags;
 
-public class KdcReply extends KerberosMessage {
-
-	private PreAuthenticationData[] _paData;  //optional
-	private KerberosPrincipal       _clientPrincipal;
-	private Ticket                  _ticket;
+public class KdcReply extends KerberosMessage
+{
+	private PreAuthenticationData[] paData;  //optional
+	private KerberosPrincipal       clientPrincipal;
+	private Ticket                  ticket;
 	
-	private EncKdcRepPart _encKDCRepPart = new EncKdcRepPart();
-	private EncryptedData _encPart;
+	private EncKdcRepPart encKDCRepPart = new EncKdcRepPart();
+	private EncryptedData encPart;
 
-	public KdcReply(MessageType msgType) {
-		super(msgType);
-	}
-	
-	public KdcReply(PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal,
-			Ticket ticket, EncryptedData encPart, MessageType msgType) {
-		
-		this(msgType);
-		_paData          = paData;
-		_clientPrincipal = clientPrincipal;
-		_ticket          = ticket;
-		_encPart         = encPart;
-	}
-	
-	// getters
-	public KerberosPrincipal getClientPrincipal() {
-		return _clientPrincipal;
-	}
-	public String getClientRealm() {
-		return _clientPrincipal.getRealm();
-	}
-	public EncryptedData getEncPart() {
-		return _encPart;
-	}
-	public PreAuthenticationData[] getPaData() {
-		return _paData;
-	}
-	public Ticket getTicket() {
-		return _ticket;
-	}
-	
-	// setters
-	public void setClientPrincipal(KerberosPrincipal clientPrincipal) {
-		_clientPrincipal = clientPrincipal;
-	}
-	public void setEncKDCRepPart(EncKdcRepPart repPart) {
-		_encKDCRepPart = repPart;
-	}
-	public void setEncPart(EncryptedData part) {
-		_encPart = part;
-	}
-	public void setPaData(PreAuthenticationData[] data) {
-		_paData = data;
-	}
-	public void setTicket(Ticket ticket) {
-		_ticket = ticket;
-	}
-	
-	// EncKdcRepPart delegate getters
-	public KerberosTime getAuthTime() {
-		return _encKDCRepPart.getAuthTime();
-	}
-	public HostAddresses getClientAddresses() {
-		return _encKDCRepPart.getClientAddresses();
-	}
-	public KerberosTime getEndTime() {
-		return _encKDCRepPart.getEndTime();
-	}
-	public TicketFlags getFlags() {
-		return _encKDCRepPart.getFlags();
-	}
-	public EncryptionKey getKey() {
-		return _encKDCRepPart.getKey();
-	}
-	public KerberosTime getKeyExpiration() {
-		return _encKDCRepPart.getKeyExpiration();
-	}
-	public LastRequest getLastRequest() {
-		return _encKDCRepPart.getLastRequest();
-	}
-	public int getNonce() {
-		return _encKDCRepPart.getNonce();
-	}
-	public KerberosTime getRenewTill() {
-		return _encKDCRepPart.getRenewTill();
-	}
-	public KerberosPrincipal getServerPrincipal() {
-		return _encKDCRepPart.getServerPrincipal();
-	}
-	public String getServerRealm() {
-		return _encKDCRepPart.getServerRealm();
-	}
-	public KerberosTime getStartTime() {
-		return _encKDCRepPart.getStartTime();
-	}
-	
-	// EncKdcRepPart delegate setters
-	public void setAuthTime(KerberosTime time) {
-		_encKDCRepPart.setAuthTime(time);
-	}
-	public void setClientAddresses(HostAddresses addresses) {
-		_encKDCRepPart.setClientAddresses(addresses);
-	}
-	public void setEndTime(KerberosTime time) {
-		_encKDCRepPart.setEndTime(time);
-	}
-	public void setFlags(TicketFlags flags) {
-		_encKDCRepPart.setFlags(flags);
-	}
-	public void setKey(EncryptionKey key) {
-		_encKDCRepPart.setKey(key);
-	}
-	public void setKeyExpiration(KerberosTime expiration) {
-		_encKDCRepPart.setKeyExpiration(expiration);
-	}
-	public void setLastRequest(LastRequest request) {
-		_encKDCRepPart.setLastRequest(request);
-	}
-	public void setNonce(int nonce) {
-		_encKDCRepPart.setNonce(nonce);
-	}
-	public void setRenewTill(KerberosTime till) {
-		_encKDCRepPart.setRenewTill(till);
-	}
-	public void setServerPrincipal(KerberosPrincipal principal) {
-		_encKDCRepPart.setServerPrincipal(principal);
-	}
-	public void setStartTime(KerberosTime time) {
-		_encKDCRepPart.setStartTime(time);
-	}
-}
+	public KdcReply( MessageType msgType )
+    {
+        super( msgType );
+    }
+
+    public KdcReply( PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal,
+            Ticket ticket, EncryptedData encPart, MessageType msgType )
+    {
+        this( msgType );
+        this.paData = paData;
+        this.clientPrincipal = clientPrincipal;
+        this.ticket = ticket;
+        this.encPart = encPart;
+    }
+
+    // getters
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public String getClientRealm()
+    {
+        return clientPrincipal.getRealm();
+    }
+
+    public EncryptedData getEncPart()
+    {
+        return encPart;
+    }
+
+    public PreAuthenticationData[] getPaData()
+    {
+        return paData;
+    }
+
+    public Ticket getTicket()
+    {
+        return ticket;
+    }
+
+    // setters
+    public void setClientPrincipal( KerberosPrincipal clientPrincipal )
+    {
+        this.clientPrincipal = clientPrincipal;
+    }
+
+    public void setEncKDCRepPart( EncKdcRepPart repPart )
+    {
+        encKDCRepPart = repPart;
+    }
+
+    public void setEncPart( EncryptedData part )
+    {
+        encPart = part;
+    }
+
+    public void setPaData( PreAuthenticationData[] data )
+    {
+        paData = data;
+    }
+
+    public void setTicket( Ticket ticket )
+    {
+        this.ticket = ticket;
+    }
+
+    // EncKdcRepPart delegate getters
+    public KerberosTime getAuthTime()
+    {
+        return encKDCRepPart.getAuthTime();
+    }
+
+    public HostAddresses getClientAddresses()
+    {
+        return encKDCRepPart.getClientAddresses();
+    }
+
+    public KerberosTime getEndTime()
+    {
+        return encKDCRepPart.getEndTime();
+    }
 
+    public TicketFlags getFlags()
+    {
+        return encKDCRepPart.getFlags();
+    }
+
+    public EncryptionKey getKey()
+    {
+        return encKDCRepPart.getKey();
+    }
+
+    public KerberosTime getKeyExpiration()
+    {
+        return encKDCRepPart.getKeyExpiration();
+    }
+
+    public LastRequest getLastRequest()
+    {
+        return encKDCRepPart.getLastRequest();
+    }
+
+    public int getNonce()
+    {
+        return encKDCRepPart.getNonce();
+    }
+
+    public KerberosTime getRenewTill()
+    {
+        return encKDCRepPart.getRenewTill();
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return encKDCRepPart.getServerPrincipal();
+    }
+
+    public String getServerRealm()
+    {
+        return encKDCRepPart.getServerRealm();
+    }
+
+    public KerberosTime getStartTime()
+    {
+        return encKDCRepPart.getStartTime();
+    }
+
+    // EncKdcRepPart delegate setters
+    public void setAuthTime( KerberosTime time )
+    {
+        encKDCRepPart.setAuthTime( time );
+    }
+
+    public void setClientAddresses( HostAddresses addresses )
+    {
+        encKDCRepPart.setClientAddresses( addresses );
+    }
+
+    public void setEndTime( KerberosTime time )
+    {
+        encKDCRepPart.setEndTime( time );
+    }
+
+    public void setFlags( TicketFlags flags )
+    {
+        encKDCRepPart.setFlags( flags );
+    }
+
+    public void setKey( EncryptionKey key )
+    {
+        encKDCRepPart.setKey( key );
+    }
+
+    public void setKeyExpiration( KerberosTime expiration )
+    {
+        encKDCRepPart.setKeyExpiration( expiration );
+    }
+
+    public void setLastRequest( LastRequest request )
+    {
+        encKDCRepPart.setLastRequest( request );
+    }
+
+    public void setNonce( int nonce )
+    {
+        encKDCRepPart.setNonce( nonce );
+    }
+
+    public void setRenewTill( KerberosTime till )
+    {
+        encKDCRepPart.setRenewTill( till );
+    }
+
+    public void setServerPrincipal( KerberosPrincipal principal )
+    {
+        encKDCRepPart.setServerPrincipal( principal );
+    }
+
+    public void setStartTime( KerberosTime time )
+    {
+        encKDCRepPart.setStartTime( time );
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KdcRequest.java Tue Aug 30 13:02:20 2005
@@ -16,91 +16,109 @@
  */
 package org.apache.kerberos.messages;
 
+import javax.security.auth.kerberos.KerberosPrincipal;
+
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 import org.apache.kerberos.messages.components.Ticket;
-import org.apache.kerberos.messages.value.*;
-
-import javax.security.auth.kerberos.KerberosPrincipal;
+import org.apache.kerberos.messages.value.EncryptedData;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KdcOptions;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.PreAuthenticationData;
+import org.apache.kerberos.messages.value.RequestBody;
 
 public class KdcRequest extends KerberosMessage
 {
-	private PreAuthenticationData[] preAuthData; //optional
-	private RequestBody             requestBody;
-	
-	public KdcRequest(int pvno, MessageType messageType, PreAuthenticationData[] preAuthData, RequestBody requestBody)
-    {
-		super(pvno, messageType);
-		this.preAuthData = preAuthData;
-		this.requestBody = requestBody;
-	}
-
-	public PreAuthenticationData[] getPreAuthData()
-    {
-		return preAuthData;
-	}
-
-	// RequestBody delegate methods
-	public Ticket[] getAdditionalTickets()
-    {
-		return requestBody.getAdditionalTickets();
-	}
-	public HostAddresses getAddresses()
-    {
-		return requestBody.getAddresses();
-	}
-	public KerberosPrincipal getClientPrincipal()
-    {
-		return requestBody.getClientPrincipal();
-	}
-	public String getRealm()
-    {
-		return requestBody.getServerPrincipal().getRealm();
-	}
-	public EncryptedData getEncAuthorizationData()
-    {
-		return requestBody.getEncAuthorizationData();
-	}
-	public EncryptionType[] getEType()
-    {
-		return requestBody.getEType();
-	}
-	public KerberosTime getFrom()
-    {
-		return requestBody.getFrom();
-	}
-	public KdcOptions getKdcOptions()
-    {
-		return requestBody.getKdcOptions();
-	}
-	public int getNonce()
-    {
-		return requestBody.getNonce();
-	}
-	public KerberosTime getRtime()
-    {
-		return requestBody.getRtime();
-	}
-	public KerberosPrincipal getServerPrincipal()
-    {
-		return requestBody.getServerPrincipal();
-	}
-	public KerberosTime getTill()
-    {
-		return requestBody.getTill();
-	}
-	
-	// RequestBody KdcOptions delegate accesors
-	public boolean getOption(int option)
-    {
-		return requestBody.getKdcOptions().get(option);
-	}
-	public void setOption(int option)
-    {
-		requestBody.getKdcOptions().set(option);
-	}
-	public void clearOption(int option)
+    private PreAuthenticationData[] preAuthData; //optional
+    private RequestBody requestBody;
+
+    public KdcRequest( int pvno, MessageType messageType, PreAuthenticationData[] preAuthData,
+            RequestBody requestBody )
     {
-		requestBody.getKdcOptions().clear(option);
-	}
-}
+        super( pvno, messageType );
+        this.preAuthData = preAuthData;
+        this.requestBody = requestBody;
+    }
+
+    public PreAuthenticationData[] getPreAuthData()
+    {
+        return preAuthData;
+    }
+
+    // RequestBody delegate methods
+    public Ticket[] getAdditionalTickets()
+    {
+        return requestBody.getAdditionalTickets();
+    }
+
+    public HostAddresses getAddresses()
+    {
+        return requestBody.getAddresses();
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return requestBody.getClientPrincipal();
+    }
+
+    public String getRealm()
+    {
+        return requestBody.getServerPrincipal().getRealm();
+    }
+
+    public EncryptedData getEncAuthorizationData()
+    {
+        return requestBody.getEncAuthorizationData();
+    }
+
+    public EncryptionType[] getEType()
+    {
+        return requestBody.getEType();
+    }
+
+    public KerberosTime getFrom()
+    {
+        return requestBody.getFrom();
+    }
+
+    public KdcOptions getKdcOptions()
+    {
+        return requestBody.getKdcOptions();
+    }
 
+    public int getNonce()
+    {
+        return requestBody.getNonce();
+    }
+
+    public KerberosTime getRtime()
+    {
+        return requestBody.getRtime();
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return requestBody.getServerPrincipal();
+    }
+
+    public KerberosTime getTill()
+    {
+        return requestBody.getTill();
+    }
+
+    // RequestBody KdcOptions delegate accesors
+    public boolean getOption( int option )
+    {
+        return requestBody.getKdcOptions().get( option );
+    }
+
+    public void setOption( int option )
+    {
+        requestBody.getKdcOptions().set( option );
+    }
+
+    public void clearOption( int option )
+    {
+        requestBody.getKdcOptions().clear( option );
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KerberosMessage.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KerberosMessage.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KerberosMessage.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/KerberosMessage.java Tue Aug 30 13:02:20 2005
@@ -16,34 +16,42 @@
  */
 package org.apache.kerberos.messages;
 
-public class KerberosMessage {
-	
+public class KerberosMessage
+{
     // Kerberos protocol version number
 	public static final int PVNO = 5;
+
+	private int         protocolVersionNumber;
+	private MessageType messageType;
 	
-	private int         _protocolVersionNumber;
-	private MessageType _messageType;
-	
-	public KerberosMessage(MessageType type) {
-		this(PVNO, type);
-	}
-	
-	public KerberosMessage(int versionNumber, MessageType type) {
-		_protocolVersionNumber = versionNumber;
-		_messageType           = type;
-	}
-	
-	public MessageType getMessageType() {
-		return _messageType;
-	}
-	public void setMessageType(MessageType type) {
-		_messageType = type;
-	}
-	public int getProtocolVersionNumber() {
-		return _protocolVersionNumber;
-	}
-	public void setProtocolVersionNumber(int versionNumber) {
-		_protocolVersionNumber = versionNumber;
-	}
-}
+	public KerberosMessage( MessageType type )
+    {
+        this( PVNO, type );
+    }
 
+    public KerberosMessage( int versionNumber, MessageType type )
+    {
+        protocolVersionNumber = versionNumber;
+        messageType = type;
+    }
+
+    public MessageType getMessageType()
+    {
+        return messageType;
+    }
+
+    public void setMessageType( MessageType type )
+    {
+        messageType = type;
+    }
+
+    public int getProtocolVersionNumber()
+    {
+        return protocolVersionNumber;
+    }
+
+    public void setProtocolVersionNumber( int versionNumber )
+    {
+        protocolVersionNumber = versionNumber;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/MessageType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/MessageType.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/MessageType.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/MessageType.java Tue Aug 30 13:02:20 2005
@@ -14,14 +14,12 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages;
 
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-
 public final class MessageType implements Comparable
 {
 	/**
@@ -94,4 +92,3 @@
 		return ordinal;
 	}
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/TicketGrantReply.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/TicketGrantReply.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/TicketGrantReply.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/TicketGrantReply.java Tue Aug 30 13:02:20 2005
@@ -16,23 +16,25 @@
  */
 package org.apache.kerberos.messages;
 
-import org.apache.kerberos.messages.components.*;
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.components.Ticket;
+import org.apache.kerberos.messages.value.EncryptedData;
+import org.apache.kerberos.messages.value.PreAuthenticationData;
 
-public class TicketGrantReply extends KdcReply {
+public class TicketGrantReply extends KdcReply
+{
+    /**
+     * Class constructors
+     */
+    public TicketGrantReply()
+    {
+        super( MessageType.KRB_TGS_REP );
+    }
 
-	/**
-	 * Class constructors
-	 */
-	public TicketGrantReply() {
-		super(MessageType.KRB_TGS_REP);
-	}
-	
-	public TicketGrantReply(PreAuthenticationData[] pAData, KerberosPrincipal clientPrincipal,
-			Ticket ticket, EncryptedData encPart) {
-		super(pAData, clientPrincipal, ticket, encPart, MessageType.KRB_TGS_REP);
-	}
+    public TicketGrantReply( PreAuthenticationData[] pAData, KerberosPrincipal clientPrincipal,
+            Ticket ticket, EncryptedData encPart )
+    {
+        super( pAData, clientPrincipal, ticket, encPart, MessageType.KRB_TGS_REP );
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/ApplicationReply.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/ApplicationReply.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/ApplicationReply.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/ApplicationReply.java Tue Aug 30 13:02:20 2005
@@ -16,20 +16,22 @@
  */
 package org.apache.kerberos.messages.application;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.value.EncryptedData;
 
-public class ApplicationReply extends KerberosMessage {
+public class ApplicationReply extends KerberosMessage
+{
+    private EncryptedData encryptedPart;
 
-	private EncryptedData _encryptedPart;
+    public ApplicationReply( EncryptedData encPart )
+    {
+        super( MessageType.KRB_AP_REP );
+        encryptedPart = encPart;
+    }
 
-	public ApplicationReply(EncryptedData encPart) {
-		super(MessageType.KRB_AP_REP);
-		_encryptedPart = encPart;
-	}
-	
-	public EncryptedData getEncPart() {
-		return _encryptedPart;
-	}
+    public EncryptedData getEncPart()
+    {
+        return encryptedPart;
+    }
 }
-

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/CredentialMessage.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/CredentialMessage.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/CredentialMessage.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/CredentialMessage.java Tue Aug 30 13:02:20 2005
@@ -16,26 +16,30 @@
  */
 package org.apache.kerberos.messages.application;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.components.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.components.Ticket;
+import org.apache.kerberos.messages.value.EncryptedData;
 
-public class CredentialMessage extends KerberosMessage {
+public class CredentialMessage extends KerberosMessage
+{
+    private EncryptedData encPart;
+    private Ticket[]      tickets;
 
-	private EncryptedData _encPart;
-	private Ticket[]      _tickets;
+    public CredentialMessage( EncryptedData encPart, Ticket[] tickets )
+    {
+        super( MessageType.KRB_CRED );
+        this.encPart = encPart;
+        this.tickets = tickets;
+    }
 
-	public CredentialMessage(EncryptedData encPart, Ticket[] tickets) {
-		super(MessageType.KRB_CRED);
-		_encPart = encPart;
-		_tickets = tickets;
-	}
-	
-	public EncryptedData getEncPart() {
-		return _encPart;
-	}
-	public Ticket[] getTickets() {
-		return _tickets;
-	}
-}
+    public EncryptedData getEncPart()
+    {
+        return encPart;
+    }
 
+    public Ticket[] getTickets()
+    {
+        return tickets;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/PrivateMessage.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/PrivateMessage.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/PrivateMessage.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/PrivateMessage.java Tue Aug 30 13:02:20 2005
@@ -16,29 +16,33 @@
  */
 package org.apache.kerberos.messages.application;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.value.EncryptedData;
 
-public class PrivateMessage extends KerberosMessage {
+public class PrivateMessage extends KerberosMessage
+{
+    private EncryptedData encryptedPart;
 
-	private EncryptedData _encryptedPart;
-	
-	public PrivateMessage() {
-		super(MessageType.KRB_PRIV);
-		// used by ASN.1 decoder
-	}
+    public PrivateMessage()
+    {
+        super( MessageType.KRB_PRIV );
+        // used by ASN.1 decoder
+    }
 
-	public PrivateMessage(EncryptedData encryptedPart) {
-		super(MessageType.KRB_PRIV);
-		_encryptedPart = encryptedPart;
-	}
-	
-	public EncryptedData getEncryptedPart() {
-		return _encryptedPart;
-	}
-	
-	public void setEncryptedPart(EncryptedData encryptedData) {
-		_encryptedPart = encryptedData;
-	}
-}
+    public PrivateMessage( EncryptedData encryptedPart )
+    {
+        super( MessageType.KRB_PRIV );
+        this.encryptedPart = encryptedPart;
+    }
+
+    public EncryptedData getEncryptedPart()
+    {
+        return encryptedPart;
+    }
 
+    public void setEncryptedPart( EncryptedData encryptedData )
+    {
+        encryptedPart = encryptedData;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeBody.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeBody.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeBody.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeBody.java Tue Aug 30 13:02:20 2005
@@ -16,48 +16,59 @@
  */
 package org.apache.kerberos.messages.application;
 
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.value.HostAddress;
+import org.apache.kerberos.messages.value.KerberosTime;
 
-public class SafeBody {
+public class SafeBody
+{
+    private byte[]       userData;
+    private KerberosTime timestamp; //optional
+    private Integer      usec; //optional
+    private Integer      seqNumber; //optional
+    private HostAddress  sAddress; //optional
+    private HostAddress  rAddress; //optional
 
-	private byte[]       _userData;
-	private KerberosTime _timestamp; //optional
-	private Integer      _usec;      //optional
-	private Integer      _seqNumber; //optional
-	private HostAddress  _sAddress;  //optional
-	private HostAddress  _rAddress;  //optional
-
-	/**
-	 * Class constructor
-	 */
-	public SafeBody(byte[] userData, KerberosTime timestamp, Integer usec, Integer seqNumber,
-			HostAddress sAddress, HostAddress rAddress) {
-		
-		_userData  = userData;
-		_timestamp = timestamp;
-		_usec      = usec;
-		_seqNumber = seqNumber;
-		_sAddress  = sAddress;
-		_rAddress  = rAddress;
-	}
-	
-	public HostAddress getRAddress() {
-		return _rAddress;
-	}
-	public HostAddress getSAddress() {
-		return _sAddress;
-	}
-	public Integer getSeqNumber() {
-		return _seqNumber;
-	}
-	public KerberosTime getTimestamp() {
-		return _timestamp;
-	}
-	public Integer getUsec() {
-		return _usec;
-	}
-	public byte[] getUserData() {
-		return _userData;
-	}
-}
+    /**
+     * Class constructor
+     */
+    public SafeBody( byte[] userData, KerberosTime timestamp, Integer usec, Integer seqNumber,
+            HostAddress sAddress, HostAddress rAddress )
+    {
+        this.userData  = userData;
+        this.timestamp = timestamp;
+        this.usec      = usec;
+        this.seqNumber = seqNumber;
+        this.sAddress  = sAddress;
+        this.rAddress  = rAddress;
+    }
+
+    public HostAddress getRAddress()
+    {
+        return rAddress;
+    }
+
+    public HostAddress getSAddress()
+    {
+        return sAddress;
+    }
+
+    public Integer getSeqNumber()
+    {
+        return seqNumber;
+    }
 
+    public KerberosTime getTimestamp()
+    {
+        return timestamp;
+    }
+
+    public Integer getUsec()
+    {
+        return usec;
+    }
+
+    public byte[] getUserData()
+    {
+        return userData;
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeMessage.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeMessage.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeMessage.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/application/SafeMessage.java Tue Aug 30 13:02:20 2005
@@ -16,42 +16,57 @@
  */
 package org.apache.kerberos.messages.application;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.value.Checksum;
+import org.apache.kerberos.messages.value.HostAddress;
+import org.apache.kerberos.messages.value.KerberosTime;
 
-public class SafeMessage extends KerberosMessage {
+public class SafeMessage extends KerberosMessage
+{
+    private SafeBody safeBody;
+    private Checksum cksum;
 
-	private SafeBody _safeBody;
-	private Checksum _cksum;
+    public SafeMessage( SafeBody safeBody, Checksum cksum )
+    {
+        super( MessageType.KRB_SAFE );
+        this.safeBody = safeBody;
+        this.cksum = cksum;
+    }
 
-	public SafeMessage(SafeBody safeBody, Checksum cksum) {
-		super(MessageType.KRB_SAFE);
-		_safeBody = safeBody;
-		_cksum    = cksum;
-	}
-	
-	public Checksum getCksum() {
-		return _cksum;
-	}
-	
-	// SafeBody delegate methods
-	public HostAddress getRAddress() {
-		return _safeBody.getRAddress();
-	}
-	public HostAddress getSAddress() {
-		return _safeBody.getSAddress();
-	}
-	public Integer getSeqNumber() {
-		return _safeBody.getSeqNumber();
-	}
-	public KerberosTime getTimestamp() {
-		return _safeBody.getTimestamp();
-	}
-	public Integer getUsec() {
-		return _safeBody.getUsec();
-	}
-	public byte[] getUserData() {
-		return _safeBody.getUserData();
-	}
-}
+    public Checksum getCksum()
+    {
+        return cksum;
+    }
+
+    // SafeBody delegate methods
+    public HostAddress getRAddress()
+    {
+        return safeBody.getRAddress();
+    }
+
+    public HostAddress getSAddress()
+    {
+        return safeBody.getSAddress();
+    }
+
+    public Integer getSeqNumber()
+    {
+        return safeBody.getSeqNumber();
+    }
 
+    public KerberosTime getTimestamp()
+    {
+        return safeBody.getTimestamp();
+    }
+
+    public Integer getUsec()
+    {
+        return safeBody.getUsec();
+    }
+
+    public byte[] getUserData()
+    {
+        return safeBody.getUserData();
+    }
+}

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/components/Authenticator.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/components/Authenticator.java?rev=264844&r1=264843&r2=264844&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/components/Authenticator.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/messages/components/Authenticator.java Tue Aug 30 13:02:20 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.components;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
@@ -24,11 +23,10 @@
 import org.apache.kerberos.messages.value.EncryptionKey;
 import org.apache.kerberos.messages.value.KerberosTime;
 
-
 public class Authenticator
 {
 	public static final int AUTHENTICATOR_VNO = 5;
-	
+
 	private int               versionNumber;
 	private KerberosPrincipal clientPrincipal;
 	private Checksum          checksum;
@@ -37,67 +35,66 @@
 	private EncryptionKey     subSessionKey;
 	private int               sequenceNumber;
 	private AuthorizationData authorizationData;
-	
+
 	public Authenticator( KerberosPrincipal clientPrincipal, Checksum checksum,
-			int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
-			int sequenceNumber, AuthorizationData authorizationData )
-	{
-		this( AUTHENTICATOR_VNO, clientPrincipal, checksum, clientMicroSecond, clientTime,
-		 		subSessionKey, sequenceNumber, authorizationData );
-	}
-
-	public Authenticator( int versionNumber, KerberosPrincipal clientPrincipal, Checksum checksum,
-			int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey, int sequenceNumber,
-			AuthorizationData authorizationData )
-	{
-		this.versionNumber     = versionNumber;
-		this.clientPrincipal   = clientPrincipal;
-		this.checksum          = checksum;
-		this.clientMicroSecond = clientMicroSecond;
-		this.clientTime        = clientTime;
-		this.subSessionKey     = subSessionKey;
-		this.sequenceNumber    = sequenceNumber;
-		this.authorizationData = authorizationData;
-	}
-	
-	public KerberosPrincipal getClientPrincipal()
-	{
-		return clientPrincipal;
-	}
-	
-	public KerberosTime getClientTime()
-	{
-		return clientTime;
-	}
-	
-	public int getClientMicroSecond()
-	{
-		return clientMicroSecond;
-	}
-	
-	public AuthorizationData getAuthorizationData()
-	{
-		return authorizationData;
-	}
-	
-	public Checksum getChecksum()
-	{
-		return checksum;
-	}
-	
-	public int getSequenceNumber()
-	{
-		return sequenceNumber;
-	}
-	
-	public EncryptionKey getSubSessionKey()
-	{
-		return subSessionKey;
-	}
-	
-	public int getVersionNumber()
-	{
-		return versionNumber;
-	}
+            int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
+            int sequenceNumber, AuthorizationData authorizationData )
+    {
+        this( AUTHENTICATOR_VNO, clientPrincipal, checksum, clientMicroSecond, clientTime,
+                subSessionKey, sequenceNumber, authorizationData );
+    }
+
+    public Authenticator( int versionNumber, KerberosPrincipal clientPrincipal, Checksum checksum,
+            int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
+            int sequenceNumber, AuthorizationData authorizationData )
+    {
+        this.versionNumber     = versionNumber;
+        this.clientPrincipal   = clientPrincipal;
+        this.checksum          = checksum;
+        this.clientMicroSecond = clientMicroSecond;
+        this.clientTime        = clientTime;
+        this.subSessionKey     = subSessionKey;
+        this.sequenceNumber    = sequenceNumber;
+        this.authorizationData = authorizationData;
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public KerberosTime getClientTime()
+    {
+        return clientTime;
+    }
+
+    public int getClientMicroSecond()
+    {
+        return clientMicroSecond;
+    }
+
+    public AuthorizationData getAuthorizationData()
+    {
+        return authorizationData;
+    }
+
+    public Checksum getChecksum()
+    {
+        return checksum;
+    }
+
+    public int getSequenceNumber()
+    {
+        return sequenceNumber;
+    }
+
+    public EncryptionKey getSubSessionKey()
+    {
+        return subSessionKey;
+    }
+
+    public int getVersionNumber()
+    {
+        return versionNumber;
+    }
 }
-



Mime
View raw message