directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379013 [35/45] - in /directory/trunks/apacheds: ./ core-plugin/ 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/ core-shared/src/...
Date Mon, 20 Feb 2006 03:58:21 GMT
Modified: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java (original)
+++ directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java Sun Feb 19 19:57:02 2006
@@ -14,9 +14,9 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.directory.server.dns;
 
+
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -27,39 +27,58 @@
 import org.apache.directory.server.dns.messages.ResourceRecords;
 import org.apache.mina.common.ByteBuffer;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
 public abstract class AbstractDnsTestCase extends TestCase
 {
+    private final Logger log;
     private static final int MINIMUM_DNS_DATAGRAM_SIZE = 576;
 
+
+    public AbstractDnsTestCase()
+    {
+        log = LoggerFactory.getLogger( AbstractDnsTestCase.class );
+    }
+
+
+    public AbstractDnsTestCase(Class subclass)
+    {
+        log = LoggerFactory.getLogger( subclass );
+    }
+
+
     protected void print( DnsMessage message )
     {
-        System.out.println( message.getTransactionId() );
-        System.out.println( message.getMessageType() );
-        System.out.println( message.getOpCode() );
-        System.out.println( message.isAuthoritativeAnswer() );
-        System.out.println( message.isTruncated() );
-        System.out.println( message.isRecursionDesired() );
-        System.out.println( message.isRecursionAvailable() );
-        System.out.println( message.getResponseCode() );
+        log.debug( String.valueOf( message.getTransactionId() ) );
+        log.debug( String.valueOf( message.getMessageType() ) );
+        log.debug( String.valueOf( message.getOpCode() ) );
+        log.debug( String.valueOf( message.isAuthoritativeAnswer() ) );
+        log.debug( String.valueOf( message.isTruncated() ) );
+        log.debug( String.valueOf( message.isRecursionDesired() ) );
+        log.debug( String.valueOf( message.isRecursionAvailable() ) );
+        log.debug( String.valueOf( message.getResponseCode() ) );
 
         QuestionRecords questions = message.getQuestionRecords();
-        System.out.println( questions );
+        log.debug( String.valueOf( questions ) );
 
         ResourceRecords records = message.getAnswerRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
 
         records = message.getAuthorityRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
 
         records = message.getAdditionalRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
     }
 
+
     protected ByteBuffer getByteBufferFromFile( String file ) throws IOException
     {
         InputStream is = getClass().getResourceAsStream( file );
 
-        byte[] bytes = new byte[ MINIMUM_DNS_DATAGRAM_SIZE ];
+        byte[] bytes = new byte[MINIMUM_DNS_DATAGRAM_SIZE];
 
         int offset = 0;
         int numRead = 0;

Propchange: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java (original)
+++ directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java Sun Feb 19 19:57:02 2006
@@ -17,15 +17,24 @@
 
 package org.apache.directory.server.dns.protocol;
 
+
 import org.apache.directory.server.dns.AbstractDnsTestCase;
 import org.apache.directory.server.dns.messages.DnsMessage;
 import org.apache.directory.server.dns.protocol.DnsDecoder;
 import org.apache.mina.common.ByteBuffer;
 
+
 public class DnsMessageDecoderTest extends AbstractDnsTestCase
 {
     private ByteBuffer requestByteBuffer;
 
+
+    public DnsMessageDecoderTest()
+    {
+        super( DnsMessageDecoderTest.class );
+    }
+
+
     public void testParseQuery() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DNS-QUERY.pdu" );
@@ -35,6 +44,7 @@
 
         print( dnsRequest );
     }
+
 
     public void testParseResponse() throws Exception
     {

Propchange: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/pom.xml?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/pom.xml (original)
+++ directory/trunks/apacheds/protocol-kerberos/pom.xml Sun Feb 19 19:57:02 2006
@@ -4,11 +4,13 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>build</artifactId>
-    <version>1.0-RC1-SNAPSHOT</version>
+    <version>1.0-RC1</version>
   </parent>
-  <version>0.7-SNAPSHOT</version>
   <artifactId>apacheds-protocol-kerberos</artifactId>
   <name>ApacheDS Protocol Kerberos</name>
+  <description>
+    The Kerberos Protocol Provider for ApacheDS
+  </description>
   <packaging>jar</packaging>  
   <dependencies>
     <dependency>
@@ -20,7 +22,7 @@
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-kerberos-shared</artifactId>
-      <version>0.7-SNAPSHOT</version>
+      <version>${pom.version}</version>
     </dependency>
   </dependencies>
 </project>

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java Sun Feb 19 19:57:02 2006
@@ -17,6 +17,7 @@
 
 package org.apache.directory.server.kerberos.kdc;
 
+
 import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.HashMap;
@@ -28,9 +29,10 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.configuration.ConfigurationException;
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.protocol.shared.LoadStrategy;
 import org.apache.directory.server.protocol.shared.ServiceConfiguration;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
+
 
 public class KdcConfiguration extends ServiceConfiguration
 {
@@ -85,7 +87,8 @@
     private static final long DEFAULT_ALLOWABLE_CLOCKSKEW = 5 * MINUTE;
 
     /** the default encryption types */
-    private static final String[] DEFAULT_ENCRYPTION_TYPES = new String[] { "des-cbc-md5" };
+    private static final String[] DEFAULT_ENCRYPTION_TYPES = new String[]
+        { "des-cbc-md5" };
 
     /** the default for allowing empty addresses */
     private static final boolean DEFAULT_EMPTY_ADDRESSES_ALLOWED = true;
@@ -117,6 +120,7 @@
 
     private EncryptionType[] encryptionTypes;
 
+
     /**
      * Creates a new instance with default settings.
      */
@@ -125,22 +129,25 @@
         this( getDefaultConfig(), LoadStrategy.LDAP );
     }
 
+
     /**
      * Creates a new instance with default settings that operates on the
      * {@link DirectoryService} with the specified ID.
      */
-    public KdcConfiguration( String instanceId )
+    public KdcConfiguration(String instanceId)
     {
         this( getDefaultConfig(), LoadStrategy.LDAP );
         setInstanceId( instanceId );
     }
 
-    public KdcConfiguration( Map properties )
+
+    public KdcConfiguration(Map properties)
     {
         this( properties, LoadStrategy.LDAP );
     }
 
-    public KdcConfiguration( Map properties, int strategy )
+
+    public KdcConfiguration(Map properties, int strategy)
     {
         if ( properties == null )
         {
@@ -161,6 +168,7 @@
         prepareEncryptionTypes();
     }
 
+
     public static Map getDefaultConfig()
     {
         Map defaults = new HashMap();
@@ -171,11 +179,12 @@
         return defaults;
     }
 
+
     public boolean isDifferent( Dictionary config )
     {
         int port = getPort();
 
-        if ( port == Integer.parseInt( (String) config.get( IP_PORT_KEY ) ) )
+        if ( port == Integer.parseInt( ( String ) config.get( IP_PORT_KEY ) ) )
         {
             return false;
         }
@@ -183,11 +192,13 @@
         return true;
     }
 
+
     public String getName()
     {
         return DEFAULT_NAME;
     }
 
+
     public String getPrimaryRealm()
     {
         String key = REALM_KEY;
@@ -200,6 +211,7 @@
         return DEFAULT_REALM;
     }
 
+
     public KerberosPrincipal getKdcPrincipal()
     {
         String key = PRINCIPAL_KEY;
@@ -212,11 +224,13 @@
         return new KerberosPrincipal( DEFAULT_PRINCIPAL );
     }
 
+
     public EncryptionType[] getEncryptionTypes()
     {
         return encryptionTypes;
     }
 
+
     public Map getProperties()
     {
         // Request that the krb5key value be returned as binary
@@ -225,6 +239,7 @@
         return configuration;
     }
 
+
     public long getClockSkew()
     {
         String key = ALLOWABLE_CLOCKSKEW_KEY;
@@ -237,6 +252,7 @@
         return DEFAULT_ALLOWABLE_CLOCKSKEW;
     }
 
+
     public int getPort()
     {
         String key = IP_PORT_KEY;
@@ -249,6 +265,7 @@
         return Integer.parseInt( DEFAULT_IP_PORT );
     }
 
+
     public int getBufferSize()
     {
         String key = BUFFER_SIZE_KEY;
@@ -261,6 +278,7 @@
         return DEFAULT_BUFFER_SIZE;
     }
 
+
     public boolean isPaEncTimestampRequired()
     {
         String key = PA_ENC_TIMESTAMP_REQUIRED_KEY;
@@ -273,6 +291,7 @@
         return DEFAULT_PA_ENC_TIMESTAMP_REQUIRED;
     }
 
+
     public long getMaximumTicketLifetime()
     {
         String key = TGS_MAXIMUM_TICKET_LIFETIME_KEY;
@@ -285,6 +304,7 @@
         return DEFAULT_TGS_MAXIMUM_TICKET_LIFETIME;
     }
 
+
     public long getMaximumRenewableLifetime()
     {
         String key = TGS_MAXIMUM_RENEWABLE_LIFETIME_KEY;
@@ -297,6 +317,7 @@
         return DEFAULT_TGS_MAXIMUM_RENEWABLE_LIFETIME;
     }
 
+
     public boolean isEmptyAddressesAllowed()
     {
         String key = EMPTY_ADDRESSES_ALLOWED_KEY;
@@ -309,6 +330,7 @@
         return DEFAULT_EMPTY_ADDRESSES_ALLOWED;
     }
 
+
     public boolean isForwardableAllowed()
     {
         String key = TGS_FORWARDABLE_ALLOWED_KEY;
@@ -321,6 +343,7 @@
         return DEFAULT_TGS_FORWARDABLE_ALLOWED;
     }
 
+
     public boolean isProxiableAllowed()
     {
         String key = TGS_PROXIABLE_ALLOWED_KEY;
@@ -333,6 +356,7 @@
         return DEFAULT_TGS_PROXIABLE_ALLOWED;
     }
 
+
     public boolean isPostdateAllowed()
     {
         String key = TGS_POSTDATE_ALLOWED_KEY;
@@ -345,6 +369,7 @@
         return DEFAULT_TGS_POSTDATE_ALLOWED;
     }
 
+
     public boolean isRenewableAllowed()
     {
         String key = TGS_RENEWABLE_ALLOWED_KEY;
@@ -357,6 +382,7 @@
         return DEFAULT_TGS_RENEWABLE_ALLOWED;
     }
 
+
     private void prepareEncryptionTypes()
     {
         String[] encryptionTypeStrings = null;
@@ -376,13 +402,13 @@
 
         for ( int i = 0; i < encryptionTypeStrings.length; i++ )
         {
-            String enc = encryptionTypeStrings[ i ];
+            String enc = encryptionTypeStrings[i];
 
             Iterator it = EncryptionType.VALUES.iterator();
 
             while ( it.hasNext() )
             {
-                EncryptionType type = (EncryptionType) it.next();
+                EncryptionType type = ( EncryptionType ) it.next();
 
                 if ( type.toString().equalsIgnoreCase( enc ) )
                 {
@@ -391,6 +417,6 @@
             }
         }
 
-        encryptionTypes = (EncryptionType[]) encTypes.toArray( new EncryptionType[ encTypes.size() ] );
+        encryptionTypes = ( EncryptionType[] ) encTypes.toArray( new EncryptionType[encTypes.size()] );
     }
 }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcContext.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcContext.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcContext.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcContext.java Sun Feb 19 19:57:02 2006
@@ -16,13 +16,15 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
 import java.net.InetAddress;
 
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
+import org.apache.directory.server.kerberos.shared.messages.KerberosMessage;
+import org.apache.directory.server.kerberos.shared.service.LockBox;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.protocol.shared.chain.impl.ContextBase;
-import org.apache.kerberos.messages.KdcRequest;
-import org.apache.kerberos.messages.KerberosMessage;
-import org.apache.kerberos.service.LockBox;
-import org.apache.kerberos.store.PrincipalStore;
+
 
 public class KdcContext extends ContextBase
 {
@@ -35,6 +37,7 @@
     private InetAddress clientAddress;
     private LockBox lockBox;
 
+
     /**
      * @return Returns the config.
      */
@@ -43,6 +46,7 @@
         return config;
     }
 
+
     /**
      * @param config The config to set.
      */
@@ -51,6 +55,7 @@
         this.config = config;
     }
 
+
     /**
      * @return Returns the store.
      */
@@ -59,6 +64,7 @@
         return store;
     }
 
+
     /**
      * @param store The store to set.
      */
@@ -67,6 +73,7 @@
         this.store = store;
     }
 
+
     /**
      * @return Returns the request.
      */
@@ -75,6 +82,7 @@
         return request;
     }
 
+
     /**
      * @param request The request to set.
      */
@@ -83,6 +91,7 @@
         this.request = request;
     }
 
+
     /**
      * @return Returns the reply.
      */
@@ -91,6 +100,7 @@
         return reply;
     }
 
+
     /**
      * @param reply The reply to set.
      */
@@ -99,6 +109,7 @@
         this.reply = reply;
     }
 
+
     /**
      * @return Returns the clientAddress.
      */
@@ -107,6 +118,7 @@
         return clientAddress;
     }
 
+
     /**
      * @param clientAddress The clientAddress to set.
      */
@@ -115,6 +127,7 @@
         this.clientAddress = clientAddress;
     }
 
+
     /**
      * @return Returns the lockBox.
      */
@@ -122,6 +135,7 @@
     {
         return lockBox;
     }
+
 
     /**
      * @param lockBox The lockBox to set.

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcContext.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KerberosServer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KerberosServer.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KerberosServer.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KerberosServer.java Sun Feb 19 19:57:02 2006
@@ -17,11 +17,12 @@
 
 package org.apache.directory.server.kerberos.kdc;
 
+
 import java.io.IOException;
 import java.util.Dictionary;
 
 import org.apache.directory.server.kerberos.protocol.KerberosProtocolHandler;
-import org.apache.kerberos.store.PrincipalStore;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.TransportType;
 import org.apache.mina.registry.Service;
@@ -29,6 +30,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * A wrapper encapsulating configuration, a MINA registry, and a PrincipalStore
  * to implement a complete Kerberos server. 
@@ -49,7 +51,8 @@
     private Service tcpService;
     private Service udpService;
 
-    public KerberosServer( KdcConfiguration config, ServiceRegistry registry, PrincipalStore store )
+
+    public KerberosServer(KdcConfiguration config, ServiceRegistry registry, PrincipalStore store)
     {
         this.config = config;
         this.registry = registry;
@@ -76,10 +79,12 @@
         }
     }
 
+
     public boolean isDifferent( Dictionary newConfig )
     {
         return config.isDifferent( newConfig );
     }
+
 
     public void destroy()
     {

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KerberosServer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorContext.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorContext.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorContext.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorContext.java Sun Feb 19 19:57:02 2006
@@ -16,30 +16,30 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class MonitorContext extends CommandBase
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( MonitorContext.class );
 
+
     public boolean execute( Context context ) throws Exception
     {
-        KdcContext kdcContext = (KdcContext) context;
+        KdcContext kdcContext = ( KdcContext ) context;
 
         if ( log.isDebugEnabled() )
         {
-            log.debug( "Monitoring context:"
-                    + "\n\tconfig:                 " + kdcContext.getConfig()
-                    + "\n\tstore:                  " + kdcContext.getStore()
-                    + "\n\trequest:                " + kdcContext.getRequest()
-                    + "\n\treply:                  " + kdcContext.getReply()
-                     );
+            log.debug( "Monitoring context:" + "\n\tconfig:                 " + kdcContext.getConfig()
+                + "\n\tstore:                  " + kdcContext.getStore() + "\n\trequest:                "
+                + kdcContext.getRequest() + "\n\treply:                  " + kdcContext.getReply() );
         }
-        
+
         return CONTINUE_CHAIN;
     }
 }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorContext.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorReply.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorReply.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorReply.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorReply.java Sun Feb 19 19:57:02 2006
@@ -16,61 +16,56 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
+import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
+import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.messages.ErrorMessage;
-import org.apache.kerberos.messages.KdcReply;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class MonitorReply extends CommandBase
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( MonitorReply.class );
 
+
     public boolean execute( Context context ) throws Exception
     {
-        KdcContext kdcContext = (KdcContext) context;
+        KdcContext kdcContext = ( KdcContext ) context;
         Object message = kdcContext.getReply();
-        
+
         if ( message instanceof KdcReply )
         {
-            KdcReply reply = (KdcReply) message;
-            
+            KdcReply reply = ( KdcReply ) message;
+
             if ( log.isDebugEnabled() )
             {
-                log.debug( "Responding to authentication request with reply:"
-                        + "\n\tclient realm:          " + reply.getClientRealm()
-                        + "\n\tserver realm:          " + reply.getServerRealm()
-                        + "\n\tserverPrincipal:       " + reply.getServerPrincipal()
-                        + "\n\tclientPrincipal:       " + reply.getClientPrincipal()
-                        + "\n\thostAddresses:         " + reply.getClientAddresses()
-                        + "\n\tstart time:            " + reply.getStartTime()
-                        + "\n\tend time:              " + reply.getEndTime()
-                        + "\n\tauth time:             " + reply.getAuthTime()
-                        + "\n\trenew till time:       " + reply.getRenewTill()
-                        + "\n\tmessageType:           " + reply.getMessageType()
-                        + "\n\tnonce:                 " + reply.getNonce()
-                        + "\n\tprotocolVersionNumber: " + reply.getProtocolVersionNumber()
-                         );
+                log.debug( "Responding to authentication request with reply:" + "\n\tclient realm:          "
+                    + reply.getClientRealm() + "\n\tserver realm:          " + reply.getServerRealm()
+                    + "\n\tserverPrincipal:       " + reply.getServerPrincipal() + "\n\tclientPrincipal:       "
+                    + reply.getClientPrincipal() + "\n\thostAddresses:         " + reply.getClientAddresses()
+                    + "\n\tstart time:            " + reply.getStartTime() + "\n\tend time:              "
+                    + reply.getEndTime() + "\n\tauth time:             " + reply.getAuthTime()
+                    + "\n\trenew till time:       " + reply.getRenewTill() + "\n\tmessageType:           "
+                    + reply.getMessageType() + "\n\tnonce:                 " + reply.getNonce()
+                    + "\n\tprotocolVersionNumber: " + reply.getProtocolVersionNumber() );
             }
         }
         else
         {
             if ( message instanceof ErrorMessage )
             {
-                ErrorMessage error = (ErrorMessage) message;
-                
+                ErrorMessage error = ( ErrorMessage ) message;
+
                 if ( log.isDebugEnabled() )
                 {
-                    log.debug( "Responding to authentication request with error:"
-                            + "\n\tserverPrincipal:       " + error.getServerPrincipal()
-                            + "\n\tclientPrincipal:       " + error.getClientPrincipal()
-                            + "\n\tserver time:           " + error.getClientTime()
-                            + "\n\tclient time:           " + error.getServerTime()
-                            + "\n\terror code:            " + error.getErrorCode()
-                            + "\n\texplanatory text:      " + error.getExplanatoryText()
-                             );
+                    log.debug( "Responding to authentication request with error:" + "\n\tserverPrincipal:       "
+                        + error.getServerPrincipal() + "\n\tclientPrincipal:       " + error.getClientPrincipal()
+                        + "\n\tserver time:           " + error.getClientTime() + "\n\tclient time:           "
+                        + error.getServerTime() + "\n\terror code:            " + error.getErrorCode()
+                        + "\n\texplanatory text:      " + error.getExplanatoryText() );
                 }
             }
         }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorReply.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorRequest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorRequest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorRequest.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorRequest.java Sun Feb 19 19:57:02 2006
@@ -16,46 +16,44 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
-import org.apache.kerberos.messages.KdcRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class MonitorRequest extends CommandBase
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( MonitorRequest.class );
 
+
     public boolean execute( Context context ) throws Exception
     {
-        KdcContext kdcContext = (KdcContext) context;
+        KdcContext kdcContext = ( KdcContext ) context;
         KdcRequest request = kdcContext.getRequest();
         String clientAddress = kdcContext.getClientAddress().getHostAddress();
 
         if ( log.isDebugEnabled() )
         {
-            log.debug( "Responding to authentication request:"
-                    + "\n\trealm:                 " + request.getRealm()
-                    + "\n\tserverPrincipal:       " + request.getServerPrincipal()
-                    + "\n\tclientPrincipal:       " + request.getClientPrincipal()
-                    + "\n\tclientAddress:         " + clientAddress
-                    + "\n\thostAddresses:         " + request.getAddresses()
-                    + "\n\tencryptionType:        " + getEncryptionTypes( request )
-                    + "\n\tfrom krb time:         " + request.getFrom()
-                    + "\n\trealm krb time:        " + request.getRtime()
-                    + "\n\tkdcOptions:            " + request.getKdcOptions()
-                    + "\n\tmessageType:           " + request.getMessageType()
-                    + "\n\tnonce:                 " + request.getNonce()
-                    + "\n\tprotocolVersionNumber: " + request.getProtocolVersionNumber()
-                    + "\n\ttill:                  " + request.getTill()
-                     );
+            log.debug( "Responding to authentication request:" + "\n\trealm:                 " + request.getRealm()
+                + "\n\tserverPrincipal:       " + request.getServerPrincipal() + "\n\tclientPrincipal:       "
+                + request.getClientPrincipal() + "\n\tclientAddress:         " + clientAddress
+                + "\n\thostAddresses:         " + request.getAddresses() + "\n\tencryptionType:        "
+                + getEncryptionTypes( request ) + "\n\tfrom krb time:         " + request.getFrom()
+                + "\n\trealm krb time:        " + request.getRtime() + "\n\tkdcOptions:            "
+                + request.getKdcOptions() + "\n\tmessageType:           " + request.getMessageType()
+                + "\n\tnonce:                 " + request.getNonce() + "\n\tprotocolVersionNumber: "
+                + request.getProtocolVersionNumber() + "\n\ttill:                  " + request.getTill() );
         }
 
         return CONTINUE_CHAIN;
     }
 
+
     public String getEncryptionTypes( KdcRequest request )
     {
         EncryptionType[] etypes = request.getEType();
@@ -64,7 +62,7 @@
 
         for ( int ii = 0; ii < etypes.length; ii++ )
         {
-            sb.append( etypes[ ii ].toString() );
+            sb.append( etypes[ii].toString() );
 
             if ( ii < etypes.length - 1 )
             {

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/MonitorRequest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectChecksumType.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectChecksumType.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectChecksumType.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectChecksumType.java Sun Feb 19 19:57:02 2006
@@ -16,11 +16,13 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
+import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.crypto.checksum.ChecksumType;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.exceptions.KerberosException;
+
 
 public class SelectChecksumType extends CommandBase
 {
@@ -36,15 +38,16 @@
         return CONTINUE_CHAIN;
     }
 
+
     protected boolean isAllowedChecksumType( ChecksumType requestedType, ChecksumType[] configuredTypes )
     {
-            for ( int ii = 0; ii < configuredTypes.length; ii++ )
+        for ( int ii = 0; ii < configuredTypes.length; ii++ )
+        {
+            if ( requestedType == configuredTypes[ii] )
             {
-                if ( requestedType == configuredTypes[ ii ] )
-                {
-                    return true;
-                }
+                return true;
             }
+        }
 
         return false;
     }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectChecksumType.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectEncryptionType.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectEncryptionType.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectEncryptionType.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectEncryptionType.java Sun Feb 19 19:57:02 2006
@@ -16,17 +16,19 @@
  */
 package org.apache.directory.server.kerberos.kdc;
 
+
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.exceptions.KerberosException;
+
 
 public class SelectEncryptionType extends CommandBase
 {
     public boolean execute( Context context ) throws Exception
     {
-        KdcContext kdcContext = (KdcContext) context;
+        KdcContext kdcContext = ( KdcContext ) context;
         KdcConfiguration config = kdcContext.getConfig();
 
         EncryptionType[] requestedTypes = kdcContext.getRequest().getEType();
@@ -41,16 +43,16 @@
         return CONTINUE_CHAIN;
     }
 
-    protected EncryptionType getBestEncryptionType( EncryptionType[] requestedTypes,
-            EncryptionType[] configuredTypes )
+
+    protected EncryptionType getBestEncryptionType( EncryptionType[] requestedTypes, EncryptionType[] configuredTypes )
     {
         for ( int ii = 0; ii < requestedTypes.length; ii++ )
         {
             for ( int jj = 0; jj < configuredTypes.length; jj++ )
             {
-                if ( requestedTypes[ ii ] == configuredTypes[ jj ] )
+                if ( requestedTypes[ii] == configuredTypes[jj] )
                 {
-                    return configuredTypes[ jj ];
+                    return configuredTypes[jj];
                 }
             }
         }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/SelectEncryptionType.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationContext.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationContext.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationContext.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationContext.java Sun Feb 19 19:57:02 2006
@@ -16,14 +16,16 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.directory.server.kerberos.kdc.KdcContext;
-import org.apache.kerberos.messages.components.Ticket;
-import org.apache.kerberos.messages.value.EncryptionKey;
-import org.apache.kerberos.replay.ReplayCache;
-import org.apache.kerberos.store.PrincipalStoreEntry;
+import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
+
 
 public class AuthenticationContext extends KdcContext
 {
@@ -39,6 +41,7 @@
     private PrincipalStoreEntry clientEntry;
     private PrincipalStoreEntry serverEntry;
 
+
     /**
      * @return Returns the serverEntry.
      */
@@ -47,6 +50,7 @@
         return serverEntry;
     }
 
+
     /**
      * @param serverEntry The serverEntry to set.
      */
@@ -55,6 +59,7 @@
         this.serverEntry = serverEntry;
     }
 
+
     /**
      * @return Returns the clientEntry.
      */
@@ -63,6 +68,7 @@
         return clientEntry;
     }
 
+
     /**
      * @param clientEntry The clientEntry to set.
      */
@@ -71,6 +77,7 @@
         this.clientEntry = clientEntry;
     }
 
+
     /**
      * @return Returns the checksumEngines.
      */
@@ -79,6 +86,7 @@
         return checksumEngines;
     }
 
+
     /**
      * @param checksumEngines The checksumEngines to set.
      */
@@ -87,6 +95,7 @@
         this.checksumEngines = checksumEngines;
     }
 
+
     /**
      * @return Returns the replayCache.
      */
@@ -95,6 +104,7 @@
         return replayCache;
     }
 
+
     /**
      * @param replayCache The replayCache to set.
      */
@@ -103,6 +113,7 @@
         this.replayCache = replayCache;
     }
 
+
     /**
      * @return Returns the clientKey.
      */
@@ -111,6 +122,7 @@
         return clientKey;
     }
 
+
     /**
      * @param clientKey The clientKey to set.
      */
@@ -119,6 +131,7 @@
         this.clientKey = clientKey;
     }
 
+
     /**
      * @return Returns the sessionKey.
      */
@@ -127,6 +140,7 @@
         return sessionKey;
     }
 
+
     /**
      * @param sessionKey The sessionKey to set.
      */
@@ -135,6 +149,7 @@
         this.sessionKey = sessionKey;
     }
 
+
     /**
      * @return Returns the ticket.
      */
@@ -142,6 +157,7 @@
     {
         return ticket;
     }
+
 
     /**
      * @param ticket The ticket to set.

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationContext.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationExceptionHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationExceptionHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationExceptionHandler.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationExceptionHandler.java Sun Feb 19 19:57:02 2006
@@ -16,23 +16,27 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
+import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
+import org.apache.directory.server.kerberos.shared.service.ErrorMessageHandler;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.exceptions.KerberosException;
-import org.apache.kerberos.messages.ErrorMessage;
-import org.apache.kerberos.service.ErrorMessageHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class AuthenticationExceptionHandler extends ErrorMessageHandler
 {
     private static final Logger log = LoggerFactory.getLogger( AuthenticationExceptionHandler.class );
 
+
     public boolean execute( Context context ) throws Exception
     {
         return CONTINUE_CHAIN;
     }
 
+
     public boolean postprocess( Context context, Exception exception )
     {
         if ( exception == null )
@@ -49,9 +53,9 @@
             log.info( exception.getMessage() );
         }
 
-        AuthenticationContext authContext = (AuthenticationContext) context;
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
         KdcConfiguration config = authContext.getConfig();
-        KerberosException ke = (KerberosException) exception;
+        KerberosException ke = ( KerberosException ) exception;
 
         ErrorMessage errorMessage = getErrorMessage( config.getKdcPrincipal(), ke );
 

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationExceptionHandler.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java Sun Feb 19 19:57:02 2006
@@ -16,9 +16,11 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import org.apache.directory.server.kerberos.kdc.MonitorRequest;
 import org.apache.directory.server.kerberos.kdc.preauthentication.PreAuthenticationChain;
 import org.apache.directory.server.protocol.shared.chain.impl.ChainBase;
+
 
 public class AuthenticationServiceChain extends ChainBase
 {

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationServiceChain.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/BuildReply.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/BuildReply.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/BuildReply.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/BuildReply.java Sun Feb 19 19:57:02 2006
@@ -16,19 +16,21 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
+import org.apache.directory.server.kerberos.shared.messages.AuthenticationReply;
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
+import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
+import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
+import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.messages.AuthenticationReply;
-import org.apache.kerberos.messages.KdcRequest;
-import org.apache.kerberos.messages.components.Ticket;
-import org.apache.kerberos.messages.value.LastRequest;
-import org.apache.kerberos.messages.value.TicketFlags;
+
 
 public class BuildReply extends CommandBase
 {
     public boolean execute( Context ctx ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) ctx;
+        AuthenticationContext authContext = ( AuthenticationContext ) ctx;
         KdcRequest request = authContext.getRequest();
         Ticket ticket = authContext.getTicket();
 

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/BuildReply.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ConfigureAuthenticationChain.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ConfigureAuthenticationChain.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ConfigureAuthenticationChain.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ConfigureAuthenticationChain.java Sun Feb 19 19:57:02 2006
@@ -16,27 +16,30 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import java.util.Map;
 
+import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
+import org.apache.directory.server.kerberos.shared.crypto.checksum.Crc32Checksum;
+import org.apache.directory.server.kerberos.shared.crypto.checksum.RsaMd4Checksum;
+import org.apache.directory.server.kerberos.shared.crypto.checksum.RsaMd5Checksum;
+import org.apache.directory.server.kerberos.shared.crypto.checksum.Sha1Checksum;
+import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
+import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
+import org.apache.directory.server.kerberos.shared.service.LockBox;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.crypto.checksum.ChecksumType;
-import org.apache.kerberos.crypto.checksum.Crc32Checksum;
-import org.apache.kerberos.crypto.checksum.RsaMd4Checksum;
-import org.apache.kerberos.crypto.checksum.RsaMd5Checksum;
-import org.apache.kerberos.crypto.checksum.Sha1Checksum;
-import org.apache.kerberos.replay.InMemoryReplayCache;
-import org.apache.kerberos.replay.ReplayCache;
-import org.apache.kerberos.service.LockBox;
+
 
 public class ConfigureAuthenticationChain extends CommandBase
 {
     private static final ReplayCache replayCache = new InMemoryReplayCache();
     private static final LockBox lockBox = new LockBox();
 
+
     public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
 
         authContext.setReplayCache( replayCache );
         authContext.setLockBox( lockBox );

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ConfigureAuthenticationChain.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java Sun Feb 19 19:57:02 2006
@@ -16,35 +16,38 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
+import org.apache.directory.server.kerberos.shared.messages.components.EncTicketPart;
+import org.apache.directory.server.kerberos.shared.messages.components.EncTicketPartModifier;
+import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
+import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
+import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.service.LockBox;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.exceptions.KerberosException;
-import org.apache.kerberos.messages.KdcRequest;
-import org.apache.kerberos.messages.components.EncTicketPart;
-import org.apache.kerberos.messages.components.EncTicketPartModifier;
-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.KdcOptions;
-import org.apache.kerberos.messages.value.KerberosTime;
-import org.apache.kerberos.messages.value.TicketFlags;
-import org.apache.kerberos.messages.value.TransitedEncoding;
-import org.apache.kerberos.service.LockBox;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class GenerateTicket extends CommandBase
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( GenerateTicket.class );
-    
-    public boolean execute(Context context) throws Exception
+
+
+    public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
 
         KdcRequest request = authContext.getRequest();
         LockBox lockBox = authContext.getLockBox();
@@ -55,82 +58,79 @@
         KdcConfiguration config = authContext.getConfig();
         EncryptionKey sessionKey = authContext.getSessionKey();
 
-        if(request.getKdcOptions().get(KdcOptions.FORWARDABLE))
+        if ( request.getKdcOptions().get( KdcOptions.FORWARDABLE ) )
         {
-            newTicketBody.setFlag(TicketFlags.FORWARDABLE);
+            newTicketBody.setFlag( TicketFlags.FORWARDABLE );
         }
 
-        if(request.getKdcOptions().get(KdcOptions.PROXIABLE))
+        if ( request.getKdcOptions().get( KdcOptions.PROXIABLE ) )
         {
-            newTicketBody.setFlag(TicketFlags.PROXIABLE);
+            newTicketBody.setFlag( TicketFlags.PROXIABLE );
         }
 
-        if(request.getKdcOptions().get(KdcOptions.ALLOW_POSTDATE))
+        if ( request.getKdcOptions().get( KdcOptions.ALLOW_POSTDATE ) )
         {
-            newTicketBody.setFlag(TicketFlags.MAY_POSTDATE);
+            newTicketBody.setFlag( TicketFlags.MAY_POSTDATE );
         }
 
-        if(request.getKdcOptions().get(KdcOptions.RENEW) ||
-                request.getKdcOptions().get(KdcOptions.VALIDATE) ||
-                request.getKdcOptions().get(KdcOptions.PROXY) ||
-                request.getKdcOptions().get(KdcOptions.FORWARDED) ||
-                request.getKdcOptions().get(KdcOptions.ENC_TKT_IN_SKEY))
+        if ( request.getKdcOptions().get( KdcOptions.RENEW ) || request.getKdcOptions().get( KdcOptions.VALIDATE )
+            || request.getKdcOptions().get( KdcOptions.PROXY ) || request.getKdcOptions().get( KdcOptions.FORWARDED )
+            || request.getKdcOptions().get( KdcOptions.ENC_TKT_IN_SKEY ) )
         {
             throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
         }
 
         newTicketBody.setSessionKey( sessionKey );
-        newTicketBody.setClientPrincipal(request.getClientPrincipal());
-        newTicketBody.setTransitedEncoding(new TransitedEncoding());
+        newTicketBody.setClientPrincipal( request.getClientPrincipal() );
+        newTicketBody.setTransitedEncoding( new TransitedEncoding() );
 
         KerberosTime now = new KerberosTime();
-        newTicketBody.setAuthTime(now);
+        newTicketBody.setAuthTime( now );
 
-        if (request.getKdcOptions().get(KdcOptions.POSTDATED))
+        if ( request.getKdcOptions().get( KdcOptions.POSTDATED ) )
         {
             // TODO - possibly allow req.from range
-            if (!config.isPostdateAllowed())
+            if ( !config.isPostdateAllowed() )
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
-            newTicketBody.setFlag(TicketFlags.INVALID);
-            newTicketBody.setStartTime(request.getFrom());
+            newTicketBody.setFlag( TicketFlags.INVALID );
+            newTicketBody.setStartTime( request.getFrom() );
         }
 
         long till = 0;
-        if (request.getTill().getTime() == 0)
-                till = Long.MAX_VALUE;
+        if ( request.getTill().getTime() == 0 )
+            till = Long.MAX_VALUE;
         else
-                till = request.getTill().getTime();
+            till = request.getTill().getTime();
         /*
-        new_tkt.endtime := min(till,
-                              new_tkt.starttime+client.max_life,
-                              new_tkt.starttime+server.max_life,
-                              new_tkt.starttime+max_life_for_realm);
-        */
-        long endTime = Math.min(now.getTime() + config.getMaximumTicketLifetime(), till);
-        KerberosTime kerberosEndTime = new KerberosTime(endTime);
-        newTicketBody.setEndTime(kerberosEndTime);
+         new_tkt.endtime := min(till,
+         new_tkt.starttime+client.max_life,
+         new_tkt.starttime+server.max_life,
+         new_tkt.starttime+max_life_for_realm);
+         */
+        long endTime = Math.min( now.getTime() + config.getMaximumTicketLifetime(), till );
+        KerberosTime kerberosEndTime = new KerberosTime( endTime );
+        newTicketBody.setEndTime( kerberosEndTime );
 
         long tempRtime = 0;
-        if (request.getKdcOptions().get(KdcOptions.RENEWABLE_OK) &&
-                request.getTill().greaterThan(kerberosEndTime))
+        if ( request.getKdcOptions().get( KdcOptions.RENEWABLE_OK ) && request.getTill().greaterThan( kerberosEndTime ) )
         {
-            request.getKdcOptions().set(KdcOptions.RENEWABLE);
+            request.getKdcOptions().set( KdcOptions.RENEWABLE );
             tempRtime = request.getTill().getTime();
         }
 
         /*
-        if (req.kdc-options.RENEWABLE is set) then
-                set new_tkt.flags.RENEWABLE;
-                new_tkt.renew-till := min(rtime,
-                new_tkt.starttime+client.max_rlife,
-                new_tkt.starttime+server.max_rlife,
-                new_tkt.starttime+max_rlife_for_realm);
-        else
-                omit new_tkt.renew-till;
-        endif
-        */
+         if (req.kdc-options.RENEWABLE is set) then
+         set new_tkt.flags.RENEWABLE;
+         new_tkt.renew-till := min(rtime,
+         new_tkt.starttime+client.max_rlife,
+         new_tkt.starttime+server.max_rlife,
+         new_tkt.starttime+max_rlife_for_realm);
+         else
+         omit new_tkt.renew-till;
+         endif
+         */
 
-        if (tempRtime == 0)
+        if ( tempRtime == 0 )
         {
             tempRtime = Long.MAX_VALUE;
         }
@@ -153,22 +153,21 @@
                 fromTime = new KerberosTime();
             }
 
-            long renewTill = Math.min( fromTime.getTime()
-                    + config.getMaximumRenewableLifetime(), tempRtime );
+            long renewTill = Math.min( fromTime.getTime() + config.getMaximumRenewableLifetime(), tempRtime );
             newTicketBody.setRenewTill( new KerberosTime( renewTill ) );
         }
 
-        if (request.getAddresses() != null)
+        if ( request.getAddresses() != null )
         {
-            newTicketBody.setClientAddresses(request.getAddresses());
+            newTicketBody.setClientAddresses( request.getAddresses() );
         }
 
         EncTicketPart ticketPart = newTicketBody.getEncTicketPart();
 
         EncryptedData encryptedData = lockBox.seal( serverKey, ticketPart );
 
-        Ticket newTicket = new Ticket(ticketPrincipal, encryptedData);
-        newTicket.setEncTicketPart(ticketPart);
+        Ticket newTicket = new Ticket( ticketPrincipal, encryptedData );
+        newTicket.setEncTicketPart( ticketPart );
 
         if ( log.isDebugEnabled() )
         {
@@ -176,7 +175,7 @@
         }
 
         authContext.setTicket( newTicket );
-        
+
         return CONTINUE_CHAIN;
     }
 }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GenerateTicket.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetClientEntry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetClientEntry.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetClientEntry.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetClientEntry.java Sun Feb 19 19:57:02 2006
@@ -16,24 +16,26 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.service.GetPrincipalStoreEntry;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.service.GetPrincipalStoreEntry;
-import org.apache.kerberos.store.PrincipalStore;
+
 
 public class GetClientEntry extends GetPrincipalStoreEntry
 {
-    public boolean execute(Context context) throws Exception
+    public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
-        
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
+
         KerberosPrincipal principal = authContext.getRequest().getClientPrincipal();
         PrincipalStore store = authContext.getStore();
 
         authContext.setClientEntry( getEntry( principal, store, ErrorType.KDC_ERR_C_PRINCIPAL_UNKNOWN ) );
-        
+
         return CONTINUE_CHAIN;
     }
 }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetClientEntry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetServerEntry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetServerEntry.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetServerEntry.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetServerEntry.java Sun Feb 19 19:57:02 2006
@@ -16,24 +16,26 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.service.GetPrincipalStoreEntry;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.service.GetPrincipalStoreEntry;
-import org.apache.kerberos.store.PrincipalStore;
+
 
 public class GetServerEntry extends GetPrincipalStoreEntry
 {
-    public boolean execute(Context context) throws Exception
+    public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
-        
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
+
         KerberosPrincipal principal = authContext.getRequest().getServerPrincipal();
         PrincipalStore store = authContext.getStore();
-        
+
         authContext.setServerEntry( getEntry( principal, store, ErrorType.KDC_ERR_S_PRINCIPAL_UNKNOWN ) );
-        
+
         return CONTINUE_CHAIN;
     }
 }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetServerEntry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetSessionKey.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetSessionKey.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetSessionKey.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetSessionKey.java Sun Feb 19 19:57:02 2006
@@ -16,28 +16,32 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
 import java.security.SecureRandom;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.service.DesStringToKey;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
-import org.apache.kerberos.messages.value.EncryptionKey;
-import org.apache.kerberos.service.DesStringToKey;
+
 
 public class GetSessionKey extends DesStringToKey
 {
     private static final SecureRandom random = new SecureRandom();
 
+
     public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
         authContext.setSessionKey( getNewSessionKey() );
 
         return CONTINUE_CHAIN;
     }
 
+
     private EncryptionKey getNewSessionKey()
     {
-        byte[] confounder = new byte[ 8 ];
+        byte[] confounder = new byte[8];
 
         // SecureRandom.nextBytes is already synchronized
         random.nextBytes( confounder );

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/GetSessionKey.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/SealReply.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/SealReply.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/SealReply.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/SealReply.java Sun Feb 19 19:57:02 2006
@@ -16,20 +16,22 @@
  */
 package org.apache.directory.server.kerberos.kdc.authentication;
 
+
+import org.apache.directory.server.kerberos.shared.messages.AuthenticationReply;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.service.LockBox;
 import org.apache.directory.server.protocol.shared.chain.Context;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.messages.AuthenticationReply;
-import org.apache.kerberos.messages.value.EncryptedData;
-import org.apache.kerberos.messages.value.EncryptionKey;
-import org.apache.kerberos.service.LockBox;
+
 
 public class SealReply extends CommandBase
 {
     public boolean execute( Context context ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) context;
+        AuthenticationContext authContext = ( AuthenticationContext ) context;
 
-        AuthenticationReply reply = (AuthenticationReply) authContext.getReply();
+        AuthenticationReply reply = ( AuthenticationReply ) authContext.getReply();
         EncryptionKey clientKey = authContext.getClientKey();
         LockBox lockBox = authContext.getLockBox();
 

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/SealReply.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/PreAuthenticationChain.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/PreAuthenticationChain.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/PreAuthenticationChain.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/PreAuthenticationChain.java Sun Feb 19 19:57:02 2006
@@ -16,7 +16,9 @@
  */
 package org.apache.directory.server.kerberos.kdc.preauthentication;
 
+
 import org.apache.directory.server.protocol.shared.chain.impl.ChainBase;
+
 
 public class PreAuthenticationChain extends ChainBase
 {

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/PreAuthenticationChain.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifierBase.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifierBase.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifierBase.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifierBase.java Sun Feb 19 19:57:02 2006
@@ -16,31 +16,33 @@
  */
 package org.apache.directory.server.kerberos.kdc.preauthentication;
 
+
 import java.io.IOException;
 
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionTypeInfoEncoder;
+import org.apache.directory.server.kerberos.shared.io.encoder.PreAuthenticationDataEncoder;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionTypeInfoEntry;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationData;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataModifier;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataType;
 import org.apache.directory.server.protocol.shared.chain.impl.CommandBase;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
-import org.apache.kerberos.io.encoder.EncryptionTypeInfoEncoder;
-import org.apache.kerberos.io.encoder.PreAuthenticationDataEncoder;
-import org.apache.kerberos.messages.value.EncryptionTypeInfoEntry;
-import org.apache.kerberos.messages.value.PreAuthenticationData;
-import org.apache.kerberos.messages.value.PreAuthenticationDataModifier;
-import org.apache.kerberos.messages.value.PreAuthenticationDataType;
+
 
 public abstract class VerifierBase extends CommandBase
 {
     public byte[] preparePreAuthenticationError()
     {
-        PreAuthenticationData[] paDataSequence = new PreAuthenticationData[ 2 ];
+        PreAuthenticationData[] paDataSequence = new PreAuthenticationData[2];
 
         PreAuthenticationDataModifier modifier = new PreAuthenticationDataModifier();
         modifier.setDataType( PreAuthenticationDataType.PA_ENC_TIMESTAMP );
-        modifier.setDataValue( new byte[ 0 ] );
+        modifier.setDataValue( new byte[0] );
 
-        paDataSequence[ 0 ] = modifier.getPreAuthenticationData();
+        paDataSequence[0] = modifier.getPreAuthenticationData();
 
-        EncryptionTypeInfoEntry[] entries = new EncryptionTypeInfoEntry[ 1 ];
-        entries[ 0 ] = new EncryptionTypeInfoEntry( EncryptionType.DES_CBC_MD5, null );
+        EncryptionTypeInfoEntry[] entries = new EncryptionTypeInfoEntry[1];
+        entries[0] = new EncryptionTypeInfoEntry( EncryptionType.DES_CBC_MD5, null );
 
         byte[] encTypeInfo = null;
 
@@ -57,7 +59,7 @@
         encTypeModifier.setDataType( PreAuthenticationDataType.PA_ENCTYPE_INFO );
         encTypeModifier.setDataValue( encTypeInfo );
 
-        paDataSequence[ 1 ] = encTypeModifier.getPreAuthenticationData();
+        paDataSequence[1] = encTypeModifier.getPreAuthenticationData();
 
         try
         {

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifierBase.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java Sun Feb 19 19:57:02 2006
@@ -16,33 +16,36 @@
  */
 package org.apache.directory.server.kerberos.kdc.preauthentication;
 
+
 import java.io.IOException;
 
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
 import org.apache.directory.server.kerberos.kdc.authentication.AuthenticationContext;
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
+import org.apache.directory.server.kerberos.shared.io.decoder.EncryptedDataDecoder;
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptedTimeStamp;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationData;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataType;
+import org.apache.directory.server.kerberos.shared.service.LockBox;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.exceptions.KerberosException;
-import org.apache.kerberos.io.decoder.EncryptedDataDecoder;
-import org.apache.kerberos.messages.KdcRequest;
-import org.apache.kerberos.messages.value.EncryptedData;
-import org.apache.kerberos.messages.value.EncryptedTimeStamp;
-import org.apache.kerberos.messages.value.EncryptionKey;
-import org.apache.kerberos.messages.value.PreAuthenticationData;
-import org.apache.kerberos.messages.value.PreAuthenticationDataType;
-import org.apache.kerberos.service.LockBox;
-import org.apache.kerberos.store.PrincipalStoreEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class VerifyEncryptedTimestamp extends VerifierBase
 {
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( VerifyEncryptedTimestamp.class );
 
+
     public boolean execute( Context ctx ) throws Exception
     {
-        AuthenticationContext authContext = (AuthenticationContext) ctx;
+        AuthenticationContext authContext = ( AuthenticationContext ) ctx;
 
         if ( authContext.getClientKey() != null )
         {
@@ -63,7 +66,7 @@
             if ( log.isDebugEnabled() )
             {
                 log.debug( "entry for client principal " + clientName
-                        + " has no SAM type: proceeding with standard pre-authentication" );
+                    + " has no SAM type: proceeding with standard pre-authentication" );
             }
 
             clientKey = clientEntry.getEncryptionKey();
@@ -79,22 +82,20 @@
 
                 if ( preAuthData == null )
                 {
-                    throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED,
-                            preparePreAuthenticationError() );
+                    throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED, preparePreAuthenticationError() );
                 }
 
                 EncryptedTimeStamp timestamp = null;
 
                 for ( int ii = 0; ii < preAuthData.length; ii++ )
                 {
-                    if ( preAuthData[ ii ].getDataType().equals(
-                            PreAuthenticationDataType.PA_ENC_TIMESTAMP ) )
+                    if ( preAuthData[ii].getDataType().equals( PreAuthenticationDataType.PA_ENC_TIMESTAMP ) )
                     {
                         EncryptedData dataValue;
 
                         try
                         {
-                            dataValue = EncryptedDataDecoder.decode( preAuthData[ ii ].getDataValue() );
+                            dataValue = EncryptedDataDecoder.decode( preAuthData[ii].getDataValue() );
                         }
                         catch ( IOException ioe )
                         {
@@ -105,14 +106,14 @@
                             throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY );
                         }
 
-                        timestamp = (EncryptedTimeStamp) lockBox.unseal( EncryptedTimeStamp.class, clientKey, dataValue );
+                        timestamp = ( EncryptedTimeStamp ) lockBox.unseal( EncryptedTimeStamp.class, clientKey,
+                            dataValue );
                     }
                 }
 
                 if ( timestamp == null )
                 {
-                    throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED,
-                            preparePreAuthenticationError() );
+                    throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED, preparePreAuthenticationError() );
                 }
 
                 if ( !timestamp.getTimeStamp().isInClockSkew( config.getClockSkew() ) )

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifyEncryptedTimestamp.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java (original)
+++ directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java Sun Feb 19 19:57:02 2006
@@ -16,24 +16,26 @@
  */
 package org.apache.directory.server.kerberos.kdc.preauthentication;
 
+
 import javax.security.auth.kerberos.KerberosKey;
 
 import org.apache.directory.server.kerberos.kdc.authentication.AuthenticationContext;
 import org.apache.directory.server.kerberos.sam.SamException;
 import org.apache.directory.server.kerberos.sam.SamSubsystem;
 import org.apache.directory.server.kerberos.sam.TimestampChecker;
+import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
+import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
+import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
+import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
+import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationData;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataType;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.server.protocol.shared.chain.Context;
-import org.apache.kerberos.crypto.encryption.EncryptionType;
-import org.apache.kerberos.exceptions.ErrorType;
-import org.apache.kerberos.exceptions.KerberosException;
-import org.apache.kerberos.messages.KdcRequest;
-import org.apache.kerberos.messages.value.EncryptionKey;
-import org.apache.kerberos.messages.value.PreAuthenticationData;
-import org.apache.kerberos.messages.value.PreAuthenticationDataType;
-import org.apache.kerberos.store.PrincipalStoreEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class VerifySam extends VerifierBase
 {
     /** the log for this class */
@@ -45,10 +47,11 @@
         SamSubsystem.getInstance().setIntegrityChecker( new TimestampChecker() );
     }
 
+
     public boolean execute( Context ctx ) throws Exception
     {
         log.debug( "Verifying using SAM subsystem." );
-        AuthenticationContext authContext = (AuthenticationContext) ctx;
+        AuthenticationContext authContext = ( AuthenticationContext ) ctx;
         KdcRequest request = authContext.getRequest();
         PrincipalStoreEntry clientEntry = authContext.getClientEntry();
         String clientName = clientEntry.getPrincipal().getName();
@@ -60,28 +63,26 @@
             if ( log.isDebugEnabled() )
             {
                 log.debug( "entry for client principal " + clientName
-                        + " has a valid SAM type: invoking SAM subsystem for pre-authentication" );
+                    + " has a valid SAM type: invoking SAM subsystem for pre-authentication" );
             }
 
             PreAuthenticationData[] preAuthData = request.getPreAuthData();
 
             if ( preAuthData == null || preAuthData.length == 0 )
             {
-                throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED,
-                        preparePreAuthenticationError() );
+                throw new KerberosException( ErrorType.KDC_ERR_PREAUTH_REQUIRED, preparePreAuthenticationError() );
             }
 
             try
             {
                 for ( int ii = 0; ii < preAuthData.length; ii++ )
                 {
-                    if ( preAuthData[ ii ].getDataType().equals(
-                            PreAuthenticationDataType.PA_ENC_TIMESTAMP ) )
+                    if ( preAuthData[ii].getDataType().equals( PreAuthenticationDataType.PA_ENC_TIMESTAMP ) )
                     {
                         KerberosKey samKey = SamSubsystem.getInstance().verify( clientEntry,
-                                preAuthData[ ii ].getDataValue() );
-                        clientKey = new EncryptionKey( EncryptionType.getTypeByOrdinal( samKey
-                                .getKeyType() ), samKey.getEncoded() );
+                            preAuthData[ii].getDataValue() );
+                        clientKey = new EncryptionKey( EncryptionType.getTypeByOrdinal( samKey.getKeyType() ), samKey
+                            .getEncoded() );
                     }
                 }
             }

Propchange: directory/trunks/apacheds/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/preauthentication/VerifySam.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id



Mime
View raw message