directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1701690 - in /directory/apacheds/trunk: osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ protocol-kerberos/src/main/java/org/apache/di...
Date Mon, 07 Sep 2015 20:32:34 GMT
Author: seelmann
Date: Mon Sep  7 20:32:34 2015
New Revision: 1701690

URL: http://svn.apache.org/r1701690
Log:
Fix checkstyle issues

Modified:
    directory/apacheds/trunk/osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ServerProtocolKerberosOsgiTest.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolCodecFactory.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/KerberosProtocolCodecFactory.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java

Modified: directory/apacheds/trunk/osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ServerProtocolKerberosOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ServerProtocolKerberosOsgiTest.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ServerProtocolKerberosOsgiTest.java
(original)
+++ directory/apacheds/trunk/osgi-integ/src/test/java/org/apache/directory/server/osgi/integ/ServerProtocolKerberosOsgiTest.java
Mon Sep  7 20:32:34 2015
@@ -23,10 +23,7 @@ package org.apache.directory.server.osgi
 import org.apache.directory.server.kerberos.ChangePasswordConfig;
 import org.apache.directory.server.kerberos.KerberosConfig;
 import org.apache.directory.server.kerberos.changepwd.ChangePasswordServer;
-import org.apache.directory.server.kerberos.changepwd.service.ChangePasswordService;
 import org.apache.directory.server.kerberos.kdc.KdcServer;
-import org.apache.directory.server.kerberos.kdc.authentication.AuthenticationService;
-import org.apache.directory.server.kerberos.kdc.ticketgrant.TicketGrantingService;
 import org.apache.directory.server.kerberos.protocol.codec.KerberosProtocolCodecFactory;
 import org.apache.directory.server.kerberos.sam.SamSubsystem;
 import org.apache.directory.server.kerberos.sam.TimestampChecker;
@@ -48,12 +45,9 @@ public class ServerProtocolKerberosOsgiT
         new KerberosConfig();
         new ChangePasswordConfig();
         new KdcServer();
-        new TicketGrantingService();
-        new AuthenticationService();
         KerberosProtocolCodecFactory.getInstance().getDecoder( null );
         KerberosProtocolCodecFactory.getInstance().getEncoder( null );
         new ChangePasswordServer();
-        new ChangePasswordService();
         new TimestampChecker();
         SamSubsystem.getInstance();
     }

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolCodecFactory.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolCodecFactory.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolCodecFactory.java
Mon Sep  7 20:32:34 2015
@@ -30,7 +30,7 @@ import org.apache.mina.filter.codec.Prot
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ChangePasswordProtocolCodecFactory implements ProtocolCodecFactory
+public final class ChangePasswordProtocolCodecFactory implements ProtocolCodecFactory
 {
     private static final ChangePasswordProtocolCodecFactory INSTANCE = new ChangePasswordProtocolCodecFactory();
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
Mon Sep  7 20:32:34 2015
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
  */
 public class ChangePasswordProtocolHandler implements IoHandler
 {
-    private static final Logger log = LoggerFactory.getLogger( ChangePasswordProtocolHandler.class
);
+    private static final Logger LOG = LoggerFactory.getLogger( ChangePasswordProtocolHandler.class
);
 
     private ChangePasswordServer server;
     private PrincipalStore store;
@@ -77,9 +77,9 @@ public class ChangePasswordProtocolHandl
 
     public void sessionCreated( IoSession session ) throws Exception
     {
-        if ( log.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() )
         {
-            log.debug( "{} CREATED:  {}", session.getRemoteAddress(), session.getTransportMetadata()
);
+            LOG.debug( "{} CREATED:  {}", session.getRemoteAddress(), session.getTransportMetadata()
);
         }
 
         session.getFilterChain().addFirst( "codec",
@@ -89,32 +89,32 @@ public class ChangePasswordProtocolHandl
 
     public void sessionOpened( IoSession session )
     {
-        log.debug( "{} OPENED", session.getRemoteAddress() );
+        LOG.debug( "{} OPENED", session.getRemoteAddress() );
     }
 
 
     public void sessionClosed( IoSession session )
     {
-        log.debug( "{} CLOSED", session.getRemoteAddress() );
+        LOG.debug( "{} CLOSED", session.getRemoteAddress() );
     }
 
 
     public void sessionIdle( IoSession session, IdleStatus status )
     {
-        log.debug( "{} IDLE ({})", session.getRemoteAddress(), status );
+        LOG.debug( "{} IDLE ({})", session.getRemoteAddress(), status );
     }
 
 
     public void exceptionCaught( IoSession session, Throwable cause )
     {
-        log.debug( session.getRemoteAddress() + " EXCEPTION", cause );
+        LOG.debug( session.getRemoteAddress() + " EXCEPTION", cause );
         session.close( true );
     }
 
 
     public void messageReceived( IoSession session, Object message )
     {
-        log.debug( "{} RCVD:  {}", session.getRemoteAddress(), message );
+        LOG.debug( "{} RCVD:  {}", session.getRemoteAddress(), message );
 
         InetAddress clientAddress = ( ( InetSocketAddress ) session.getRemoteAddress() ).getAddress();
         ChangePasswordRequest request = ( ChangePasswordRequest ) message;
@@ -135,13 +135,13 @@ public class ChangePasswordProtocolHandl
         }
         catch ( KerberosException ke )
         {
-            if ( log.isDebugEnabled() )
+            if ( LOG.isDebugEnabled() )
             {
-                log.warn( ke.getLocalizedMessage(), ke );
+                LOG.warn( ke.getLocalizedMessage(), ke );
             }
             else
             {
-                log.warn( ke.getLocalizedMessage() );
+                LOG.warn( ke.getLocalizedMessage() );
             }
 
             KrbError errorMessage = getErrorMessage( server.getConfig().getServicePrincipal(),
ke );
@@ -150,7 +150,7 @@ public class ChangePasswordProtocolHandl
         }
         catch ( Exception e )
         {
-            log.error( I18n.err( I18n.ERR_152, e.getLocalizedMessage() ), e );
+            LOG.error( I18n.err( I18n.ERR_152, e.getLocalizedMessage() ), e );
 
             KrbError error = getErrorMessage( server.getConfig().getServicePrincipal(), new
ChangePasswordException(
                 ChangePasswdErrorType.KRB5_KPASSWD_UNKNOWN_ERROR ) );
@@ -161,9 +161,9 @@ public class ChangePasswordProtocolHandl
 
     public void messageSent( IoSession session, Object message )
     {
-        if ( log.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() )
         {
-            log.debug( "{} SENT:  {}", session.getRemoteAddress(), message );
+            LOG.debug( "{} SENT:  {}", session.getRemoteAddress(), message );
         }
     }
 
@@ -209,7 +209,7 @@ public class ChangePasswordProtocolHandl
             }
             catch ( UnsupportedEncodingException uee )
             {
-                log.error( uee.getLocalizedMessage() );
+                LOG.error( uee.getLocalizedMessage() );
             }
         }
         else

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/service/ChangePasswordService.java
Mon Sep  7 20:32:34 2015
@@ -63,12 +63,18 @@ import org.apache.mina.core.session.IoSe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class ChangePasswordService
+public final class ChangePasswordService
 {
     /** the logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ChangePasswordService.class
);
 
-    private static final CipherTextHandler cipherTextHandler = new CipherTextHandler();
+    private static final CipherTextHandler CIPHER_TEXT_HANDLER = new CipherTextHandler();
+
+
+    private ChangePasswordService()
+    {
+    }
+
 
     public static void execute( IoSession session, ChangePasswordContext changepwContext
) throws Exception
     {
@@ -153,7 +159,7 @@ public class ChangePasswordService
     
     private static void configureChangePassword( ChangePasswordContext changepwContext )
     {
-        changepwContext.setCipherTextHandler( cipherTextHandler );
+        changepwContext.setCipherTextHandler( CIPHER_TEXT_HANDLER );
     }
     
     
@@ -249,7 +255,7 @@ public class ChangePasswordService
             byte[] decryptedData = cipherTextHandler.decrypt( subSessionKey, encReqPrivPart,
KeyUsage.KRB_PRIV_ENC_PART_CHOSEN_KEY );
             EncKrbPrivPart privatePart = KerberosDecoder.decodeEncKrbPrivPart( decryptedData
);
 
-            if( authenticator.getSeqNumber() != privatePart.getSeqNumber() )
+            if ( authenticator.getSeqNumber() != privatePart.getSeqNumber() )
             {
                 throw new ChangePasswordException( ChangePasswdErrorType.KRB5_KPASSWD_MALFORMED
);    
             }
@@ -350,7 +356,9 @@ public class ChangePasswordService
         EncKrbPrivPart privPart = new EncKrbPrivPart();
         // first two bytes are the result code, rest is the string 'Password Changed' followed
by a null char
         byte[] resultCode =
-            { ( byte ) 0x00, ( byte ) 0x00, (byte)0x50, (byte)0x61, (byte)0x73, (byte)0x73,
(byte)0x77, (byte)0x6F, (byte)0x72, (byte)0x64, (byte)0x20, (byte)0x63, (byte)0x68, (byte)0x61,
(byte)0x6E, (byte)0x67, (byte)0x65, (byte)0x64, (byte)0x00 };
+            { ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x50, ( byte ) 0x61, ( byte ) 0x73,
( byte ) 0x73, ( byte ) 0x77,
+                ( byte ) 0x6F, ( byte ) 0x72, ( byte ) 0x64, ( byte ) 0x20, ( byte ) 0x63,
( byte ) 0x68,
+                ( byte ) 0x61, ( byte ) 0x6E, ( byte ) 0x67, ( byte ) 0x65, ( byte ) 0x64,
( byte ) 0x00 };
         privPart.setUserData( resultCode );
 
         privPart.setSenderAddress( new HostAddress( InetAddress.getLocalHost() ) );

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
Mon Sep  7 20:32:34 2015
@@ -83,18 +83,23 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AuthenticationService
+public final class AuthenticationService
 {
     /** The log for this class. */
     private static final Logger LOG_KRB = LoggerFactory.getLogger( Loggers.KERBEROS_LOG.getName()
);
 
     /** The module responsible for encryption and decryption */
-    private static final CipherTextHandler cipherTextHandler = new CipherTextHandler();
+    private static final CipherTextHandler CIPHER_TEXT_HANDLER = new CipherTextHandler();
 
     /** The service name */
     private static final String SERVICE_NAME = "Authentication Service (AS)";
 
 
+    private AuthenticationService()
+    {
+    }
+
+
     /**
      * Handle the authentication, given a specific context
      *
@@ -108,7 +113,7 @@ public class AuthenticationService
             monitorRequest( authContext );
         }
 
-        authContext.setCipherTextHandler( cipherTextHandler );
+        authContext.setCipherTextHandler( CIPHER_TEXT_HANDLER );
 
         int kerberosVersion = authContext.getRequest().getProtocolVersionNumber();
 
@@ -706,7 +711,7 @@ public class AuthenticationService
         }
 
         EncryptionKey clientKey = authContext.getClientKey();
-        EncryptedData encryptedData = cipherTextHandler.seal( clientKey, encAsRepPart,
+        EncryptedData encryptedData = CIPHER_TEXT_HANDLER.seal( clientKey, encAsRepPart,
             KeyUsage.AS_REP_ENC_PART_WITH_CKEY );
         reply.setEncPart( encryptedData );
         //FIXME the below setter is useless, remove it

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
Mon Sep  7 20:32:34 2015
@@ -80,17 +80,22 @@ import org.slf4j.LoggerFactory;
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class TicketGrantingService
+public final class TicketGrantingService
 {
 
     /** the log for this class */
     private static final Logger LOG_KRB = LoggerFactory.getLogger( Loggers.KERBEROS_LOG.getName()
);
 
-    private static final CipherTextHandler cipherTextHandler = new CipherTextHandler();
+    private static final CipherTextHandler CIPHER_TEXT_HANDLER = new CipherTextHandler();
 
     private static final String SERVICE_NAME = "Ticket-Granting Service (TGS)";
 
-    private static final ChecksumHandler checksumHandler = new ChecksumHandler();
+    private static final ChecksumHandler CHRECKSUM_HANDLER = new ChecksumHandler();
+
+
+    private TicketGrantingService()
+    {
+    }
 
 
     public static void execute( TicketGrantingContext tgsContext ) throws Exception
@@ -116,7 +121,7 @@ public class TicketGrantingService
 
     private static void configureTicketGranting( TicketGrantingContext tgsContext ) throws
KerberosException
     {
-        tgsContext.setCipherTextHandler( cipherTextHandler );
+        tgsContext.setCipherTextHandler( CIPHER_TEXT_HANDLER );
 
         if ( tgsContext.getRequest().getProtocolVersionNumber() != KerberosConstants.KERBEROS_V5
)
         {
@@ -323,7 +328,7 @@ public class TicketGrantingService
 
                 LOG_KRB.debug( "Verifying body checksum type '{}'.", authenticatorChecksum.getChecksumType()
);
 
-                checksumHandler.verifyChecksum( authenticatorChecksum, bodyBytes, sessionKey.getKeyValue(),
+                CHRECKSUM_HANDLER.verifyChecksum( authenticatorChecksum, bodyBytes, sessionKey.getKeyValue(),
                     KeyUsage.TGS_REQ_PA_TGS_REQ_PADATA_AP_REQ_AUTHNT_CKSUM_TGS_SESS_KEY );
             }
         }
@@ -476,12 +481,12 @@ public class TicketGrantingService
 
         if ( authenticator.getSubKey() != null )
         {
-            encryptedData = cipherTextHandler.seal( authenticator.getSubKey(), encTgsRepPart,
+            encryptedData = CIPHER_TEXT_HANDLER.seal( authenticator.getSubKey(), encTgsRepPart,
                 KeyUsage.TGS_REP_ENC_PART_TGS_AUTHNT_SUB_KEY );
         }
         else
         {
-            encryptedData = cipherTextHandler.seal( tgt.getEncTicketPart().getKey(), encTgsRepPart,
+            encryptedData = CIPHER_TEXT_HANDLER.seal( tgt.getEncTicketPart().getKey(), encTgsRepPart,
                 KeyUsage.TGS_REP_ENC_PART_TGS_SESS_KEY );
         }
 
@@ -746,9 +751,9 @@ public class TicketGrantingService
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            KerberosTime startTime = ( tgt.getEncTicketPart().getStartTime() != null ) ?
-                tgt.getEncTicketPart().getStartTime() :
-                tgt.getEncTicketPart().getAuthTime();
+            KerberosTime startTime = ( tgt.getEncTicketPart().getStartTime() != null )
+                ? tgt.getEncTicketPart().getStartTime()
+                : tgt.getEncTicketPart().getAuthTime();
 
             if ( startTime.greaterThan( new KerberosTime() ) )
             {
@@ -759,26 +764,26 @@ public class TicketGrantingService
             newTicketPart.getFlags().clearFlag( TicketFlag.INVALID );
         }
 
-        if ( request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_0 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_7 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_9 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_10 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_11 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_12 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_13 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_14 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_15 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_16 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_17 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_18 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_19 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_20 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_21 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_22 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_23 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_24 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_25 ) ||
-            request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_29 ) )
+        if ( request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_0 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_7 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_9 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_10 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_11 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_12 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_13 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_14 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_15 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_16 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_17 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_18 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_19 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_20 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_21 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_22 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_23 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_24 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_25 )
+            || request.getKdcReqBody().getKdcOptions().get( KdcOptions.RESERVED_29 ) )
         {
             throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
         }
@@ -845,9 +850,9 @@ public class TicketGrantingService
 
             newTicketPart.setStartTime( now );
 
-            KerberosTime tgtStartTime = ( tgt.getEncTicketPart().getStartTime() != null )
?
-                tgt.getEncTicketPart().getStartTime() :
-                tgt.getEncTicketPart().getAuthTime();
+            KerberosTime tgtStartTime = ( tgt.getEncTicketPart().getStartTime() != null )
+                    ? tgt.getEncTicketPart().getStartTime()
+                    : tgt.getEncTicketPart().getAuthTime();
 
             long oldLife = tgt.getEncTicketPart().getEndTime().getTime() - tgtStartTime.getTime();
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/KerberosProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/KerberosProtocolCodecFactory.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/KerberosProtocolCodecFactory.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/codec/KerberosProtocolCodecFactory.java
Mon Sep  7 20:32:34 2015
@@ -29,7 +29,7 @@ import org.apache.mina.filter.codec.Prot
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class KerberosProtocolCodecFactory implements ProtocolCodecFactory
+public final class KerberosProtocolCodecFactory implements ProtocolCodecFactory
 {
     private static final KerberosProtocolCodecFactory INSTANCE = new KerberosProtocolCodecFactory();
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
Mon Sep  7 20:32:34 2015
@@ -45,7 +45,7 @@ public final class SamSubsystem
     public static final String PROPKEY_BASE = "kerberos.sam.type.";
 
     /** the SAM subsystem instance */
-    public static SamSubsystem instance;
+    private static SamSubsystem instance;
 
     /** a map of verifiers so we do not need to create a new one every time */
     private final Map<SamType, SamVerifier> verifiers = new HashMap<SamType, SamVerifier>();

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java?rev=1701690&r1=1701689&r2=1701690&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
Mon Sep  7 20:32:34 2015
@@ -31,7 +31,7 @@ import org.apache.directory.server.kerbe
 public class TimestampChecker implements KeyIntegrityChecker
 {
     private static final long FIVE_MINUTES = 300000;
-    private static final CipherTextHandler cipherTextHandler = new CipherTextHandler();
+    private static final CipherTextHandler CIPHER_TEXT_HANDLER = new CipherTextHandler();
 
 
     // FIXME this whole function seems to be buggy and also I don't find any references to
this function in code- kayyagari



Mime
View raw message