directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [23/38] - in /directory/sandbox/akarasulu/rc1/apacheds: core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/src/main/java/org/...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrincipalNameDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrincipalNameDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrincipalNameDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrincipalNameDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.util.Enumeration;
 
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -26,6 +27,7 @@
 import org.apache.kerberos.messages.value.PrincipalName;
 import org.apache.kerberos.messages.value.PrincipalNameModifier;
 
+
 public class PrincipalNameDecoder
 {
     /**
@@ -40,18 +42,18 @@
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger nameType = (DERInteger) derObject;
+                    DERInteger nameType = ( DERInteger ) derObject;
                     modifier.setType( nameType.intValue() );
                     break;
                 case 1:
-                    DERSequence nameString = (DERSequence) derObject;
+                    DERSequence nameString = ( DERSequence ) derObject;
                     decodeNameString( nameString, modifier );
                     break;
             }
@@ -60,11 +62,12 @@
         return modifier.getPrincipalName();
     }
 
+
     private static void decodeNameString( DERSequence sequence, PrincipalNameModifier modifier )
     {
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERGeneralString object = (DERGeneralString) e.nextElement();
+            DERGeneralString object = ( DERGeneralString ) e.nextElement();
             modifier.addName( object.getString() );
         }
     }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrivateMessageDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrivateMessageDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrivateMessageDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/PrivateMessageDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -28,41 +29,43 @@
 import org.apache.kerberos.messages.MessageType;
 import org.apache.kerberos.messages.application.PrivateMessage;
 
+
 public class PrivateMessageDecoder
 {
     public PrivateMessage decode( byte[] encodedPrivateMessage ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedPrivateMessage );
 
-        DERApplicationSpecific app = (DERApplicationSpecific) ais.readObject();
+        DERApplicationSpecific app = ( DERApplicationSpecific ) ais.readObject();
 
-        DERSequence privateMessage = (DERSequence) app.getObject();
+        DERSequence privateMessage = ( DERSequence ) app.getObject();
 
         return decodePrivateMessageSequence( privateMessage );
     }
 
+
     private PrivateMessage decodePrivateMessageSequence( DERSequence sequence )
     {
         PrivateMessage message = new PrivateMessage();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     message.setProtocolVersionNumber( tag0.intValue() );
                     break;
                 case 1:
-                    DERInteger tag1 = (DERInteger) derObject;
+                    DERInteger tag1 = ( DERInteger ) derObject;
                     message.setMessageType( MessageType.getTypeByOrdinal( tag1.intValue() ) );
                     break;
                 case 3:
-                    DERSequence tag3 = (DERSequence) derObject;
+                    DERSequence tag3 = ( DERSequence ) derObject;
                     message.setEncryptedPart( EncryptedDataDecoder.decode( tag3 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/TicketDecoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/TicketDecoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/TicketDecoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/decoder/TicketDecoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.decoder;
 
+
 import java.io.IOException;
 import java.util.Enumeration;
 
@@ -28,22 +29,24 @@
 import org.apache.kerberos.messages.components.Ticket;
 import org.apache.kerberos.messages.components.TicketModifier;
 
+
 public class TicketDecoder
 {
     public static Ticket[] decodeSequence( DERSequence sequence ) throws IOException
     {
-        Ticket[] tickets = new Ticket[ sequence.size() ];
+        Ticket[] tickets = new Ticket[sequence.size()];
 
         int ii = 0;
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERApplicationSpecific object = (DERApplicationSpecific) e.nextElement();
-            tickets[ ii ] = decode( object );
+            DERApplicationSpecific object = ( DERApplicationSpecific ) e.nextElement();
+            tickets[ii] = decode( object );
         }
 
         return tickets;
     }
 
+
     /**
      * Ticket ::=                    [APPLICATION 1] SEQUENCE {
      *     tkt-vno[0]                   INTEGER,
@@ -54,32 +57,32 @@
      */
     protected static Ticket decode( DERApplicationSpecific app ) throws IOException
     {
-        DERSequence sequence = (DERSequence) app.getObject();
+        DERSequence sequence = ( DERSequence ) app.getObject();
 
         TicketModifier modifier = new TicketModifier();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
-            DERTaggedObject object = (DERTaggedObject) e.nextElement();
+            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();
             DEREncodable derObject = object.getObject();
 
             switch ( tag )
             {
                 case 0:
-                    DERInteger tag0 = (DERInteger) derObject;
+                    DERInteger tag0 = ( DERInteger ) derObject;
                     modifier.setTicketVersionNumber( tag0.intValue() );
                     break;
                 case 1:
-                    DERGeneralString tag1 = (DERGeneralString) derObject;
+                    DERGeneralString tag1 = ( DERGeneralString ) derObject;
                     modifier.setServerRealm( tag1.getString() );
                     break;
                 case 2:
-                    DERSequence tag2 = (DERSequence) derObject;
+                    DERSequence tag2 = ( DERSequence ) derObject;
                     modifier.setServerName( PrincipalNameDecoder.decode( tag2 ) );
                     break;
                 case 3:
-                    DERSequence tag3 = (DERSequence) derObject;
+                    DERSequence tag3 = ( DERSequence ) derObject;
                     modifier.setEncPart( EncryptedDataDecoder.decode( tag3 ) );
                     break;
             }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ApplicationReplyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ApplicationReplyEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ApplicationReplyEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ApplicationReplyEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -26,10 +27,12 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.application.ApplicationReply;
 
+
 public class ApplicationReplyEncoder
 {
     public static final int APPLICATION_CODE = 15;
 
+
     public byte[] encode( ApplicationReply reply ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -41,6 +44,7 @@
 
         return baos.toByteArray();
     }
+
 
     private DERSequence encodeReplySequence( ApplicationReply message )
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/AuthorizationDataEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/AuthorizationDataEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/AuthorizationDataEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/AuthorizationDataEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.util.Iterator;
 
 import org.apache.directory.shared.asn1.der.DERInteger;
@@ -25,6 +26,7 @@
 import org.apache.kerberos.messages.value.AuthorizationData;
 import org.apache.kerberos.messages.value.AuthorizationDataEntry;
 
+
 public class AuthorizationDataEncoder
 {
     /**
@@ -40,9 +42,10 @@
 
         while ( it.hasNext() )
         {
-            AuthorizationDataEntry entry = (AuthorizationDataEntry) it.next();
+            AuthorizationDataEntry entry = ( AuthorizationDataEntry ) it.next();
             DERSequence sequence = new DERSequence();
-            sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( entry.getAuthorizationDataType().getOrdinal() ) ) );
+            sequence
+                .add( new DERTaggedObject( 0, DERInteger.valueOf( entry.getAuthorizationDataType().getOrdinal() ) ) );
             sequence.add( new DERTaggedObject( 1, new DEROctetString( entry.getAuthorizationData() ) ) );
             outerSequence.add( sequence );
         }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ChecksumEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ChecksumEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ChecksumEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ChecksumEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,27 +16,29 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.Checksum;
 
+
 public class ChecksumEncoder
 {
-	/**
-	 * Checksum ::=   SEQUENCE {
+    /**
+     * Checksum ::=   SEQUENCE {
      *          cksumtype[0]   INTEGER,
      *          checksum[1]    OCTET STRING
      * }
-	 */
-	public static DERSequence encode( Checksum checksum )
-	{
-		DERSequence vector = new DERSequence();
-		
-		vector.add( new DERTaggedObject( 0, DERInteger.valueOf( checksum.getChecksumType().getOrdinal() ) ) );
-		vector.add( new DERTaggedObject( 1, new DEROctetString( checksum.getChecksumValue() ) ) );
-		
-		return vector;
-	}
+     */
+    public static DERSequence encode( Checksum checksum )
+    {
+        DERSequence vector = new DERSequence();
+
+        vector.add( new DERTaggedObject( 0, DERInteger.valueOf( checksum.getChecksumType().getOrdinal() ) ) );
+        vector.add( new DERTaggedObject( 1, new DEROctetString( checksum.getChecksumValue() ) ) );
+
+        return vector;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncApRepPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncApRepPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncApRepPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncApRepPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -27,44 +28,48 @@
 import org.apache.kerberos.messages.Encodable;
 import org.apache.kerberos.messages.components.EncApRepPart;
 
+
 public class EncApRepPartEncoder implements Encoder, EncoderFactory
 {
-	public static final int APPLICATION_CODE = 27;
+    public static final int APPLICATION_CODE = 27;
+
 
     public Encoder getEncoder()
     {
         return new EncApRepPartEncoder();
     }
 
-	public byte[] encode( Encodable apRepPart ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence privPartSequence = encodeApRepPartSequence( (EncApRepPart) apRepPart );
-		aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, privPartSequence ) );
-		aos.close();
-		
-		return baos.toByteArray();
-	}
-
-	private DERSequence encodeApRepPartSequence( EncApRepPart message )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject(0, KerberosTimeEncoder.encode( message.getClientTime() ) ) );
-		sequence.add( new DERTaggedObject(1, DERInteger.valueOf( message.getClientMicroSecond() ) ) );
-		
-		if ( message.getSubSessionKey() != null)
-		{
-			sequence.add( new DERTaggedObject( 2, EncryptionKeyEncoder.encode( message.getSubSessionKey() ) ) );
-		}
-		
-		if ( message.getSequenceNumber() != null )
-		{
-			sequence.add( new DERTaggedObject( 3, DERInteger.valueOf( message.getSequenceNumber().intValue() ) ) );
-		}
-		
-		return sequence;
-	}
+
+    public byte[] encode( Encodable apRepPart ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence privPartSequence = encodeApRepPartSequence( ( EncApRepPart ) apRepPart );
+        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, privPartSequence ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    private DERSequence encodeApRepPartSequence( EncApRepPart message )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, KerberosTimeEncoder.encode( message.getClientTime() ) ) );
+        sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( message.getClientMicroSecond() ) ) );
+
+        if ( message.getSubSessionKey() != null )
+        {
+            sequence.add( new DERTaggedObject( 2, EncryptionKeyEncoder.encode( message.getSubSessionKey() ) ) );
+        }
+
+        if ( message.getSequenceNumber() != null )
+        {
+            sequence.add( new DERTaggedObject( 3, DERInteger.valueOf( message.getSequenceNumber().intValue() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncAsRepPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncAsRepPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncAsRepPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncAsRepPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 public class EncAsRepPartEncoder extends EncKdcRepPartEncoder implements EncoderFactory
 {
     /*
@@ -23,10 +24,12 @@
      */
     public static final int APPLICATION_CODE = 25;
 
+
     public EncAsRepPartEncoder()
     {
         super( APPLICATION_CODE );
     }
+
 
     public Encoder getEncoder()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKdcRepPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKdcRepPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKdcRepPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKdcRepPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -29,83 +30,87 @@
 import org.apache.kerberos.messages.Encodable;
 import org.apache.kerberos.messages.KdcReply;
 
+
 public abstract class EncKdcRepPartEncoder implements Encoder
 {
-	private int applicationCode;
-	
-	protected EncKdcRepPartEncoder( int applicationCode )
-	{
-		this.applicationCode = applicationCode;
-	}
-	
-	public byte[] encode( Encodable app ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence initialSequence = encodeInitialSequence( (KdcReply) app );
-		aos.writeObject( DERApplicationSpecific.valueOf( applicationCode, initialSequence ) );
-		
-		return baos.toByteArray();
-	}
-	
-	/**
-	 *    EncKDCRepPart ::=   SEQUENCE {
-	 *                key[0]                       EncryptionKey,
-	 *                last-req[1]                  LastReq,
+    private int applicationCode;
+
+
+    protected EncKdcRepPartEncoder(int applicationCode)
+    {
+        this.applicationCode = applicationCode;
+    }
+
+
+    public byte[] encode( Encodable app ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence initialSequence = encodeInitialSequence( ( KdcReply ) app );
+        aos.writeObject( DERApplicationSpecific.valueOf( applicationCode, initialSequence ) );
+
+        return baos.toByteArray();
+    }
+
+
+    /**
+     *    EncKDCRepPart ::=   SEQUENCE {
+     *                key[0]                       EncryptionKey,
+     *                last-req[1]                  LastReq,
      * 
-	 *                nonce[2]                     INTEGER,
-	 *                key-expiration[3]            KerberosTime OPTIONAL,
-	 *                flags[4]                     TicketFlags,
-	 *                authtime[5]                  KerberosTime,
-	 *                starttime[6]                 KerberosTime OPTIONAL,
-	 *                endtime[7]                   KerberosTime,
-	 *                renew-till[8]                KerberosTime OPTIONAL,
-	 *                srealm[9]                    Realm,
-	 *                sname[10]                    PrincipalName,
-	 *                caddr[11]                    HostAddresses OPTIONAL
-	 * }
-	 */
-	protected DERSequence encodeInitialSequence( KdcReply reply )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, EncryptionKeyEncoder.encode( reply.getKey() ) ) );
-		sequence.add( new DERTaggedObject( 1, LastRequestEncoder.encode( reply.getLastRequest() ) ) );
-		sequence.add( new DERTaggedObject( 2, DERInteger.valueOf( reply.getNonce() ) ) );
-		
-		// OPTIONAL
-		if ( reply.getKeyExpiration() != null )
-		{
-			sequence.add(new DERTaggedObject( 3, KerberosTimeEncoder.encode(reply.getKeyExpiration() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 4, new DERBitString(reply.getFlags().getBytes() ) ) );
-		sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( reply.getAuthTime() ) ) );
-		
-		// OPTIONAL
-		if ( reply.getStartTime() != null )
-		{
-			sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( reply.getStartTime() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 7, KerberosTimeEncoder.encode( reply.getEndTime() ) ) );
-		
-		// OPTIONAL
-		if ( reply.getRenewTill() != null )
-		{
-			sequence.add( new DERTaggedObject( 8, KerberosTimeEncoder.encode( reply.getRenewTill() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 9, DERGeneralString.valueOf( reply.getServerRealm().toString() ) ) );
-		sequence.add( new DERTaggedObject( 10, PrincipalNameEncoder.encode( reply.getServerPrincipal() ) ) );
-		
-		// OPTIONAL
-		if ( reply.getClientAddresses() != null )
-		{
-			sequence.add( new DERTaggedObject( 11, HostAddressesEncoder.encodeSequence( reply.getClientAddresses() ) ) );
-		}
-		
-		return sequence;
-	}
+     *                nonce[2]                     INTEGER,
+     *                key-expiration[3]            KerberosTime OPTIONAL,
+     *                flags[4]                     TicketFlags,
+     *                authtime[5]                  KerberosTime,
+     *                starttime[6]                 KerberosTime OPTIONAL,
+     *                endtime[7]                   KerberosTime,
+     *                renew-till[8]                KerberosTime OPTIONAL,
+     *                srealm[9]                    Realm,
+     *                sname[10]                    PrincipalName,
+     *                caddr[11]                    HostAddresses OPTIONAL
+     * }
+     */
+    protected DERSequence encodeInitialSequence( KdcReply reply )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, EncryptionKeyEncoder.encode( reply.getKey() ) ) );
+        sequence.add( new DERTaggedObject( 1, LastRequestEncoder.encode( reply.getLastRequest() ) ) );
+        sequence.add( new DERTaggedObject( 2, DERInteger.valueOf( reply.getNonce() ) ) );
+
+        // OPTIONAL
+        if ( reply.getKeyExpiration() != null )
+        {
+            sequence.add( new DERTaggedObject( 3, KerberosTimeEncoder.encode( reply.getKeyExpiration() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 4, new DERBitString( reply.getFlags().getBytes() ) ) );
+        sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( reply.getAuthTime() ) ) );
+
+        // OPTIONAL
+        if ( reply.getStartTime() != null )
+        {
+            sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( reply.getStartTime() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 7, KerberosTimeEncoder.encode( reply.getEndTime() ) ) );
+
+        // OPTIONAL
+        if ( reply.getRenewTill() != null )
+        {
+            sequence.add( new DERTaggedObject( 8, KerberosTimeEncoder.encode( reply.getRenewTill() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 9, DERGeneralString.valueOf( reply.getServerRealm().toString() ) ) );
+        sequence.add( new DERTaggedObject( 10, PrincipalNameEncoder.encode( reply.getServerPrincipal() ) ) );
+
+        // OPTIONAL
+        if ( reply.getClientAddresses() != null )
+        {
+            sequence.add( new DERTaggedObject( 11, HostAddressesEncoder.encodeSequence( reply.getClientAddresses() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKrbPrivPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKrbPrivPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKrbPrivPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncKrbPrivPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -28,55 +29,59 @@
 import org.apache.kerberos.messages.Encodable;
 import org.apache.kerberos.messages.components.EncKrbPrivPart;
 
+
 public class EncKrbPrivPartEncoder implements Encoder, EncoderFactory
 {
-	private static final int APPLICATION_CODE = 28;
+    private static final int APPLICATION_CODE = 28;
+
 
     public Encoder getEncoder()
     {
         return new EncKrbPrivPartEncoder();
     }
 
-	public byte[] encode( Encodable privPart ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence privPartSequence = encodePrivatePartSequence( (EncKrbPrivPart) privPart );
-		aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, privPartSequence ) );
-		aos.close();
-		
-		return baos.toByteArray();
-	}
-
-	private DERSequence encodePrivatePartSequence( EncKrbPrivPart message )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, new DEROctetString( message.getUserData() ) ) );
-		
-		if ( message.getTimestamp() != null )
-		{
-			sequence.add( new DERTaggedObject( 1, KerberosTimeEncoder.encode( message.getTimestamp() ) ) );
-		}
-		
-		if ( message.getMicroSecond() != null )
-		{
-			sequence.add(new DERTaggedObject( 2, DERInteger.valueOf( message.getMicroSecond().intValue() ) ) );
-		}
-		
-		if ( message.getSequenceNumber() != null )
-		{
-			sequence.add(new DERTaggedObject( 3, DERInteger.valueOf( message.getSequenceNumber().intValue() ) ) );
-		}
-		
-		sequence.add(new DERTaggedObject( 4, HostAddressesEncoder.encode( message.getSenderAddress() ) ) );
-		
-		if ( message.getRecipientAddress() != null )
-		{
-			sequence.add(new DERTaggedObject( 5, HostAddressesEncoder.encode( message.getRecipientAddress() ) ) );
-		}
-		
-		return sequence;
-	}
+
+    public byte[] encode( Encodable privPart ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence privPartSequence = encodePrivatePartSequence( ( EncKrbPrivPart ) privPart );
+        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, privPartSequence ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    private DERSequence encodePrivatePartSequence( EncKrbPrivPart message )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, new DEROctetString( message.getUserData() ) ) );
+
+        if ( message.getTimestamp() != null )
+        {
+            sequence.add( new DERTaggedObject( 1, KerberosTimeEncoder.encode( message.getTimestamp() ) ) );
+        }
+
+        if ( message.getMicroSecond() != null )
+        {
+            sequence.add( new DERTaggedObject( 2, DERInteger.valueOf( message.getMicroSecond().intValue() ) ) );
+        }
+
+        if ( message.getSequenceNumber() != null )
+        {
+            sequence.add( new DERTaggedObject( 3, DERInteger.valueOf( message.getSequenceNumber().intValue() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 4, HostAddressesEncoder.encode( message.getSenderAddress() ) ) );
+
+        if ( message.getRecipientAddress() != null )
+        {
+            sequence.add( new DERTaggedObject( 5, HostAddressesEncoder.encode( message.getRecipientAddress() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTgsRepPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTgsRepPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTgsRepPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTgsRepPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 public class EncTgsRepPartEncoder extends EncKdcRepPartEncoder implements EncoderFactory
 {
     /**
@@ -23,10 +24,12 @@
      */
     public static final int APPLICATION_CODE = 26;
 
+
     public EncTgsRepPartEncoder()
     {
         super( APPLICATION_CODE );
     }
+
 
     public Encoder getEncoder()
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTicketPartEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTicketPartEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTicketPartEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncTicketPartEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -28,80 +29,86 @@
 import org.apache.kerberos.messages.Encodable;
 import org.apache.kerberos.messages.components.EncTicketPart;
 
+
 public class EncTicketPartEncoder implements Encoder, EncoderFactory
 {
-	private static final int APPLICATION_CODE = 3;
+    private static final int APPLICATION_CODE = 3;
+
+
+    public byte[] encode( Encodable ticketPart ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence ticketSequence = encodeInitialSequence( ( EncTicketPart ) ticketPart );
+        aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, ticketSequence ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
 
-	public byte[] encode( Encodable ticketPart ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence ticketSequence = encodeInitialSequence( (EncTicketPart) ticketPart );
-		aos.writeObject( DERApplicationSpecific.valueOf( APPLICATION_CODE, ticketSequence ) );
-		aos.close();
-		
-		return baos.toByteArray();
-	}
 
     public Encoder getEncoder()
     {
         return new EncTicketPartEncoder();
     }
 
-	/**
-	 * -- Encrypted part of ticket
-	 * EncTicketPart ::=     [APPLICATION 3] SEQUENCE {
-	 *                       flags[0]             TicketFlags,
-	 *                       key[1]               EncryptionKey,
-	 *                       crealm[2]            Realm,
-	 *                       cname[3]             PrincipalName,
-	 *                       transited[4]         TransitedEncoding,
-	 *                       authtime[5]          KerberosTime,
-	 *                       starttime[6]         KerberosTime OPTIONAL,
-	 *                       endtime[7]           KerberosTime,
-	 *                       renew-till[8]        KerberosTime OPTIONAL,
-	 *                       caddr[9]             HostAddresses OPTIONAL,
-	 *                       authorization-data[10]   AuthorizationData OPTIONAL
-	 * }
-	 */
-	public DERSequence encodeInitialSequence( EncTicketPart ticketPart )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, new DERBitString( ticketPart.getFlags().getBytes() ) ) );
-		sequence.add( new DERTaggedObject( 1, EncryptionKeyEncoder.encode( ticketPart.getSessionKey() ) ) );
-		sequence.add( new DERTaggedObject( 2, DERGeneralString.valueOf( ticketPart.getClientRealm().toString() ) ) );
-		sequence.add( new DERTaggedObject( 3, PrincipalNameEncoder.encode( ticketPart.getClientPrincipal() ) ) );
-		sequence.add( new DERTaggedObject( 4, TransitedEncodingEncoder.encode( ticketPart.getTransitedEncoding() ) ) );
-		sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( ticketPart.getAuthTime() ) ) );
-		
-		// OPTIONAL
-		if ( ticketPart.getStartTime() != null )
-		{
-			sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( ticketPart.getStartTime() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 7, KerberosTimeEncoder.encode( ticketPart.getEndTime() ) ) );
-		
-		// OPTIONAL
-		if ( ticketPart.getRenewTill() != null )
-		{
-			sequence.add( new DERTaggedObject( 8, KerberosTimeEncoder.encode( ticketPart.getRenewTill() ) ) );
-		}
-		
-		// OPTIONAL
-		if ( ticketPart.getClientAddresses() != null )
-		{
-			sequence.add( new DERTaggedObject( 9, HostAddressesEncoder.encodeSequence( ticketPart.getClientAddresses() ) ) );
-		}
-		
-		// OPTIONAL
-		if ( ticketPart.getAuthorizationData() != null )
-		{
-			sequence.add( new DERTaggedObject( 10, AuthorizationDataEncoder.encode( ticketPart.getAuthorizationData() ) ) );
-		}
-		
-		return sequence;
-	}
+
+    /**
+     * -- Encrypted part of ticket
+     * EncTicketPart ::=     [APPLICATION 3] SEQUENCE {
+     *                       flags[0]             TicketFlags,
+     *                       key[1]               EncryptionKey,
+     *                       crealm[2]            Realm,
+     *                       cname[3]             PrincipalName,
+     *                       transited[4]         TransitedEncoding,
+     *                       authtime[5]          KerberosTime,
+     *                       starttime[6]         KerberosTime OPTIONAL,
+     *                       endtime[7]           KerberosTime,
+     *                       renew-till[8]        KerberosTime OPTIONAL,
+     *                       caddr[9]             HostAddresses OPTIONAL,
+     *                       authorization-data[10]   AuthorizationData OPTIONAL
+     * }
+     */
+    public DERSequence encodeInitialSequence( EncTicketPart ticketPart )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, new DERBitString( ticketPart.getFlags().getBytes() ) ) );
+        sequence.add( new DERTaggedObject( 1, EncryptionKeyEncoder.encode( ticketPart.getSessionKey() ) ) );
+        sequence.add( new DERTaggedObject( 2, DERGeneralString.valueOf( ticketPart.getClientRealm().toString() ) ) );
+        sequence.add( new DERTaggedObject( 3, PrincipalNameEncoder.encode( ticketPart.getClientPrincipal() ) ) );
+        sequence.add( new DERTaggedObject( 4, TransitedEncodingEncoder.encode( ticketPart.getTransitedEncoding() ) ) );
+        sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( ticketPart.getAuthTime() ) ) );
+
+        // OPTIONAL
+        if ( ticketPart.getStartTime() != null )
+        {
+            sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( ticketPart.getStartTime() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 7, KerberosTimeEncoder.encode( ticketPart.getEndTime() ) ) );
+
+        // OPTIONAL
+        if ( ticketPart.getRenewTill() != null )
+        {
+            sequence.add( new DERTaggedObject( 8, KerberosTimeEncoder.encode( ticketPart.getRenewTill() ) ) );
+        }
+
+        // OPTIONAL
+        if ( ticketPart.getClientAddresses() != null )
+        {
+            sequence
+                .add( new DERTaggedObject( 9, HostAddressesEncoder.encodeSequence( ticketPart.getClientAddresses() ) ) );
+        }
+
+        // OPTIONAL
+        if ( ticketPart.getAuthorizationData() != null )
+        {
+            sequence
+                .add( new DERTaggedObject( 10, AuthorizationDataEncoder.encode( ticketPart.getAuthorizationData() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/Encoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/Encoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/Encoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/Encoder.java Fri Feb 10 02:48:07 2006
@@ -17,9 +17,11 @@
 
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.IOException;
 
 import org.apache.kerberos.messages.Encodable;
+
 
 public interface Encoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncoderFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncoderFactory.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncoderFactory.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncoderFactory.java Fri Feb 10 02:48:07 2006
@@ -17,6 +17,7 @@
 
 package org.apache.kerberos.io.encoder;
 
+
 public interface EncoderFactory
 {
     public Encoder getEncoder();

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedDataEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedDataEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedDataEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedDataEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -26,39 +27,41 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptedData;
 
+
 public class EncryptedDataEncoder
 {
-	public static byte[] encode( EncryptedData encryptedData ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		aos.writeObject( encodeSequence( encryptedData ) );
-		aos.close();
-
-		return baos.toByteArray();
-	}
-	
-	/**
-	 * EncryptedData ::=   SEQUENCE {
-	 *             etype[0]     INTEGER, -- EncryptionEngine
-	 *             kvno[1]      INTEGER OPTIONAL,
-	 *             cipher[2]    OCTET STRING -- ciphertext
-	 * }
-	 */
-	public static DERSequence encodeSequence( EncryptedData encryptedData )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( encryptedData.getEncryptionType().getOrdinal() ) ) );
-		
-		if ( encryptedData.getKeyVersion() > 0 )
-		{
-			sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( encryptedData.getKeyVersion() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 2, new DEROctetString( encryptedData.getCipherText() ) ) );
-		
-		return sequence;
-	}
+    public static byte[] encode( EncryptedData encryptedData ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        aos.writeObject( encodeSequence( encryptedData ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    /**
+     * EncryptedData ::=   SEQUENCE {
+     *             etype[0]     INTEGER, -- EncryptionEngine
+     *             kvno[1]      INTEGER OPTIONAL,
+     *             cipher[2]    OCTET STRING -- ciphertext
+     * }
+     */
+    public static DERSequence encodeSequence( EncryptedData encryptedData )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( encryptedData.getEncryptionType().getOrdinal() ) ) );
+
+        if ( encryptedData.getKeyVersion() > 0 )
+        {
+            sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( encryptedData.getKeyVersion() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 2, new DEROctetString( encryptedData.getCipherText() ) ) );
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedTimestampEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedTimestampEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedTimestampEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptedTimestampEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -25,36 +26,38 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptedTimeStamp;
 
+
 public class EncryptedTimestampEncoder
 {
-	public byte[] encode( EncryptedTimeStamp encryptedTimestamp ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		aos.writeObject( encodeTimestamp( encryptedTimestamp ) );
-		aos.close();
-
-		return baos.toByteArray();
-	}
-	
-	/**
+    public byte[] encode( EncryptedTimeStamp encryptedTimestamp ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        aos.writeObject( encodeTimestamp( encryptedTimestamp ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    /**
      * PA-ENC-TS-ENC   ::= SEQUENCE {
      *         patimestamp[0]               KerberosTime, -- client's time
      *         pausec[1]                    INTEGER OPTIONAL
      * }
-	 */
-	private DERSequence encodeTimestamp( EncryptedTimeStamp encryptedTimestamp )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, KerberosTimeEncoder.encode( encryptedTimestamp.getTimeStamp() ) ) );
-		
-		if ( encryptedTimestamp.getMicroSeconds() > 0)
-		{
-		    sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( encryptedTimestamp.getMicroSeconds() ) ) );
-		}
-		
-		return sequence;
-	}
+     */
+    private DERSequence encodeTimestamp( EncryptedTimeStamp encryptedTimestamp )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, KerberosTimeEncoder.encode( encryptedTimestamp.getTimeStamp() ) ) );
+
+        if ( encryptedTimestamp.getMicroSeconds() > 0 )
+        {
+            sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( encryptedTimestamp.getMicroSeconds() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionKeyEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptionKey;
+
 
 public class EncryptionKeyEncoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,10 +16,12 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.kerberos.crypto.encryption.EncryptionType;
 
+
 public class EncryptionTypeEncoder
 {
     /**
@@ -32,7 +34,7 @@
 
         for ( int ii = 0; ii < eType.length; ii++ )
         {
-            sequence.add( DERInteger.valueOf( eType[ ii ].getOrdinal() ) );
+            sequence.add( DERInteger.valueOf( eType[ii].getOrdinal() ) );
         }
 
         return sequence;

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/EncryptionTypeInfoEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -26,6 +27,7 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.EncryptionTypeInfoEntry;
 
+
 public class EncryptionTypeInfoEncoder
 {
     public static byte[] encode( EncryptionTypeInfoEntry[] entries ) throws IOException
@@ -38,6 +40,7 @@
         return baos.toByteArray();
     }
 
+
     /**
      * ETYPE-INFO              ::= SEQUENCE OF ETYPE-INFO-ENTRY
      */
@@ -47,11 +50,12 @@
 
         for ( int ii = 0; ii < entries.length; ii++ )
         {
-            sequence.add( encode( entries[ ii ] ) );
+            sequence.add( encode( entries[ii] ) );
         }
 
         return sequence;
     }
+
 
     /**
      * ETYPE-INFO-ENTRY        ::= SEQUENCE {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/ErrorMessageEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -29,79 +30,83 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.ErrorMessage;
 
+
 public class ErrorMessageEncoder
 {
-	public void encode( ErrorMessage message, ByteBuffer out ) throws IOException
-	{
-		ASN1OutputStream aos = new ASN1OutputStream( out );
-		
-		DERSequence errorReply = encodeErrorMessageSequence( message );
-		aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), errorReply ) );
-		
-		aos.close();
-	}
-	
-	public byte[] encode( ErrorMessage message ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		DERSequence errorReply = encodeErrorMessageSequence( message );
-		aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), errorReply ) );
-		
-		aos.close();
-		
-		return baos.toByteArray();
-	}
-	
-	private DERSequence encodeErrorMessageSequence( ErrorMessage message )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( message.getProtocolVersionNumber() ) ) );
-		
-		sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( message.getMessageType().getOrdinal() ) ));
-		
-		if ( message.getClientTime() != null )
-		{
-			sequence.add( new DERTaggedObject( 2, KerberosTimeEncoder.encode( message.getClientTime() ) ) );
-		}
-		
-		if ( message.getClientMicroSecond() != null )
-		{
-			sequence.add(new DERTaggedObject( 3, DERInteger.valueOf( message.getClientMicroSecond().intValue() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 4, KerberosTimeEncoder.encode( message.getServerTime() ) ) );
-		
-		sequence.add( new DERTaggedObject( 5, DERInteger.valueOf( message.getServerMicroSecond() ) ) );
-		
-		sequence.add( new DERTaggedObject( 6, DERInteger.valueOf( message.getErrorCode() ) ) );
-		
-		if ( message.getClientPrincipal() != null )
-		{
-			sequence.add( new DERTaggedObject( 7, DERGeneralString.valueOf( message.getClientPrincipal().getRealm().toString() ) ) );
-		}
-		
-		if ( message.getClientPrincipal() != null )
-		{
-			sequence.add( new DERTaggedObject( 8, PrincipalNameEncoder.encode( message.getClientPrincipal() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 9, DERGeneralString.valueOf( message.getServerPrincipal().getRealm() ) ) );
-		
-		sequence.add( new DERTaggedObject( 10, PrincipalNameEncoder.encode( message.getServerPrincipal() ) ) );
-		
-		if ( message.getExplanatoryText() != null )
-		{
-			sequence.add( new DERTaggedObject( 11, DERGeneralString.valueOf( message.getExplanatoryText() ) ) );
-		}
-		
-		if ( message.getExplanatoryData() != null )
-		{
-			sequence.add( new DERTaggedObject( 12, new DEROctetString( message.getExplanatoryData() ) ) );
-		}
-		
-		return sequence;
-	}
+    public void encode( ErrorMessage message, ByteBuffer out ) throws IOException
+    {
+        ASN1OutputStream aos = new ASN1OutputStream( out );
+
+        DERSequence errorReply = encodeErrorMessageSequence( message );
+        aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), errorReply ) );
+
+        aos.close();
+    }
+
+
+    public byte[] encode( ErrorMessage message ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        DERSequence errorReply = encodeErrorMessageSequence( message );
+        aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), errorReply ) );
+
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    private DERSequence encodeErrorMessageSequence( ErrorMessage message )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( message.getProtocolVersionNumber() ) ) );
+
+        sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( message.getMessageType().getOrdinal() ) ) );
+
+        if ( message.getClientTime() != null )
+        {
+            sequence.add( new DERTaggedObject( 2, KerberosTimeEncoder.encode( message.getClientTime() ) ) );
+        }
+
+        if ( message.getClientMicroSecond() != null )
+        {
+            sequence.add( new DERTaggedObject( 3, DERInteger.valueOf( message.getClientMicroSecond().intValue() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 4, KerberosTimeEncoder.encode( message.getServerTime() ) ) );
+
+        sequence.add( new DERTaggedObject( 5, DERInteger.valueOf( message.getServerMicroSecond() ) ) );
+
+        sequence.add( new DERTaggedObject( 6, DERInteger.valueOf( message.getErrorCode() ) ) );
+
+        if ( message.getClientPrincipal() != null )
+        {
+            sequence.add( new DERTaggedObject( 7, DERGeneralString.valueOf( message.getClientPrincipal().getRealm()
+                .toString() ) ) );
+        }
+
+        if ( message.getClientPrincipal() != null )
+        {
+            sequence.add( new DERTaggedObject( 8, PrincipalNameEncoder.encode( message.getClientPrincipal() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 9, DERGeneralString.valueOf( message.getServerPrincipal().getRealm() ) ) );
+
+        sequence.add( new DERTaggedObject( 10, PrincipalNameEncoder.encode( message.getServerPrincipal() ) ) );
+
+        if ( message.getExplanatoryText() != null )
+        {
+            sequence.add( new DERTaggedObject( 11, DERGeneralString.valueOf( message.getExplanatoryText() ) ) );
+        }
+
+        if ( message.getExplanatoryData() != null )
+        {
+            sequence.add( new DERTaggedObject( 12, new DEROctetString( message.getExplanatoryData() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/HostAddressesEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
@@ -23,6 +24,7 @@
 import org.apache.kerberos.messages.value.HostAddress;
 import org.apache.kerberos.messages.value.HostAddresses;
 
+
 public class HostAddressesEncoder
 {
     /**
@@ -38,11 +40,12 @@
 
         for ( int ii = 0; ii < addresses.length; ii++ )
         {
-            sequence.add( encode( addresses[ ii ] ) );
+            sequence.add( encode( addresses[ii] ) );
         }
 
         return sequence;
     }
+
 
     /**
      *  HostAddress ::=     SEQUENCE  {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReplyEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
@@ -29,75 +30,78 @@
 import org.apache.kerberos.messages.KdcReply;
 import org.apache.kerberos.messages.value.PreAuthenticationData;
 
+
 public class KdcReplyEncoder
 {
-	/*
- 	AS-REP ::=    [APPLICATION 11] KDC-REP
- 	TGS-REP ::=   [APPLICATION 13] KDC-REP
-	 */
-	public void encode( KdcReply app, ByteBuffer out ) throws IOException
-	{
-		ASN1OutputStream aos = new ASN1OutputStream( out );
-		
-		DERSequence kdcrep = encodeKdcReplySequence( app );
-		aos.writeObject( DERApplicationSpecific.valueOf( app.getMessageType().getOrdinal(), kdcrep ) );
-		
-		aos.close();
-	}
-	
-	/*
-	KDC-REP ::=   SEQUENCE {
-	              pvno[0]                    INTEGER,
-	              msg-type[1]                INTEGER,
-	              padata[2]                  SEQUENCE OF PA-DATA OPTIONAL,
-	              crealm[3]                  Realm,
-	              cname[4]                   PrincipalName,
-	              ticket[5]                  Ticket,
-	              enc-part[6]                EncryptedData
-	}*/
-	private DERSequence encodeKdcReplySequence( KdcReply app )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( app.getProtocolVersionNumber() ) ) );
-		
-		sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( app.getMessageType().getOrdinal() ) ) );
-		
-		if ( app.getPaData() != null )
-		{
-			sequence.add( new DERTaggedObject( 2, encodePreAuthData( app.getPaData() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject(3, DERGeneralString.valueOf( app.getClientRealm().toString() ) ) );
-		
-		sequence.add( new DERTaggedObject(4, PrincipalNameEncoder.encode( app.getClientPrincipal() ) ) );
-		
-		sequence.add( new DERTaggedObject(5, TicketEncoder.encode( app.getTicket() ) ) );
-		
-		sequence.add( new DERTaggedObject(6, EncryptedDataEncoder.encodeSequence( app.getEncPart() ) ) );
-		
-		return sequence;
-	}
-
-	/*
-	PA-DATA ::=        SEQUENCE {
-	           padata-type[1]        INTEGER,
-	           padata-value[2]       OCTET STRING,
-	                         -- might be encoded AP-REQ
-	}*/
-	private DERSequence encodePreAuthData( PreAuthenticationData[] preAuthData )
-	{
-		DERSequence preAuth = new DERSequence();
-		
-		for ( int ii = 0; ii < preAuthData.length; ii++ )
-		{
-			DERSequence sequence = new DERSequence();
-
-			sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( preAuthData[ii].getDataType().getOrdinal() ) ) );
-			sequence.add( new DERTaggedObject( 2, new DEROctetString( preAuthData[ii].getDataValue() ) ) );
-			preAuth.add( sequence );
-		}
-		
-		return preAuth;
-	}
+    /*
+     AS-REP ::=    [APPLICATION 11] KDC-REP
+     TGS-REP ::=   [APPLICATION 13] KDC-REP
+     */
+    public void encode( KdcReply app, ByteBuffer out ) throws IOException
+    {
+        ASN1OutputStream aos = new ASN1OutputStream( out );
+
+        DERSequence kdcrep = encodeKdcReplySequence( app );
+        aos.writeObject( DERApplicationSpecific.valueOf( app.getMessageType().getOrdinal(), kdcrep ) );
+
+        aos.close();
+    }
+
+
+    /*
+     KDC-REP ::=   SEQUENCE {
+     pvno[0]                    INTEGER,
+     msg-type[1]                INTEGER,
+     padata[2]                  SEQUENCE OF PA-DATA OPTIONAL,
+     crealm[3]                  Realm,
+     cname[4]                   PrincipalName,
+     ticket[5]                  Ticket,
+     enc-part[6]                EncryptedData
+     }*/
+    private DERSequence encodeKdcReplySequence( KdcReply app )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, DERInteger.valueOf( app.getProtocolVersionNumber() ) ) );
+
+        sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( app.getMessageType().getOrdinal() ) ) );
+
+        if ( app.getPaData() != null )
+        {
+            sequence.add( new DERTaggedObject( 2, encodePreAuthData( app.getPaData() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 3, DERGeneralString.valueOf( app.getClientRealm().toString() ) ) );
+
+        sequence.add( new DERTaggedObject( 4, PrincipalNameEncoder.encode( app.getClientPrincipal() ) ) );
+
+        sequence.add( new DERTaggedObject( 5, TicketEncoder.encode( app.getTicket() ) ) );
+
+        sequence.add( new DERTaggedObject( 6, EncryptedDataEncoder.encodeSequence( app.getEncPart() ) ) );
+
+        return sequence;
+    }
+
+
+    /*
+     PA-DATA ::=        SEQUENCE {
+     padata-type[1]        INTEGER,
+     padata-value[2]       OCTET STRING,
+     -- might be encoded AP-REQ
+     }*/
+    private DERSequence encodePreAuthData( PreAuthenticationData[] preAuthData )
+    {
+        DERSequence preAuth = new DERSequence();
+
+        for ( int ii = 0; ii < preAuthData.length; ii++ )
+        {
+            DERSequence sequence = new DERSequence();
+
+            sequence.add( new DERTaggedObject( 1, DERInteger.valueOf( preAuthData[ii].getDataType().getOrdinal() ) ) );
+            sequence.add( new DERTaggedObject( 2, new DEROctetString( preAuthData[ii].getDataValue() ) ) );
+            preAuth.add( sequence );
+        }
+
+        return preAuth;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KdcReqBodyEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -27,21 +28,23 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.KdcRequest;
 
+
 public class KdcReqBodyEncoder
 {
-	public byte[] encode( KdcRequest request ) throws IOException
-	{
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ASN1OutputStream aos = new ASN1OutputStream( baos );
-		
-		aos.writeObject( encodeInitialSequence( request ) );
-		aos.close();
-
-		return baos.toByteArray();
-	}
-	
-	/**
-	 * KDC-REQ-BODY ::=   SEQUENCE {
+    public byte[] encode( KdcRequest request ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        aos.writeObject( encodeInitialSequence( request ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    /**
+     * KDC-REQ-BODY ::=   SEQUENCE {
      *     kdc-options[0]       KDCOptions,
      *     cname[1]             PrincipalName OPTIONAL,
      *                  -- Used only in AS-REQ
@@ -61,62 +64,63 @@
      *     additional-tickets[11]       SEQUENCE OF Ticket OPTIONAL
      * }
      */
-	private DERSequence encodeInitialSequence( KdcRequest request )
-	{
-		DERSequence sequence = new DERSequence();
-		
-		sequence.add( new DERTaggedObject( 0, new DERBitString( request.getKdcOptions().getBytes() ) ) );
-		
-		// OPTIONAL
-		if ( request.getClientPrincipal() != null )
-		{
-			sequence.add( new DERTaggedObject( 1, PrincipalNameEncoder.encode( request.getClientPrincipal() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 2, DERGeneralString.valueOf( request.getRealm().toString() ) ) );
-		
-		// OPTIONAL
-		if ( request.getServerPrincipal() != null )
-		{
-			sequence.add( new DERTaggedObject( 3, PrincipalNameEncoder.encode( request.getServerPrincipal() ) ) );
-		}
-		
-		// OPTIONAL
-		if (request.getFrom() != null)
-		{
-			sequence.add(new DERTaggedObject(4, KerberosTimeEncoder.encode(request.getFrom())));
-		}
-		
-		sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( request.getTill() ) ) );
-		
-		// OPTIONAL
-		if ( request.getRtime() != null )
-		{
-			sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( request.getRtime() ) ) );
-		}
-		
-		sequence.add( new DERTaggedObject( 7, DERInteger.valueOf( request.getNonce() ) ) );
-		
-		sequence.add( new DERTaggedObject( 8, EncryptionTypeEncoder.encode( request.getEType() ) ) );
-		
-		// OPTIONAL
-		if ( request.getAddresses() != null )
-		{
-			sequence.add( new DERTaggedObject( 9, HostAddressesEncoder.encodeSequence( request.getAddresses() ) ) );
-		}
-		
-		// OPTIONAL
-		if ( request.getEncAuthorizationData() != null )
-		{
-			sequence.add( new DERTaggedObject( 10, EncryptedDataEncoder.encodeSequence( request.getEncAuthorizationData() ) ) );
-		}
-		
-		// OPTIONAL
-		if ( request.getAdditionalTickets() != null )
-		{
-			sequence.add( new DERTaggedObject( 11, TicketEncoder.encodeSequence( request.getAdditionalTickets() ) ) );
-		}
-		
-		return sequence;
-	}
+    private DERSequence encodeInitialSequence( KdcRequest request )
+    {
+        DERSequence sequence = new DERSequence();
+
+        sequence.add( new DERTaggedObject( 0, new DERBitString( request.getKdcOptions().getBytes() ) ) );
+
+        // OPTIONAL
+        if ( request.getClientPrincipal() != null )
+        {
+            sequence.add( new DERTaggedObject( 1, PrincipalNameEncoder.encode( request.getClientPrincipal() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 2, DERGeneralString.valueOf( request.getRealm().toString() ) ) );
+
+        // OPTIONAL
+        if ( request.getServerPrincipal() != null )
+        {
+            sequence.add( new DERTaggedObject( 3, PrincipalNameEncoder.encode( request.getServerPrincipal() ) ) );
+        }
+
+        // OPTIONAL
+        if ( request.getFrom() != null )
+        {
+            sequence.add( new DERTaggedObject( 4, KerberosTimeEncoder.encode( request.getFrom() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 5, KerberosTimeEncoder.encode( request.getTill() ) ) );
+
+        // OPTIONAL
+        if ( request.getRtime() != null )
+        {
+            sequence.add( new DERTaggedObject( 6, KerberosTimeEncoder.encode( request.getRtime() ) ) );
+        }
+
+        sequence.add( new DERTaggedObject( 7, DERInteger.valueOf( request.getNonce() ) ) );
+
+        sequence.add( new DERTaggedObject( 8, EncryptionTypeEncoder.encode( request.getEType() ) ) );
+
+        // OPTIONAL
+        if ( request.getAddresses() != null )
+        {
+            sequence.add( new DERTaggedObject( 9, HostAddressesEncoder.encodeSequence( request.getAddresses() ) ) );
+        }
+
+        // OPTIONAL
+        if ( request.getEncAuthorizationData() != null )
+        {
+            sequence.add( new DERTaggedObject( 10, EncryptedDataEncoder.encodeSequence( request
+                .getEncAuthorizationData() ) ) );
+        }
+
+        // OPTIONAL
+        if ( request.getAdditionalTickets() != null )
+        {
+            sequence.add( new DERTaggedObject( 11, TicketEncoder.encodeSequence( request.getAdditionalTickets() ) ) );
+        }
+
+        return sequence;
+    }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/KerberosTimeEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,8 +16,10 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERGeneralizedTime;
 import org.apache.kerberos.messages.value.KerberosTime;
+
 
 public class KerberosTimeEncoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/LastRequestEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERGeneralizedTime;
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DERSequence;
@@ -23,6 +24,7 @@
 import org.apache.kerberos.messages.value.LastRequest;
 import org.apache.kerberos.messages.value.LastRequestEntry;
 
+
 public class LastRequestEncoder
 {
     /**
@@ -39,8 +41,10 @@
         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() ) ) );
+            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 );
         }
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PreAuthenticationDataEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -26,6 +27,7 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.PreAuthenticationData;
 
+
 public class PreAuthenticationDataEncoder
 {
     public static byte[] encode( PreAuthenticationData[] preAuth ) throws IOException
@@ -39,17 +41,19 @@
         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 ] ) );
+            sequence.add( encode( preAuth[ii] ) );
         }
 
         return sequence;
     }
+
 
     /**
      * PA-DATA ::=        SEQUENCE {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrincipalNameEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -27,11 +28,13 @@
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 
+
 public class PrincipalNameEncoder
 {
     private static final String COMPONENT_SEPARATOR = "/";
     private static final String REALM_SEPARATOR = "@";
 
+
     /**
      * PrincipalName ::=   SEQUENCE {
      *               name-type[0]     INTEGER,
@@ -48,6 +51,7 @@
         return vector;
     }
 
+
     private static DERSequence encodeNameSequence( KerberosPrincipal principal )
     {
         Iterator it = getNameStrings( principal ).iterator();
@@ -56,15 +60,16 @@
 
         while ( it.hasNext() )
         {
-            vector.add( DERGeneralString.valueOf( (String) it.next() ) );
+            vector.add( DERGeneralString.valueOf( ( String ) it.next() ) );
         }
 
         return vector;
     }
 
+
     private static List getNameStrings( KerberosPrincipal principal )
     {
-        String nameComponent = principal.getName().split( REALM_SEPARATOR )[ 0 ];
+        String nameComponent = principal.getName().split( REALM_SEPARATOR )[0];
         String[] components = nameComponent.split( COMPONENT_SEPARATOR );
         return Arrays.asList( components );
     }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/PrivateMessageEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
@@ -26,6 +27,7 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.application.PrivateMessage;
 
+
 public class PrivateMessageEncoder
 {
     public byte[] encode( PrivateMessage message ) throws IOException
@@ -34,11 +36,14 @@
         ASN1OutputStream aos = new ASN1OutputStream( baos );
 
         DERSequence privateMessageSequence = encodePrivateMessageSequence( message );
-        aos.writeObject( DERApplicationSpecific.valueOf( message.getMessageType().getOrdinal(), privateMessageSequence ) );
+        aos
+            .writeObject( DERApplicationSpecific
+                .valueOf( message.getMessageType().getOrdinal(), privateMessageSequence ) );
         aos.close();
 
         return baos.toByteArray();
     }
+
 
     private DERSequence encodePrivateMessageSequence( PrivateMessage message )
     {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TicketEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TicketEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TicketEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TicketEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERApplicationSpecific;
 import org.apache.directory.shared.asn1.der.DERGeneralString;
 import org.apache.directory.shared.asn1.der.DERInteger;
@@ -23,6 +24,7 @@
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.components.Ticket;
 
+
 public class TicketEncoder
 {
     /**
@@ -56,6 +58,7 @@
         return ticketSequence;
     }
 
+
     protected static DERSequence encodeSequence( Ticket[] tickets )
     {
         DERSequence outerVector = new DERSequence();
@@ -63,7 +66,7 @@
         for ( int ii = 0; ii < tickets.length; ii++ )
         {
             DERSequence vector = new DERSequence();
-            vector.add( encode( tickets[ ii ] ) );
+            vector.add( encode( tickets[ii] ) );
             outerVector.add( vector );
         }
 

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/io/encoder/TransitedEncodingEncoder.java Fri Feb 10 02:48:07 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.kerberos.io.encoder;
 
+
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.kerberos.messages.value.TransitedEncoding;
+
 
 public class TransitedEncodingEncoder
 {

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/CallbackHandlerBean.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/CallbackHandlerBean.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/CallbackHandlerBean.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/CallbackHandlerBean.java Fri Feb 10 02:48:07 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.kerberos.jaas;
 
+
 import java.io.IOException;
 
 import javax.security.auth.callback.Callback;
@@ -24,40 +25,42 @@
 import javax.security.auth.callback.PasswordCallback;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
+
 public class CallbackHandlerBean implements CallbackHandler
 {
     private String name;
     private String password;
 
-    public CallbackHandlerBean( String name, 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 ];
+            Callback callBack = callbacks[ii];
 
             // Handles username callback.
             if ( callBack instanceof NameCallback )
             {
-                NameCallback nameCallback = (NameCallback) callBack;
+                NameCallback nameCallback = ( NameCallback ) callBack;
                 nameCallback.setName( name );
                 // Handles password callback.
             }
+            else if ( callBack instanceof PasswordCallback )
+            {
+                PasswordCallback passwordCallback = ( PasswordCallback ) callBack;
+                passwordCallback.setPassword( password.toCharArray() );
+            }
             else
-                if ( callBack instanceof PasswordCallback )
-                {
-                    PasswordCallback passwordCallback = (PasswordCallback) callBack;
-                    passwordCallback.setPassword( password.toCharArray() );
-                }
-                else
-                {
-                    throw new UnsupportedCallbackException( callBack, "Callback not supported" );
-                }
+            {
+                throw new UnsupportedCallbackException( callBack, "Callback not supported" );
+            }
         }
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java Fri Feb 10 02:48:07 2006
@@ -16,23 +16,27 @@
  */
 package org.apache.kerberos.jaas;
 
+
 import java.util.HashMap;
 
 import javax.security.auth.login.AppConfigurationEntry;
 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 ];
+    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() );
+        configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
     }
 
+
     /**
      * Interface method requiring us to return all the LoginModules we know about.
      */
@@ -41,6 +45,7 @@
         // 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.

Modified: directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/messages/ApplicationRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/messages/ApplicationRequest.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/messages/ApplicationRequest.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/kerberos-shared/src/main/java/org/apache/kerberos/messages/ApplicationRequest.java Fri Feb 10 02:48:07 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.kerberos.messages;
 
+
 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
 {
     private ApOptions apOptions;
@@ -28,6 +30,7 @@
     private EncryptedData encPart;
     private Authenticator authenticator;
 
+
     /**
      * Class constructors
      */
@@ -37,7 +40,8 @@
         // used by ASN1 decoder
     }
 
-    public ApplicationRequest( ApOptions apOptions, Ticket ticket, EncryptedData encPart )
+
+    public ApplicationRequest(ApOptions apOptions, Ticket ticket, EncryptedData encPart)
     {
         super( MessageType.KRB_AP_REQ );
         this.apOptions = apOptions;
@@ -45,56 +49,67 @@
         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 )
     {



Mime
View raw message