You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2022/09/14 12:20:35 UTC

[directory-server] 01/02: Some more kerberos code removal

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git

commit d7f864e0fe8fe5cad75852288d0104a0ecde9fc0
Merge: dbcc83a530 b54e161d8c
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Sep 14 13:10:14 2022 +0200

    Some more kerberos code removal

 .../kerberos/shared/store/PrincipalStoreEntry.java |  15 +-
 .../shared/store/PrincipalStoreEntryModifier.java  |  14 +-
 .../shared/kerberos/KerberosMessageType.java       | 142 -----
 .../shared/kerberos/codec/KerberosDecoder.java     |  63 ---
 .../kerberos/codec/KerberosMessageContainer.java   | 138 -----
 .../kerberos/codec/KerberosMessageGrammar.java     | 206 -------
 .../kerberos/codec/KerberosMessageStatesEnum.java  | 125 -----
 .../actions/AbstractReadAuthorizationData.java     |  87 ---
 .../codec/actions/AbstractReadEncryptedPart.java   |  92 ----
 .../codec/actions/AbstractReadKerberosTime.java    | 107 ----
 .../codec/actions/AbstractReadPrincipalName.java   | 104 ----
 .../kerberos/codec/actions/AbstractReadPvno.java   | 114 ----
 .../kerberos/codec/actions/AbstractReadRealm.java  |  93 ----
 .../kerberos/codec/types/AuthorizationType.java    | 244 ---------
 .../shared/kerberos/codec/types/HostAddrType.java  | 318 -----------
 .../codec/types/TransitedEncodingType.java         |  96 ----
 .../kerberos/components/AuthorizationData.java     | 340 ------------
 .../components/AuthorizationDataEntry.java         | 197 -------
 .../shared/kerberos/components/EncTicketPart.java  | 603 ---------------------
 .../shared/kerberos/components/EncryptedData.java  | 396 --------------
 .../shared/kerberos/components/HostAddress.java    | 358 ------------
 .../shared/kerberos/components/HostAddresses.java  | 303 -----------
 .../kerberos/components/TransitedEncoding.java     | 285 ----------
 .../exceptions/InvalidTicketException.java         |  43 --
 .../kerberos/flags/AbstractKerberosFlags.java      | 236 --------
 .../shared/kerberos/flags/KerberosFlag.java        |  38 --
 .../shared/kerberos/flags/KerberosFlags.java       |  83 ---
 .../shared/kerberos/flags/TicketFlag.java          | 141 -----
 .../shared/kerberos/flags/TicketFlags.java         | 264 ---------
 .../shared/kerberos/messages/KerberosMessage.java  | 106 ----
 .../messages/value/AuthorizationDataTest.java      | 106 ----
 .../shared/messages/value/EncryptedDataTest.java   | 134 -----
 .../value/flags/AbstractKerberosFlagsTest.java     | 160 ------
 .../messages/value/flags/TicketFlagsTest.java      | 206 -------
 .../kerberos/codec/flags/TicketFlagsTest.java      |  68 ---
 35 files changed, 2 insertions(+), 6023 deletions(-)

diff --cc kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java
index 7d8a6cfd65,7d8a6cfd65..752cd1d480
--- a/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java
@@@ -51,7 -51,7 +51,6 @@@ public class PrincipalStoreEntr
      private int keyVersionNumber;
      private int maxLife;
      private int maxRenew;
--    private int kdcFlags;
      private SamType samType;
  
      private boolean disabled;
@@@ -63,7 -63,7 +62,7 @@@
  
      PrincipalStoreEntry( String distinguishedName, String commonName, String userId, KerberosPrincipal principal,
          int keyVersionNumber, KerberosTime validStart, KerberosTime validEnd, KerberosTime passwordEnd, int maxLife,
--        int maxRenew, int kdcFlags, Map<EncryptionType, EncryptionKey> keyMap, String realmName, SamType samType,
++        int maxRenew, Map<EncryptionType, EncryptionKey> keyMap, String realmName, SamType samType,
          boolean disabled, boolean lockedOut, KerberosTime expiration )
      {
          this.distinguishedName = distinguishedName;
@@@ -76,7 -76,7 +75,6 @@@
          this.keyVersionNumber = keyVersionNumber;
          this.maxLife = maxLife;
          this.maxRenew = maxRenew;
--        this.kdcFlags = kdcFlags;
          this.realmName = realmName;
          this.disabled = disabled;
          this.lockedOut = lockedOut;
@@@ -163,17 -163,17 +161,6 @@@
      }
  
  
--    /**
--     * Returns the KDC flags.
--     *
--     * @return The KDC flags.
--     */
--    public int getKDCFlags()
--    {
--        return kdcFlags;
--    }
--
--
      /**
       * Returns the key version number (kvno).
       *
diff --cc kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntryModifier.java
index 0f5352816f,85677591a0..59dad498b0
--- a/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntryModifier.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntryModifier.java
@@@ -59,7 -59,7 +59,6 @@@ public class PrincipalStoreEntryModifie
      private KerberosTime passwordEnd;
      private int maxLife;
      private int maxRenew;
--    private int kdcFlags;
      private SamType samType;
  
      private boolean disabled = false;
@@@ -77,7 -77,7 +76,7 @@@
      public PrincipalStoreEntry getEntry()
      {
          return new PrincipalStoreEntry( distinguishedName, commonName, userId, principal, keyVersionNumber, validStart,
--            validEnd, passwordEnd, maxLife, maxRenew, kdcFlags, keyMap, realmName, samType, disabled, lockedOut,
++            validEnd, passwordEnd, maxLife, maxRenew, keyMap, realmName, samType, disabled, lockedOut,
              expiration );
      }
  
@@@ -148,17 -148,17 +147,6 @@@
      }
  
  
--    /**
--     * Sets the KDC flags.
--     *
--     * @param kdcFlags
--     */
--    public void setKDCFlags( int kdcFlags )
--    {
--        this.kdcFlags = kdcFlags;
--    }
--
--
      /**
       * Sets the key map.
       *
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosMessageType.java
index 21d0d458ce,21d0d458ce..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosMessageType.java
+++ /dev/null
@@@ -1,142 -1,142 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos;
--
--
--/**
-- * An enum listing all the Kerberos V5 messages :
-- * 
-- *   AS-REQ    (10) : Authentication Serveur Request
-- *   AS-REP    (11) : Authentication Serveur Response
-- *   TGS-REQ   (12) : Ticket Granting Server Request
-- *   TGS-REP   (13) : Ticket Granting Server Response
-- *   AP-REQ    (14) : Application Request
-- *   AP-REP    (15) : Application Response
-- *   KRB-SAFE  (20) : Safe (checksummed) application message
-- *   KRB-PRIV  (21) : Private (encrypted) application message
-- *   KRB-CRED  (22) : Private (encrypted) message to forward credentials
-- *   ENC_AP_REP_PART (27) : Encrypted application reply part
-- *   ENC_PRIV_PART (28) : Encrypted private message part
-- *   KRB-ERROR (30) : A kerberos error response
-- *   
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum KerberosMessageType
--{
--    TICKET(1, "ticket"),
--    AUTHENTICATOR(2, "Authenticator"),
--    ENC_TICKET_PART(3, "EncTicketPart"),
--    AS_REQ(10, "initial authentication request"),
--    AS_REP(11, "initial authentication response"),
--    TGS_REQ(12, "request for authentication based on TGT"),
--    TGS_REP(13, "response to authentication based on TGT"),
--    AP_REQ(14, "application request"),
--    AP_REP(15, "application response"),
--    KRB_SAFE(20, "safe (checksummed) application message"),
--    KRB_PRIV(21, "private (encrypted) application message"),
--    KRB_CRED(22, "private (encrypted) message to forward credentials"),
--    ENC_AS_REP_PART(25, "encrypted authentication reply part"),
--    ENC_TGS_REP_PART(26, "encrypted TGT reply part"),
--    ENC_AP_REP_PART(27, "encrypted application reply part"),
--    ENC_PRIV_PART(28, "encrypted private message part"),
--    KRB_ERROR(30, "error response");
--
--    private int value;
--    private String message;
--
--
--    /**
--     * Creates a new instance of KerberosMessageType.
--     */
--    private KerberosMessageType( int value, String message )
--    {
--        this.value = value;
--        this.message = message;
--    }
--
--
--    /**
--     * Get the int value for this element
--     *
--     * @return The int value of this element
--     */
--    public int getValue()
--    {
--        return value;
--    }
--
--
--    /**
--     * Get the message associated with this element
--     *
--     * @return The message associated with this element
--     */
--    public String getMessage()
--    {
--        return message;
--    }
--
--
--    /**
--     * Get the instance of a KerberosMessageType from an int value
--     *
--     * @param value The int value 
--     * @return A KerberosMessageType associated with this value
--     */
--    public static KerberosMessageType getTypeByValue( int value )
--    {
--        switch ( value )
--        {
--            case 1:
--                return TICKET;
--            case 2:
--                return AUTHENTICATOR;
--            case 3:
--                return ENC_TICKET_PART;
--            case 10:
--                return AS_REQ;
--            case 11:
--                return AS_REP;
--            case 12:
--                return TGS_REQ;
--            case 13:
--                return TGS_REP;
--            case 14:
--                return AP_REQ;
--            case 15:
--                return AP_REP;
--            case 20:
--                return KRB_SAFE;
--            case 21:
--                return KRB_PRIV;
--            case 22:
--                return KRB_CRED;
--            case 27:
--                return ENC_AP_REP_PART;
--            case 28:
--                return ENC_PRIV_PART;
--            case 30:
--                return KRB_ERROR;
--            default:
--                return null;
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
index 795c23b632,be11572b52..703a9dbc40
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
+++ b/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosDecoder.java
@@@ -25,15 -25,17 +25,12 @@@ import java.nio.ByteBuffer
  import org.apache.directory.api.asn1.DecoderException;
  import org.apache.directory.api.asn1.ber.Asn1Container;
  import org.apache.directory.api.asn1.ber.Asn1Decoder;
--import org.apache.directory.api.asn1.ber.tlv.TLVStateEnum;
  import org.apache.directory.shared.kerberos.codec.encryptionKey.EncryptionKeyContainer;
  import org.apache.directory.shared.kerberos.codec.principalName.PrincipalNameContainer;
 -import org.apache.directory.shared.kerberos.codec.ticket.TicketContainer;
  import org.apache.directory.shared.kerberos.components.EncryptionKey;
  import org.apache.directory.shared.kerberos.components.PrincipalName;
  import org.apache.directory.shared.kerberos.exceptions.ErrorType;
  import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 -import org.apache.directory.shared.kerberos.messages.Ticket;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
  
  
  /**
@@@ -41,66 -43,66 +38,6 @@@
   */
  public class KerberosDecoder
  {
--
--    /** The logger */
--    private static Logger LOG = LoggerFactory.getLogger( KerberosDecoder.class );
--
--    /** A speedup for logger */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    public static Object decode( KerberosMessageContainer kerberosMessageContainer ) throws DecoderException
--    {
--        ByteBuffer buf = kerberosMessageContainer.getStream();
--        
--        if ( kerberosMessageContainer.isTCP() )
--        {
--            if ( buf.remaining() > 4 )
--            {
--                kerberosMessageContainer.setTcpLength( buf.getInt() );
--                buf.mark();
--            }
--            else
--            {
--                return null;
--            }
--        }
--        else
--        {
--            buf.mark();
--        }
--
--        while ( buf.hasRemaining() )
--        {
--            try
--            {
--                Asn1Decoder.decode( buf, kerberosMessageContainer );
--                
--                if ( kerberosMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
--                {
--                    if ( IS_DEBUG )
--                    {
--                        LOG.debug( "Decoded KerberosMessage : {}", kerberosMessageContainer.getMessage() );
--                        buf.mark();
--                    }
--        
--                    return kerberosMessageContainer.getMessage();
--                }
--            }
--            catch ( DecoderException de )
--            {
--                LOG.warn( "error while decoding", de );
--                buf.clear();
--                kerberosMessageContainer.clean();
--                throw de;
--            }
--        }
--        
--        return null;
--    }
--
--    
--    
      /**
       * Decode an EncryptionKey structure
       * 
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageContainer.java
index 7831cc233c,b2d47c048b..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageContainer.java
+++ /dev/null
@@@ -1,138 -1,148 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.codec;
--
--
--import org.apache.directory.api.asn1.ber.AbstractContainer;
--import org.apache.directory.shared.kerberos.components.PrincipalName;
--import org.apache.directory.shared.kerberos.messages.KerberosMessage;
 -import org.apache.directory.shared.kerberos.messages.Ticket;
--
--
--/**
-- * The KerberosMessage container stores all the messages decoded by the Asn1Decoder.
-- * When dealing with an incoding PDU, we will obtain a KerberosMessage in the
-- * container.
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class KerberosMessageContainer extends AbstractContainer
--{
--    /** The internal kerberos message */
--    private KerberosMessage message;
--
--    /** A PrincipalName container */
--    private PrincipalName principalName;
--
--    /** A flag used when the protocol used to transfer the PDU is TCP */
--    private boolean isTCP;
--
--    /** When the connection is using a TCP protocol, the PDU length */
--    private int tcpLength = -1;
--
--
--    /**
--     * Creates a new KerberosMessageContainer object. We will store ten grammars,
--     * it's enough ...
--     */
--    public KerberosMessageContainer()
--    {
--        super();
--        setGrammar( KerberosMessageGrammar.getInstance() );
--        setTransition( KerberosMessageStatesEnum.START_STATE );
--    }
--
--
--    /**
--     * @return Returns the KerberosMessage.
--     */
--    public KerberosMessage getMessage()
--    {
--        return message;
--    }
--
--
--    /**
--     * Set a Message Object into the container. It will be completed by the
--     * KerberosDecoder.
--     * 
--     * @param message The message to set.
--     */
--    public void setMessage( KerberosMessage message )
--    {
--        this.message = message;
 -    }
 -
 -
 -    /**
 -     * @return Returns the Ticket if the interned message is a Ticket.
 -     */
 -    public Ticket getTicket()
 -    {
 -        return ( Ticket ) message;
--    }
--
--
--    /**
--     * @return Returns the PrincipalName.
--     */
--    public PrincipalName getPrincipalName()
--    {
--        return principalName;
--    }
--
--
--    /**
--     * Set a PrincipalName Object into the container. It will be completed by the
--     * KerberosDecoder.
--     * 
--     * @param principalName The principalName to set.
--     */
--    public void setPrincipalName( PrincipalName principalName )
--    {
--        this.principalName = principalName;
--    }
--
--
--    /**
--     * @return the isTCP
--     */
--    public boolean isTCP()
--    {
--        return isTCP;
--    }
--
--
--    /**
--     * @param isTCP the isTCP to set
--     */
--    public void setTCP( boolean isTCP )
--    {
--        this.isTCP = isTCP;
--    }
--
--
--    /**
--     * @return the tcpLength
--     */
--    public int getTcpLength()
--    {
--        return tcpLength;
--    }
--
--
--    /**
--     * @param tcpLength the tcpLength to set
--     */
--    public void setTcpLength( int tcpLength )
--    {
--        this.tcpLength = tcpLength;
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java
index 110b73ae34,110b73ae34..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageGrammar.java
+++ /dev/null
@@@ -1,206 -1,206 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec;
--
--
--import java.nio.ByteBuffer;
--import java.nio.InvalidMarkException;
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.grammar.AbstractGrammar;
--import org.apache.directory.api.asn1.ber.grammar.Grammar;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.grammar.GrammarTransition;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.shared.kerberos.KerberosConstants;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * This class implements the KerberosMessage message. All the actions are declared
-- * in this class. As it is a singleton, these declaration are only done once. If
-- * an action is to be added or modified, this is where the work is to be done !
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public final class KerberosMessageGrammar extends AbstractGrammar<KerberosMessageContainer>
--{
--    /** The logger */
--    static final Logger LOG = LoggerFactory.getLogger( KerberosMessageGrammar.class );
--
--    /** A speedup for logger */
--    static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--    /** The instance of grammar. KerberosMessageGrammar is a singleton */
--    private static Grammar<KerberosMessageContainer> instance = new KerberosMessageGrammar();
--
--    private class DecodeKerberosMessage extends GrammarAction<KerberosMessageContainer>
--    {
--        public void action( KerberosMessageContainer kerberosMessageContainer ) throws DecoderException
--        {
--            ByteBuffer stream = kerberosMessageContainer.getStream();
--
--            try
--            {
--                stream.reset();
--            }
--            catch ( InvalidMarkException ime )
--            {
--                stream.rewind();
--            }
--
--            TLV tlv = kerberosMessageContainer.getCurrentTLV();
--            kerberosMessageContainer.setGrammarEndAllowed( true );
--
--            // Now, depending on the T, call the inner decoder
--            switch ( tlv.getTag() )
--            {
--                case KerberosConstants.AS_REQ_TAG:
--                    break;
--
--                case KerberosConstants.AS_REP_TAG:
--                    break;
--
--                case KerberosConstants.TGS_REQ_TAG:
--                    break;
--
--                case KerberosConstants.TGS_REP_TAG:
--                    break;
--
--                case KerberosConstants.AP_REQ_TAG:
--                    break;
--
--                case KerberosConstants.AP_REP_TAG:
--                    break;
--
--                case KerberosConstants.KRB_SAFE_TAG:
--                    break;
--
--                case KerberosConstants.KRB_PRIV_TAG:
--                    break;
--
--                case KerberosConstants.KRB_CRED_TAG:
--                    break;
--
--                case KerberosConstants.KRB_ERROR_TAG:
--                    break;
--            }
--
--            // We are done, get out
--            if ( IS_DEBUG )
--            {
--                LOG.debug( "Decoded KerberosMessage {}", kerberosMessageContainer.getMessage() );
--            }
--        }
--    }
--
--
--    /**
--     * Creates a new KerberosMessageGrammar object.
--     */
--    @SuppressWarnings("unchecked")
--    private KerberosMessageGrammar()
--    {
--        setName( KerberosMessageGrammar.class.getName() );
--
--        // Create the transitions table
--        super.transitions = new GrammarTransition[KerberosMessageStatesEnum.LAST_KERBEROS_MESSAGE_STATE.ordinal()][256];
--
--        // ============================================================================================
--        // Ticket
--        // ============================================================================================
--        // --------------------------------------------------------------------------------------------
--        // Transition from START to Ticket
--        // --------------------------------------------------------------------------------------------
--        // This is the starting state :
--        // Ticket          ::= [APPLICATION 1] ...
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.AS_REQ_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.AS_REQ_STATE,
--                KerberosConstants.AS_REQ_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.AS_REP_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.AS_REP_TAG_STATE,
--                KerberosConstants.AS_REP_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.TGS_REQ_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.TGS_REQ_TAG_STATE,
--                KerberosConstants.TGS_REQ_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.TGS_REP_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.TGS_REP_TAG_STATE,
--                KerberosConstants.TGS_REP_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.AP_REQ_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.AP_REQ_TAG_STATE,
--                KerberosConstants.AP_REQ_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.AP_REP_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.AP_REP_TAG_STATE,
--                KerberosConstants.AP_REP_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_SAFE_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.KRB_SAFE_STATE,
--                KerberosConstants.KRB_SAFE_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_PRIV_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.KRB_PRIV_STATE,
--                KerberosConstants.KRB_PRIV_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_CRED_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.KRB_CRED_STATE,
--                KerberosConstants.KRB_CRED_TAG,
--                new DecodeKerberosMessage() );
--
--        super.transitions[KerberosMessageStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_ERROR_TAG] =
--            new GrammarTransition<KerberosMessageContainer>(
--                KerberosMessageStatesEnum.START_STATE, KerberosMessageStatesEnum.KRB_ERROR_STATE,
--                KerberosConstants.KRB_ERROR_TAG,
--                new DecodeKerberosMessage() );
--    }
--
--
--    /**
--     * Get the instance of this grammar
--     *
--     * @return An instance on the KerberosMessage Grammar
--     */
--    public static Grammar<KerberosMessageContainer> getInstance()
--    {
--        return instance;
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageStatesEnum.java
index a49923c14f,a49923c14f..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/KerberosMessageStatesEnum.java
+++ /dev/null
@@@ -1,125 -1,125 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec;
--
--
--import org.apache.directory.api.asn1.ber.grammar.Grammar;
--import org.apache.directory.api.asn1.ber.grammar.States;
--
--
--/**
-- * This class store the Kerberos grammar's constants. It is also used for debugging
-- * purpose. We will decode all the Kerberos messages :
-- * <ul>
-- * <li>0x6A : AS-REQ</li>
-- * <li>0x6B : AS-REP</li>
-- * <li>0x6C : TGS-REQ</li>
-- * <li>0x6D : TGS-REP</li>
-- * <li>0x6E : AP-REQ</li>
-- * <li>0x6F : AP-REP</li>
-- * <li>0x74 : KRB-SAFE</li>
-- * <li>0x75 : KRB-PRIV</li>
-- * <li>0x76 : KRB-CRED</li>
-- * <li>0x7E : KRB-ERROR</li>
-- * </ul>
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum KerberosMessageStatesEnum implements States
--{
--    // Start
--    START_STATE,
--
--    // ----- Kerberos message --------------------------------------------
--
--    AS_REQ_STATE, // 0x6A
--    AS_REP_TAG_STATE, // 0x6B
--    TGS_REQ_TAG_STATE, // 0x6C
--    TGS_REP_TAG_STATE, // 0x6D
--    AP_REQ_TAG_STATE, // 0x6E
--    AP_REP_TAG_STATE, // 0x6F
--    KRB_SAFE_STATE, // 0x74
--    KRB_PRIV_STATE, // 0x75
--    KRB_CRED_STATE, // 0x76
--    KRB_ERROR_STATE, // 0x7E
--
--    // End
--    LAST_KERBEROS_MESSAGE_STATE;
--
--    /**
--     * Get the grammar name
--     *
--     * @param grammar The grammar code
--     * @return The grammar name
--     */
--    public String getGrammarName( int grammar )
--    {
--        return "KERBEROS_MESSAGE_GRAMMAR";
--    }
--
--
--    /**
--     * Get the grammar name
--     *
--     * @param grammar The grammar class
--     * @return The grammar name
--     */
--    public String getGrammarName( Grammar<KerberosMessageContainer> grammar )
--    {
--        if ( grammar instanceof KerberosMessageGrammar )
--        {
--            return "KERBEROS_MESSAGE_GRAMMAR";
--        }
--        else
--        {
--            return "UNKNOWN GRAMMAR";
--        }
--    }
--
--
--    /**
--     * Get the string representing the state
--     *
--     * @param state The state number
--     * @return The String representing the state
--     */
--    public String getState( int state )
--    {
--        return ( ( state == LAST_KERBEROS_MESSAGE_STATE.ordinal() ) ? "KERBEROS_MESSAGE_END_STATE" : name() );
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public boolean isEndState()
--    {
--        return this == LAST_KERBEROS_MESSAGE_STATE;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public KerberosMessageStatesEnum getStartState()
--    {
--        return START_STATE;
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java
index f0144a2f23,f0144a2f23..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadAuthorizationData.java
+++ /dev/null
@@@ -1,87 -1,87 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.apache.directory.shared.kerberos.components.AuthorizationData;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to set the AuthorizationData
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadAuthorizationData<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadAuthorizationData.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Instantiates a new AbstractReadAuthorizationData action.
--     */
--    public AbstractReadAuthorizationData( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     * set the AuthorizationData on the ASN.1 object of the container
--     *
--     * @param authorizationData the AuthorizationData object
--     * @param container container holding the ASN.1 object
--     */
--    protected abstract void setAuthorizationData( AuthorizationData authorizationData, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null
--        if ( tlv.getLength() == 0 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        // Update the expected length for the current TLV
--        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
--
--        // Update the parent
--        container.updateParent();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java
index 43eea5da0f,43eea5da0f..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadEncryptedPart.java
+++ /dev/null
@@@ -1,92 -1,92 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.apache.directory.shared.kerberos.components.EncryptedData;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to read the EncryptedData
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadEncryptedPart<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadEncryptedPart.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Instantiates a new AbstractReadEncryptedPart action.
--     */
--    public AbstractReadEncryptedPart( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     *
--     * set the EncryptedData on the ASN.1 object present in the container
--     *
--     * @param encryptedData the encrypted data
--     * @param container the container holding ASN.1 object
--     */
--    protected abstract void setEncryptedData( EncryptedData encryptedData, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null
--        if ( tlv.getLength() == 0 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        // Now, let's decode the PrincipalName
--
--        // Update the TLV
--        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
--
--        // Update the parent
--        container.updateParent();
--
--        container.setGrammarEndAllowed( true );
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java
index fb48a98e8f,fb48a98e8f..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java
+++ /dev/null
@@@ -1,107 -1,107 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.shared.kerberos.KerberosTime;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to read the KerberosTime
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadKerberosTime<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadKerberosTime.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Instantiates a new AbstractReadKerberosTime action.
--     */
--    public AbstractReadKerberosTime( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     *
--     * set the KerberosTime on the ASN.1 object present in the container
--     *
--     * @param krbtime the KerberosTime decoded from the TLV
--     * @param container the ASN.1 object's container
--     */
--    protected abstract void setKerberosTime( KerberosTime krbtime, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null and should be 15
--        if ( tlv.getLength() != 15 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        // The value is the KerberosTime
--        BerValue value = tlv.getValue();
--        String date = Strings.utf8ToString( value.getData() );
--
--        try
--        {
--            KerberosTime krbTime = new KerberosTime( date );
--
--            if ( IS_DEBUG )
--            {
--                LOG.debug( "decoded kerberos time is : {}", krbTime );
--            }
--
--            setKerberosTime( krbTime, container );
--        }
--        catch ( IllegalArgumentException iae )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java
index 5d8a58a726,5d8a58a726..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPrincipalName.java
+++ /dev/null
@@@ -1,104 -1,104 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.Asn1Decoder;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.apache.directory.shared.kerberos.codec.principalName.PrincipalNameContainer;
--import org.apache.directory.shared.kerberos.components.PrincipalName;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to set the ticket SName
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadPrincipalName<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadPrincipalName.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Instantiates a new AbstractReadPrincipalName action.
--     */
--    public AbstractReadPrincipalName( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     * set the PrincipalName on the ASN.1 object of the container
--     *
--     * @param principalName the principal
--     * @param container container holding the ASN.1 object
--     */
--    protected abstract void setPrincipalName( PrincipalName principalName, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null
--        if ( tlv.getLength() == 0 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        // Now, let's decode the PrincipalName
--        PrincipalNameContainer principalNameContainer = new PrincipalNameContainer();
--
--        // Decode the PrincipalName PDU
--        Asn1Decoder.decode( container.getStream(), principalNameContainer );
--
--        PrincipalName principalName = principalNameContainer.getPrincipalName();
--
--        if ( IS_DEBUG )
--        {
--            LOG.debug( "PrincipalName : {}", principalName );
--        }
--
--        setPrincipalName( principalName, container );
--
--        // Update the expected length for the current TLV
--        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
--
--        // Update the parent
--        container.updateParent();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPvno.java
index 48dd74bd82,48dd74bd82..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadPvno.java
+++ /dev/null
@@@ -1,114 -1,114 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.IntegerDecoder;
--import org.apache.directory.api.asn1.ber.tlv.IntegerDecoderException;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to read the PVNO
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadPvno<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadPvno.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Creates a new instance of AbstractReadPvno.
--     *
--     * @param name the name of the action
--     */
--    public AbstractReadPvno( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     * sets the pvno on the ASN.1 object present in the container
--     *
--     * @param pvno the protocol version number received
--     * @param container the ASN.1 object's container
--     */
--    protected abstract void setPvno( int pvno, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null and should be 1
--        if ( tlv.getLength() != 1 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        BerValue value = tlv.getValue();
--
--        try
--        {
--            int pvno = IntegerDecoder.parse( value );
--
--            if ( pvno != 5 )
--            {
--                LOG.error( I18n.err( I18n.ERR_01306_VALUE_NOT_IN_RANGE, 5, 5 ) );
--
--                // This will generate a PROTOCOL_ERROR
--                throw new DecoderException( "The PVNO should be 5" );
--            }
--
--            if ( IS_DEBUG )
--            {
--                LOG.debug( "pvno : {}", pvno );
--            }
--
--            setPvno( pvno, container );
--        }
--        catch ( IntegerDecoderException ide )
--        {
--            LOG.error( I18n.err( I18n.ERR_01306_VALUE_NOT_IN_RANGE, 5, 5 ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( ide.getMessage() );
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java
index e301d80c3b,e301d80c3b..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java
+++ /dev/null
@@@ -1,93 -1,93 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.codec.actions;
--
--
--import org.apache.directory.api.asn1.DecoderException;
--import org.apache.directory.api.asn1.ber.Asn1Container;
--import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.i18n.I18n;
--import org.apache.directory.api.util.Strings;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The action used to read the Realm
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractReadRealm<E extends Asn1Container> extends GrammarAction<E>
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadRealm.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--
--    /**
--     * Instantiates a new AbstractReadRealm action.
--     */
--    public AbstractReadRealm( String name )
--    {
--        super( name );
--    }
--
--
--    /**
--     * sets the relam value on the ASN.1 object present in the container
--     *
--     * @param realm the realm name
--     * @param container the container holding ASN.1 object
--     */
--    protected abstract void setRealm( String realm, E container );
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public final void action( E container ) throws DecoderException
--    {
--        TLV tlv = container.getCurrentTLV();
--
--        // The Length should not be null
--        if ( tlv.getLength() == 0 )
--        {
--            LOG.error( I18n.err( I18n.ERR_01308_ZERO_LENGTH_TLV ) );
--
--            // This will generate a PROTOCOL_ERROR
--            throw new DecoderException( I18n.err( I18n.ERR_01309_EMPTY_TLV ) );
--        }
--
--        // The value is the realm
--        BerValue value = tlv.getValue();
--        String realm = Strings.utf8ToString( value.getData() );
--
--        if ( IS_DEBUG )
--        {
--            LOG.debug( "read realm value : {}", realm );
--        }
--
--        setRealm( realm, container );
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/AuthorizationType.java
index 126576ffb8,126576ffb8..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/AuthorizationType.java
+++ /dev/null
@@@ -1,244 -1,244 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.codec.types;
--
--
--/**
-- * The Authorization types
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum AuthorizationType
--{
--    /**
--     * Constant for the "null" authorization type.
--     */
--    NULL(0),
--
--    /**
--     * Constant for the "if relevant" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_IF_RELEVANT(1),
--
--    /**
--     * Constant for the "intended for server" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_INTENDED_FOR_SERVER(2),
--
--    /**
--     * Constant for the  "intended for application class" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_INTENDED_FOR_APPLICATION_CLASS(3),
--
--    /**
--     * Constant for the "kdc issued" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_KDC_ISSUED(4),
--
--    /**
--     * Constant for the "or" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_OR(5),
--
--    /**
--     * Constant for the "mandatory ticket extensions" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_MANDATORY_TICKET_EXTENSIONS(6),
--
--    /**
--     * Constant for the "in ticket extensions" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_IN_TICKET_EXTENSIONS(7),
--
--    /**
--     * Constant for the "mandatory-for-kdc" authorization type.
--     * 
--     * RFC 4120
--     */
--    AD_MANDATORY_FOR_KDC(8),
--
--    /**
--     * Constant for the "OSF DCE" authorization type.
--     * 
--     * RFC 1510
--     */
--    OSF_DCE(64),
--
--    /**
--     * Constant for the "sesame" authorization type.
--     * 
--     * RFC 1510
--     */
--    SESAME(65),
--
--    /**
--     * Constant for the "OSF-DCE pki certid" authorization type.
--     * 
--     * RFC 1510
--     */
--    AD_OSF_DCE_PKI_CERTID(66),
--
--    /**
--     * Constant for the "sesame" authorization type.
--     * 
--     * RFC 1510
--     */
--    AD_WIN2K_PAC(128),
--
--    /**
--     * Constant for the "sesame" authorization type.
--     * 
--     * RFC 1510
--     */
--    AD_ETYPE_NEGOTIATION(129);
--
--    /**
--     * The value/code for the authorization type.
--     */
--    private final int value;
--
--
--    /**
--     * Private constructor prevents construction outside of this class.
--     */
--    private AuthorizationType( int value )
--    {
--        this.value = value;
--    }
--
--
--    /**
--     * Returns the authorization type when specified by its ordinal.
--     *
--     * @param type The numeric value
--     * @return The authorization type.
--     */
--    public static AuthorizationType getTypeByValue( int type )
--    {
--        switch ( type )
--        {
--            case 1:
--                return AD_IF_RELEVANT;
--            case 2:
--                return AD_INTENDED_FOR_SERVER;
--            case 3:
--                return AD_INTENDED_FOR_APPLICATION_CLASS;
--            case 4:
--                return AD_KDC_ISSUED;
--            case 5:
--                return AD_OR;
--            case 6:
--                return AD_MANDATORY_TICKET_EXTENSIONS;
--            case 7:
--                return AD_IN_TICKET_EXTENSIONS;
--            case 8:
--                return AD_MANDATORY_FOR_KDC;
--            case 64:
--                return OSF_DCE;
--            case 65:
--                return SESAME;
--            case 66:
--                return AD_OSF_DCE_PKI_CERTID;
--            case 128:
--                return AD_WIN2K_PAC;
--            case 129:
--                return AD_ETYPE_NEGOTIATION;
--            default:
--                return NULL;
--        }
--    }
--
--
--    /**
--     * Returns the number associated with this authorization type.
--     *
--     * @return The authorization type ordinal.
--     */
--    public int getValue()
--    {
--        return value;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    @Override
--    public String toString()
--    {
--        switch ( this )
--        {
--            case AD_IF_RELEVANT:
--                return "if relevant" + "(" + value + ")";
--
--            case AD_INTENDED_FOR_SERVER:
--                return "intended for server" + "(" + value + ")";
--
--            case AD_INTENDED_FOR_APPLICATION_CLASS:
--                return "intended for application class" + "(" + value + ")";
--
--            case AD_KDC_ISSUED:
--                return "kdc issued" + "(" + value + ")";
--
--            case AD_OR:
--                return "or" + "(" + value + ")";
--
--            case AD_MANDATORY_TICKET_EXTENSIONS:
--                return "mandatory ticket extensions" + "(" + value + ")";
--
--            case AD_IN_TICKET_EXTENSIONS:
--                return "in ticket extensions" + "(" + value + ")";
--
--            case AD_MANDATORY_FOR_KDC:
--                return "mandatory-for-kdc" + "(" + value + ")";
--
--            case OSF_DCE:
--                return "OSF DCE" + "(" + value + ")";
--
--            case SESAME:
--                return "sesame" + "(" + value + ")";
--
--            case AD_OSF_DCE_PKI_CERTID:
--                return "OSF DCE pki certid" + "(" + value + ")";
--
--            case AD_WIN2K_PAC:
--                return "win 2000 PAC" + "(" + value + ")";
--
--            case AD_ETYPE_NEGOTIATION:
--                return "etype negociation" + "(" + value + ")";
--
--            default:
--                return "null" + "(" + value + ")";
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/HostAddrType.java
index 5b7bbd124e,5b7bbd124e..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/HostAddrType.java
+++ /dev/null
@@@ -1,318 -1,318 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.codec.types;
--
--
--/**
-- * Host Address type. They are described in RFC 4120, chap. 7.5.3.
-- * 
-- * Only a few of them are declared :
-- * 
-- *   Address Type                   Value
-- *
-- *   IPv4                             2
-- *   Directional                      3
-- *   ChaosNet                         5
-- *   XNS                              6
-- *   ISO                              7
-- *   DECNET Phase IV                 12
-- *   AppleTalk DDP                   16
-- *   NetBios                         20
-- *   IPv6                            24
-- *
-- * The other address types are simply ignored. They are part of a Unix
-- * include file. 
-- * 
-- * todo find the original include where those ignored values come from 
-- * 
-- * To be realistic, we may encounter IPv4, IPv6 and NetBios addresses in the real world...
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum HostAddrType
--{
--    /**
--     * Constant for the "null" host address type.
--     */
--    NULL(0),
--
--    /**
--     * Constant for the "Unix" host address type.
--     * 
--     * Not in RFC
--     */
--    // ADDRTYPE_UNIX( 1 ),
--
--    /**
--     * Constant for the "Internet" host address type.
--     */
--    ADDRTYPE_INET(2),
--
--    /**
--     * Constant for the "Arpanet" host address type.
--     */
--    ADDRTYPE_IMPLINK(3),
--
--    /**
--     * Constant for the "PUP" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_PUP( 4 ),
--
--    /**
--     * Constant for the "CHAOS" host address type.
--     */
--    ADDRTYPE_CHAOS(5),
--
--    /**
--     * Constant for the "XEROX Network Services" host address type.
--     */
--    ADDRTYPE_XNS(6),
--
--    /**
--     * Constant for the "IPX" host address type.
--     * 
--     * Not in RFC
--     */
--    // ADDRTYPE_IPX( 6 ),
--
--    /**
--     * Constant for the "OSI" host address type.
--     */
--    ADDRTYPE_OSI(7),
--
--    /**
--     * Constant for the "European Computer Manufacturers" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_ECMA( 8 ),
--
--    /**
--     * Constant for the "Datakit" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_DATAKIT( 9 ),
--
--    /**
--     * Constant for the "CCITT" host address type.
--     * 
--     * Not in RFC
--     */
--    //pADDRTYPE_CCITT( 10 ),
--
--    /**
--     * Constant for the "SNA" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_SNA( 11 ),
--
--    /**
--     * Constant for the "DECnet" host address type.
--     */
--    ADDRTYPE_DECNET(12),
--
--    /**
--     * Constant for the "Direct Data Link Interface" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_DLI( 13 ),
--
--    /**
--     * Constant for the "LAT" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_LAT( 14 ),
--
--    /**
--     * Constant for the "NSC Hyperchannel" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_HYLINK( 15 ),
--
--    /**
--     * Constant for the "AppleTalk" host address type.
--     */
--    ADDRTYPE_APPLETALK(16),
--
--    /**
--     * Constant for the "VoiceView" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_VOICEVIEW( 18 ),
--
--    /**
--     * Constant for the "Firefox" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_FIREFOX( 19 ),
--
--    /**
--     * Constant for the "NetBios" host address type.
--     * 
--     * Not in RFC
--     */
--    ADDRTYPE_NETBIOS(20),
--
--    /**
--     * Constant for the "Banyan" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_BAN( 21 ),
--
--    /**
--     * Constant for the "ATM" host address type.
--     * 
--     * Not in RFC
--     */
--    //ADDRTYPE_ATM( 22 ),
--
--    /**
--     * Constant for the "Internet Protocol V6" host address type.
--     */
--    ADDRTYPE_INET6(24);
--
--    /**
--     * The value/code for the host address type.
--     */
--    private final int value;
--
--
--    /**
--     * Private constructor prevents construction outside of this class.
--     */
--    private HostAddrType( int value )
--    {
--        this.value = value;
--    }
--
--
--    /**
--     * Returns the host address type when specified by its ordinal.
--     *
--     * @param type
--     * @return The host address type.
--     */
--    public static HostAddrType getTypeByOrdinal( int type )
--    {
--        switch ( type )
--        {
--            case 0:
--                return NULL;
--                //case 1 : return ADDRTYPE_UNIX;
--            case 2:
--                return ADDRTYPE_INET;
--            case 3:
--                return ADDRTYPE_IMPLINK;
--                //case 4 : return ADDRTYPE_PUP;
--            case 5:
--                return ADDRTYPE_CHAOS;
--            case 6:
--                return ADDRTYPE_XNS;
--            case 7:
--                return ADDRTYPE_OSI;
--                //case 8 : return ADDRTYPE_ECMA;
--                //case 9 : return ADDRTYPE_DATAKIT;
--                //case 10 : return pADDRTYPE_CCITT;
--                //case 11 : return ADDRTYPE_SNA;
--            case 12:
--                return ADDRTYPE_DECNET;
--                //case 13 : return ADDRTYPE_DLI;
--                //case 14 : return ADDRTYPE_LAT;
--                //case 15 : return ADDRTYPE_HYLINK;
--            case 16:
--                return ADDRTYPE_APPLETALK;
--                //case 18 : return ADDRTYPE_VOICEVIEW;
--                //case 19 : return ADDRTYPE_FIREFOX;
--            case 20:
--                return ADDRTYPE_NETBIOS;
--                //case 21 : return ADDRTYPE_BAN;
--                //case 22 : return ADDRTYPE_ATM;
--            case 24:
--                return ADDRTYPE_INET6;
--            default:
--                return NULL;
--        }
--    }
--
--
--    /**
--     * Returns the number associated with this host address type.
--     *
--     * @return The host address type ordinal.
--     */
--    public int getValue()
--    {
--        return value;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public String toString()
--    {
--        switch ( value )
--        {
--        //case 1 : return "Unix" + "(" + value + ")"  ;
--            case 2:
--                return "Internet" + "(" + value + ")";
--            case 3:
--                return "Arpanet" + "(" + value + ")";
--                //case 4 : return "PUP" + "(" + value + ")"  ;
--            case 5:
--                return "CHAOS" + "(" + value + ")";
--            case 6:
--                return "XEROX Network Services" + "(" + value + ")";
--            case 7:
--                return "OSI" + "(" + value + ")";
--                //case 8 : return "European Computer Manufacturers" + "(" + value + ")"  ;
--                //case 9 : return "Datakit" + "(" + value + ")"  ;
--                //case 10 : return "CCITT" + "(" + value + ")"  ;
--                //case 11 : return "SNA" + "(" + value + ")"  ;
--            case 12:
--                return "DECnet" + "(" + value + ")";
--                //case 13 : return "Direct Data Link Interface" + "(" + value + ")"  ;
--                //case 14 : return "LAT" + "(" + value + ")"  ;
--                //case 15 : return "NSC Hyperchannel" + "(" + value + ")"  ;
--                //case 16 : return "AppleTalk" + "(" + value + ")"  ;
--                //case 18 : return "VoiceView" + "(" + value + ")"  ;
--                //case 19 : return "Firefox" + "(" + value + ")"  ;
--            case 20:
--                return "NetBios" + "(" + value + ")";
--                //case 21 : return "Banyan" + "(" + value + ")"  ;
--                //case 22 : return "ATM" + "(" + value + ")"  ;
--            case 24:
--                return "Internet Protocol V6" + "(" + value + ")";
--            default:
--                return "null" + "(" + value + ")";
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/TransitedEncodingType.java
index 8f74b9e6fc,8f74b9e6fc..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/types/TransitedEncodingType.java
+++ /dev/null
@@@ -1,96 -1,96 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.codec.types;
--
--
--/**
-- * The list of possible value for the TransitedEncoding type
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum TransitedEncodingType
--{
--    /** Constant for the "null" transited encoding type. */
--    NULL(0),
--
--    /** Constant for the "Domain X500 compress" transited encoding type. */
--    DOMAIN_X500_COMPRESS(1);
--
--    /**
--     * The value/code for the transited encoding type.
--     */
--    private final int value;
--
--
--    /**
--     * Private constructor prevents construction outside of this class.
--     */
--    private TransitedEncodingType( int value )
--    {
--        this.value = value;
--    }
--
--
--    /**
--     * Returns the transited encoding type when specified by its value.
--     *
--     * @param type The type we are looking for
--     * @return The transited encoding type.
--     */
--    public static TransitedEncodingType getTypeByOrdinal( int type )
--    {
--        if ( type == 1 )
--        {
--            return DOMAIN_X500_COMPRESS;
--        }
--        else
--        {
--            return NULL;
--        }
--    }
--
--
--    /**
--     * Returns the number associated with this transited encoding type.
--     *
--     * @return The transited encoding type value.
--     */
--    public int getValue()
--    {
--        return value;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    @Override
--    public String toString()
--    {
--        if ( this == DOMAIN_X500_COMPRESS )
--        {
--            return "Domain X500 compress (1)";
--        }
--        else
--        {
--                return "null (0)";
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationData.java
index 660f6d4930,660f6d4930..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationData.java
+++ /dev/null
@@@ -1,340 -1,340 +1,0 @@@
--/*
-- *   Licensed to the Apache Software Foundation (ASF) under one
-- *   or more contributor license agreements.  See the NOTICE file
-- *   distributed with this work for additional information
-- *   regarding copyright ownership.  The ASF licenses this file
-- *   to you under the Apache License, Version 2.0 (the
-- *   "License"); you may not use this file except in compliance
-- *   with the License.  You may obtain a copy of the License at
-- *
-- *     http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *   Unless required by applicable law or agreed to in writing,
-- *   software distributed under the License is distributed on an
-- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *   KIND, either express or implied.  See the License for the
-- *   specific language governing permissions and limitations
-- *   under the License.
-- *
-- */
--
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--import java.util.ArrayList;
--import java.util.List;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.apache.directory.shared.kerberos.KerberosConstants;
--import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * A structure to hold the authorization data.
-- * 
-- * <pre>
-- * AuthorizationData      ::= SEQUENCE OF SEQUENCE {
-- *               ad-type  [0] Int32,
-- *               ad-data  [1] OCTET STRING
-- * }
-- *</pre>
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class AuthorizationData implements Asn1Object
--{
--    /** The list of AuthorizationData elements */
--    private List<AuthorizationDataEntry> authorizationData = new ArrayList<>();
--
--    /** The current AD being processed */
--    private AuthorizationDataEntry currentAD;
--
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( EncryptedData.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--    // Storage for computed lengths
--    private int adTypeTagLen[];
--    private int adDataTagLen[];
--    private int authorizationDataSeqLen[];
--    private int authorizationDataSeqSeqLen;
--
--
--    /**
--     * Creates a new set of AuthorizationData
--     */
--    public AuthorizationData()
--    {
--    }
--
--
--    /**
--     * Compute the AuthorizationData length
--     * <pre>
--     * 0x30 L1 AuthorizationData sequence
--     *  |
--     *  +-- 0x30 L2 The AD sequence
--     *       |
--     *       +--&gt; 0xA0 L3 adType tag
--     *       |     |
--     *       |     +--&gt; 0x02 L3-1 adType (int)
--     *       |
--     *       +--&gt; 0xA1 L4 adData tag
--     *             |
--     *             +--&gt; 0x04 L4-1 adData (OCTET STRING)
--     * </pre>
--     */
--    @Override
--    public int computeLength()
--    {
--        int i = 0;
--        authorizationDataSeqLen = new int[authorizationData.size()];
--        adTypeTagLen = new int[authorizationData.size()];
--        adDataTagLen = new int[authorizationData.size()];
--        authorizationDataSeqSeqLen = 0;
--
--        for ( AuthorizationDataEntry ad : authorizationData )
--        {
--            int adTypeLen = BerValue.getNbBytes( ad.getAdType().getValue() );
--            adTypeTagLen[i] = 1 + TLV.getNbBytes( adTypeLen ) + adTypeLen;
--            adDataTagLen[i] = 1 + TLV.getNbBytes( ad.getAdDataRef().length ) + ad.getAdDataRef().length;
--
--            authorizationDataSeqLen[i] = 1 + TLV.getNbBytes( adTypeTagLen[i] ) + adTypeTagLen[i] +
--                1 + TLV.getNbBytes( adDataTagLen[i] ) + adDataTagLen[i];
--
--            authorizationDataSeqSeqLen += 1 + TLV.getNbBytes( authorizationDataSeqLen[i] ) + authorizationDataSeqLen[i];
--            i++;
--        }
--
--        return 1 + TLV.getNbBytes( authorizationDataSeqSeqLen ) + authorizationDataSeqSeqLen;
--    }
--
--
--    /**
--     * Encode the EncryptedData message to a PDU.
--     * 
--     * @param buffer The buffer where to put the PDU. It should have been allocated
--     * before, with the right size.
--     * @return The constructed PDU.
--     */
--    @Override
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // The AuthorizationData SEQ OF Tag
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( authorizationDataSeqSeqLen ) );
--
--            int i = 0;
--
--            for ( AuthorizationDataEntry ad : authorizationData )
--            {
--                buffer.put( UniversalTag.SEQUENCE.getValue() );
--                buffer.put( TLV.getBytes( authorizationDataSeqLen[i] ) );
--
--                // the adType
--                buffer.put( ( byte ) KerberosConstants.AUTHORIZATION_DATA_ADTYPE_TAG );
--                buffer.put( TLV.getBytes( adTypeTagLen[i] ) );
--                BerValue.encode( buffer, ad.getAdType().getValue() );
--
--                // the adData
--                buffer.put( ( byte ) KerberosConstants.AUTHORIZATION_DATA_ADDATA_TAG );
--                buffer.put( TLV.getBytes( adDataTagLen[i] ) );
--                BerValue.encode( buffer, ad.getAdDataRef() );
--
--                i++;
--            }
--        }
--        catch ( BufferOverflowException boe )
--        {
--            LOG.error( I18n.err( I18n.ERR_139, 1 + TLV.getNbBytes( authorizationDataSeqSeqLen )
--                + authorizationDataSeqSeqLen, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            LOG.debug( "AuthorizationData encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            LOG.debug( "AuthorizationData initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * @return the currentAD type
--     */
--    public AuthorizationType getCurrentAdType()
--    {
--        return currentAD.getAdType();
--    }
--
--
--    /**
--     * Set the current AD type
--     */
--    public void setCurrentAdType( AuthorizationType adType )
--    {
--        currentAD.setAdType( adType );
--    }
--
--
--    /**
--     * @return the currentAD data
--     */
--    public byte[] getCurrentAdData()
--    {
--        return currentAD.getAdData();
--    }
--
--
--    /**
--     * Set the current AD data
--     */
--    public void setCurrentAdData( byte[] adData )
--    {
--        currentAD.setAdData( adData );
--    }
--
--
--    /**
--     * @return the currentAD
--     */
--    public AuthorizationDataEntry getCurrentAD()
--    {
--        return currentAD;
--    }
--
--
--    /**
--     * Create a new currentAD
--     */
--    public void createNewAD()
--    {
--        currentAD = new AuthorizationDataEntry();
--        authorizationData.add( currentAD );
--    }
--
--
--    /**
--     * Add a new AuthorizationDataEntry
--     */
--    public void addEntry( AuthorizationDataEntry entry )
--    {
--        authorizationData.add( entry );
--    }
--
--
--    /**
--     * @return the authorizationData
--     */
--    public List<AuthorizationDataEntry> getAuthorizationData()
--    {
--        return authorizationData;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        final int prime = 31;
--        int result = 1;
--        result = prime * result + ( ( authorizationData == null ) ? 0 : authorizationData.hashCode() );
--        result = prime * result + ( ( currentAD == null ) ? 0 : currentAD.hashCode() );
--        return result;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof AuthorizationData ) )
--        {
--            return false;
--        }
--
--        AuthorizationData other = ( AuthorizationData ) obj;
--
--        if ( authorizationData == null )
--        {
--            if ( other.authorizationData != null )
--            {
--                return false;
--            }
--        }
--        else if ( !authorizationData.equals( other.authorizationData ) )
--        {
--            return false;
--        }
--
--        if ( currentAD == null )
--        {
--            if ( other.currentAD != null )
--            {
--                return false;
--            }
--        }
--        else if ( !currentAD.equals( other.currentAD ) )
--        {
--            return false;
--        }
--
--        return true;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString( String tabs )
--    {
--        StringBuilder sb = new StringBuilder();
--
--        sb.append( tabs ).append( "AuthorizationData : \n" );
--
--        for ( AuthorizationDataEntry ad : authorizationData )
--        {
--            sb.append( ad.toString( tabs + "    " ) );
--        }
--
--        return sb.toString();
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        return toString( "" );
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java
index db0356d458,db0356d458..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java
+++ /dev/null
@@@ -1,197 -1,197 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.components;
--
--import java.security.MessageDigest;
--import java.util.Arrays;
--
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
--
--
--/**
-- * The class storing the individual AuthorizationDatas
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class AuthorizationDataEntry
--{
--    /** the type of authorization data */
--    private AuthorizationType adType;
--
--    /** the authorization data */
--    private byte[] adData;
--
--
--    /**
--     * Creates a new instance of AD entry
--     */
--    public AuthorizationDataEntry()
--    {
--
--    }
--
--
--    /**
--     * Creates a new Instance of AD entry
--     * 
--     * @param adType The AuthorizationData type
--     * @param adData The AuthorizationData data
--     */
--    public AuthorizationDataEntry( AuthorizationType adType, byte[] adData )
--    {
--        this.adType = adType;
--
--        if ( adData != null )
--        {
--            this.adData = new byte[adData.length];
--            System.arraycopy( adData, 0, this.adData, 0, adData.length );
--        }
--    }
--
--
--    /**
--     * @return the adType
--     */
--    public AuthorizationType getAdType()
--    {
--        return adType;
--    }
--
--
--    /**
--     * @param adType the adType to set
--     */
--    public void setAdType( AuthorizationType adType )
--    {
--        this.adType = adType;
--    }
--
--
--    /**
--     * @return a copy of adData
--     */
--    public byte[] getAdData()
--    {
--        if ( Strings.isEmpty( adData ) )
--        {
--            return Strings.EMPTY_BYTES;
--        }
--        else
--        {
--            byte[] copy = new byte[adData.length];
--
--            System.arraycopy( adData, 0, copy, 0, adData.length );
--
--            return copy;
--        }
--    }
--
--
--    /**
--     * @return the reference on adData
--     */
--    public byte[] getAdDataRef()
--    {
--        return adData;
--    }
--
--
--    /**
--     * @param adData the adData to set
--     */
--    public void setAdData( byte[] adData )
--    {
--        if ( Strings.isEmpty( adData ) )
--        {
--            this.adData = Strings.EMPTY_BYTES;
--        }
--        else
--        {
--            this.adData = new byte[adData.length];
--
--            System.arraycopy( adData, 0, this.adData, 0, adData.length );
--        }
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        final int prime = 31;
--        int result = 17;
--        result = prime * result + Arrays.hashCode( adData );
--        result = prime * result + ( ( adType == null ) ? 0 : adType.hashCode() );
--        return result;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof AuthorizationDataEntry ) )
--        {
--            return false;
--        }
--
--        AuthorizationDataEntry other = ( AuthorizationDataEntry ) obj;
--
--        if ( !MessageDigest.isEqual( adData, other.adData ) )
--        {
--            return false;
--        }
--
--        return adType == other.adType;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString( String tabs )
--    {
--        StringBuilder sb = new StringBuilder();
--
--        sb.append( tabs ).append( "AuthorizationDataEntry : {\n" );
--        sb.append( tabs ).append( "    adType : " ).append( adType ).append( "\n" );
--        sb.append( tabs ).append( "    adData : " ).append( Strings.dumpBytes( adData ) ).append( "\n" );
--        sb.append( tabs ).append( "}" );
--        return sb.toString();
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        return toString( "" );
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
index 2538e569d7,2538e569d7..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
+++ /dev/null
@@@ -1,603 -1,603 +1,0 @@@
--/*
-- *   Licensed to the Apache Software Foundation (ASF) under one
-- *   or more contributor license agreements.  See the NOTICE file
-- *   distributed with this work for additional information
-- *   regarding copyright ownership.  The ASF licenses this file
-- *   to you under the Apache License, Version 2.0 (the
-- *   "License"); you may not use this file except in compliance
-- *   with the License.  You may obtain a copy of the License at
-- *
-- *     http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *   Unless required by applicable law or agreed to in writing,
-- *   software distributed under the License is distributed on an
-- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *   KIND, either express or implied.  See the License for the
-- *   specific language governing permissions and limitations
-- *   under the License.
-- *
-- */
--
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.apache.directory.shared.kerberos.KerberosConstants;
--import org.apache.directory.shared.kerberos.KerberosTime;
--import org.apache.directory.shared.kerberos.flags.TicketFlag;
--import org.apache.directory.shared.kerberos.flags.TicketFlags;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * EncTicketPart   ::= [APPLICATION 3] SEQUENCE {
-- *      flags                   [0] TicketFlags,
-- *      key                     [1] EncryptionKey,
-- *      crealm                  [2] Realm,
-- *      cname                   [3] PrincipalName,
-- *      transited               [4] TransitedEncoding,
-- *      authtime                [5] KerberosTime,
-- *      starttime               [6] KerberosTime OPTIONAL,
-- *      endtime                 [7] KerberosTime,
-- *      renew-till              [8] KerberosTime OPTIONAL,
-- *      caddr                   [9] HostAddresses OPTIONAL,
-- *      authorization-data      [10] AuthorizationData OPTIONAL
-- * }
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class EncTicketPart implements Asn1Object
--{
--    /** The logger */
--    private static final Logger log = LoggerFactory.getLogger( EncTicketPart.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = log.isDebugEnabled();
--
--    /** the ticket's flags */
--    private TicketFlags flags = new TicketFlags();
--
--    /** the encryption key */
--    private EncryptionKey key;
--
--    /** the client's realm */
--    private String cRealm;
--
--    /** client's principal */
--    private PrincipalName cName;
--
--    /** field containing list of transited realm names */
--    private TransitedEncoding transited;
--
--    /** time of initial authentication */
--    private KerberosTime authTime;
--
--    /** time after which ticket is valid */
--    private KerberosTime startTime;
--
--    /** ticket's expiry time */
--    private KerberosTime endTime;
--
--    /** the maximum endtime that may be included in a renewal */
--    private KerberosTime renewtill;
--
--    /** the addresses from which this ticket can be used */
--    private HostAddresses clientAddresses;
--
--    /** the authorization data */
--    private AuthorizationData authorizationData;
--
--    private int flagsLen;
--    private int keyLen;
--    private int cRealmLen;
--    private byte[] cRealmBytes;
--    private int cNameLen;
--    private int transitedLen;
--    private int authTimeLen;
--    private byte[] authTimeBytes;
--    private int startTimeLen;
--    private byte[] startTimeBytes;
--    private int endTimeLen;
--    private byte[] endTimeBytes;
--    private int renewtillLen;
--    private byte[] renewtillBytes;
--    private int clientAddressesLen;
--    private int authzDataLen;
--    private int encTikcetPartSeqLen;
--    private int encTikcetPartLen;
--
--
--    /**
--     * compute length for EncTicketPart:
--     * <pre>
--     * 0x63 L1 EncTicketPart tag
--     *  |
--     *  +--&gt; 0x30 L1-2 EncTicketPart seq
--     *        |
--     *        +--&gt; 0xA0 L2 flags tag
--     *        |     |
--     *        |     +--&gt; 0x03 L2-2 flags (BitString)
--     *        |
--     *        +--&gt; 0xA1 L3 key tag
--     *        |     |
--     *        |     +--&gt; 0x30 L3-2 key (EncryptionKey)
--     *        |
--     *        +--&gt; 0xA2 L4 crealm tag
--     *        |     |
--     *        |     +--&gt; 0x1B L4-2 crealm (Realm)
--     *        |
--     *        +--&gt; 0xA3 L5 cname tag
--     *        |     |
--     *        |     +--&gt; 0x30 L5-2 cname (PrincipalName)
--     *        |
--     *        +--&gt; 0xA4 L6 transited tag
--     *        |     |
--     *        |     +--&gt; 0x30 L6-2 transited (TransitedEncoding)
--     *        |
--     *        +--&gt; 0xA5 0x11 authtime tag
--     *        |     |
--     *        |     +--&gt; 0x18 0x0F authtime (KerberosTime)
--     *        |
--     *        +--&gt; [0xA6 0x11 starttime tag
--     *        |     |
--     *        |     +--&gt; 0x18 0x0F starttime (KerberosTime)]
--     *        |
--     *        +--&gt; 0xA7 0x11 endtime tag
--     *        |     |
--     *        |     +--&gt; 0x18 0x0F endtime (KerberosTime)
--     *        |
--     *        +--&gt; [0xA8 0x11 renewtill tag
--     *        |     |
--     *        |     +--&gt; 0x18 0x0F renewtill (KerberosTime)]
--     *        |
--     *        +--&gt; [0xA9 L7 caddr tag
--     *        |     |
--     *        |     +--&gt; 0x30 L7-2 caddre (HostAddresses)]
--     *        |
--     *        +--&gt; [0xAA L8 authorization-data tag
--     *              |
--     *              +--&gt; 0x30 L8-2 authorization-data (AuthorizationData)]
--     * </pre>
--     * 
--     */
--    @Override
--    public int computeLength()
--    {
--        flagsLen = flags.getData().length;
--        flagsLen = 1 + TLV.getNbBytes( flagsLen ) + flagsLen;
--        encTikcetPartSeqLen = 1 + TLV.getNbBytes( flagsLen ) + flagsLen;
--
--        keyLen = key.computeLength();
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( keyLen ) + keyLen;
--
--        cRealmBytes = Strings.getBytesUtf8( cRealm );
--        cRealmLen = 1 + TLV.getNbBytes( cRealmBytes.length ) + cRealmBytes.length;
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( cRealmLen ) + cRealmLen;
--
--        cNameLen = cName.computeLength();
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( cNameLen ) + cNameLen;
--
--        transitedLen = transited.computeLength();
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( transitedLen ) + transitedLen;
--
--        authTimeBytes = authTime.getBytes();
--        authTimeLen = 1 + TLV.getNbBytes( authTimeBytes.length ) + authTimeBytes.length;
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( authTimeLen ) + authTimeLen;
--
--        if ( startTime != null )
--        {
--            startTimeBytes = startTime.getBytes();
--            startTimeLen = 1 + TLV.getNbBytes( startTimeBytes.length ) + startTimeBytes.length;
--            encTikcetPartSeqLen += 1 + TLV.getNbBytes( startTimeLen ) + startTimeLen;
--        }
--
--        endTimeBytes = endTime.getBytes();
--        endTimeLen = 1 + TLV.getNbBytes( endTimeBytes.length ) + endTimeBytes.length;
--        encTikcetPartSeqLen += 1 + TLV.getNbBytes( endTimeLen ) + endTimeLen;
--
--        if ( renewtill != null )
--        {
--            renewtillBytes = renewtill.getBytes();
--            renewtillLen = 1 + TLV.getNbBytes( renewtillBytes.length ) + renewtillBytes.length;
--            encTikcetPartSeqLen += 1 + TLV.getNbBytes( renewtillLen ) + renewtillLen;
--        }
--
--        if ( clientAddresses != null )
--        {
--            clientAddressesLen = clientAddresses.computeLength();
--            encTikcetPartSeqLen += 1 + TLV.getNbBytes( clientAddressesLen ) + clientAddressesLen;
--        }
--
--        if ( authorizationData != null )
--        {
--            authzDataLen = authorizationData.computeLength();
--            encTikcetPartSeqLen += 1 + TLV.getNbBytes( authzDataLen ) + authzDataLen;
--        }
--
--        encTikcetPartLen = 1 + TLV.getNbBytes( encTikcetPartSeqLen ) + encTikcetPartSeqLen;
--
--        return 1 + TLV.getNbBytes( encTikcetPartLen ) + encTikcetPartLen;
--    }
--
--
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // EncTicketPart application tag and length
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_TAG );
--            buffer.put( TLV.getBytes( encTikcetPartLen ) );
--
--            // EncTicketPart sequence tag and length
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( encTikcetPartSeqLen ) );
--
--            // flags tag and int value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_FLAGS_TAG );
--            buffer.put( TLV.getBytes( flagsLen ) );
--            BerValue.encode( buffer, flags );
--
--            // key tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_KEY_TAG );
--            buffer.put( TLV.getBytes( keyLen ) );
--            key.encode( buffer );
--
--            // crealm tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_CREALM_TAG );
--            buffer.put( TLV.getBytes( cRealmLen ) );
--            buffer.put( UniversalTag.GENERAL_STRING.getValue() );
--            buffer.put( TLV.getBytes( cRealmBytes.length ) );
--            buffer.put( cRealmBytes );
--
--            // cname tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_CNAME_TAG );
--            buffer.put( TLV.getBytes( cNameLen ) );
--            cName.encode( buffer );
--
--            // transited tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_TRANSITED_TAG );
--            buffer.put( TLV.getBytes( transitedLen ) );
--            transited.encode( buffer );
--
--            // authtime tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_AUTHTIME_TAG );
--            buffer.put( TLV.getBytes( authTimeLen ) );
--            buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
--            buffer.put( ( byte ) 0x0F );
--            buffer.put( authTimeBytes );
--
--            if ( startTime != null )
--            {
--                // strattime tag and value
--                buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_STARTTIME_TAG );
--                buffer.put( TLV.getBytes( startTimeLen ) );
--                buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
--                buffer.put( ( byte ) 0x0F );
--                buffer.put( startTimeBytes );
--            }
--
--            // endtime tag and value
--            buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_ENDTIME_TAG );
--            buffer.put( TLV.getBytes( endTimeLen ) );
--            buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
--            buffer.put( ( byte ) 0x0F );
--            buffer.put( endTimeBytes );
--
--            if ( renewtill != null )
--            {
--                // renewtill tag and value
--                buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_RENEWTILL_TAG );
--                buffer.put( TLV.getBytes( renewtillLen ) );
--                buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
--                buffer.put( ( byte ) 0x0F );
--                buffer.put( renewtillBytes );
--            }
--
--            if ( clientAddresses != null )
--            {
--                // caddr tag and value
--                buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_CADDR_TAG );
--                buffer.put( TLV.getBytes( clientAddressesLen ) );
--                clientAddresses.encode( buffer );
--            }
--
--            if ( authorizationData != null )
--            {
--                // authorization-data tag and value
--                buffer.put( ( byte ) KerberosConstants.ENC_TICKET_PART_AUTHORIZATION_DATA_TAG );
--                buffer.put( TLV.getBytes( authzDataLen ) );
--                authorizationData.encode( buffer );
--            }
--        }
--        catch ( BufferOverflowException boe )
--        {
--            log.error( I18n.err( I18n.ERR_742_CANNOT_ENCODE_ENC_TICKET_PART, 1 + TLV.getNbBytes( encTikcetPartLen )
--                + encTikcetPartLen, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            log.debug( "EncTicketPart encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            log.debug( "EncTicketPart initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * @return the flags
--     */
--    public TicketFlags getFlags()
--    {
--        return flags;
--    }
--
--
--    /**
--     * @param flags the flags to set
--     */
--    public void setFlags( TicketFlags flags )
--    {
--        this.flags = flags;
--    }
--
--
--    /**
--     * @return the key
--     */
--    public EncryptionKey getKey()
--    {
--        return key;
--    }
--
--
--    /**
--     * @param key the key to set
--     */
--    public void setKey( EncryptionKey key )
--    {
--        this.key = key;
--    }
--
--
--    /**
--     * @return the cRealm
--     */
--    public String getCRealm()
--    {
--        return cRealm;
--    }
--
--
--    /**
--     * @param cRealm the cRealm to set
--     */
--    public void setCRealm( String cRealm )
--    {
--        this.cRealm = cRealm;
--    }
--
--
--    /**
--     * @return the cName
--     */
--    public PrincipalName getCName()
--    {
--        return cName;
--    }
--
--
--    /**
--     * @param cName the cName to set
--     */
--    public void setCName( PrincipalName cName )
--    {
--        this.cName = cName;
--    }
--
--
--    /**
--     * @return the transited
--     */
--    public TransitedEncoding getTransited()
--    {
--        return transited;
--    }
--
--
--    /**
--     * @param transited the transited to set
--     */
--    public void setTransited( TransitedEncoding transited )
--    {
--        this.transited = transited;
--    }
--
--
--    /**
--     * @return the authTime
--     */
--    public KerberosTime getAuthTime()
--    {
--        return authTime;
--    }
--
--
--    /**
--     * @param authTime the authTime to set
--     */
--    public void setAuthTime( KerberosTime authTime )
--    {
--        this.authTime = authTime;
--    }
--
--
--    /**
--     * @return the startTime
--     */
--    public KerberosTime getStartTime()
--    {
--        return startTime;
--    }
--
--
--    /**
--     * @param startTime the startTime to set
--     */
--    public void setStartTime( KerberosTime startTime )
--    {
--        this.startTime = startTime;
--    }
--
--
--    /**
--     * @return the endTime
--     */
--    public KerberosTime getEndTime()
--    {
--        return endTime;
--    }
--
--
--    /**
--     * @param endTime the endTime to set
--     */
--    public void setEndTime( KerberosTime endTime )
--    {
--        this.endTime = endTime;
--    }
--
--
--    /**
--     * @return the renewtill
--     */
--    public KerberosTime getRenewTill()
--    {
--        return renewtill;
--    }
--
--
--    /**
--     * @param renewtill the renewtill to set
--     */
--    public void setRenewTill( KerberosTime renewtill )
--    {
--        this.renewtill = renewtill;
--    }
--
--
--    /**
--     * @return the clientAddresses
--     */
--    public HostAddresses getClientAddresses()
--    {
--        return clientAddresses;
--    }
--
--
--    /**
--     * @param clientAddresses the clientAddresses to set
--     */
--    public void setClientAddresses( HostAddresses clientAddresses )
--    {
--        this.clientAddresses = clientAddresses;
--    }
--
--
--    /**
--     * @return the authzData
--     */
--    public AuthorizationData getAuthorizationData()
--    {
--        return authorizationData;
--    }
--
--
--    /**
--     * @param authzData the authzData to set
--     */
--    public void setAuthorizationData( AuthorizationData authzData )
--    {
--        this.authorizationData = authzData;
--    }
--
--
--    /**
--     * adds the given flag to the already existing flags.
--     * If no flags exist then creates a new TicketFlags object then sets this flag
--     * and assigns the TicketFlags to this ticket part
--     * 
--     * @param flag the flag to be set
--     */
--    public void setFlag( TicketFlag flag )
--    {
--        if ( flags == null )
--        {
--            flags = new TicketFlags();
--        }
--
--        flags.setFlag( flag.getValue() );
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        StringBuilder sb = new StringBuilder();
--
--        sb.append( "EncTicketPart : {\n" );
--
--        sb.append( "    flags: " ).append( flags ).append( '\n' );
--        sb.append( "    key: " ).append( key ).append( '\n' );
--        sb.append( "    cRealm: " ).append( cRealm ).append( '\n' );
--        sb.append( "    cName: " ).append( cName ).append( '\n' );
--        sb.append( "    transited: " ).append( transited ).append( '\n' );
--        sb.append( "    authTime: " ).append( authTime ).append( '\n' );
--
--        if ( startTime != null )
--        {
--            sb.append( "    startTime: " ).append( startTime ).append( '\n' );
--        }
--
--        sb.append( "    endTime: " ).append( endTime ).append( '\n' );
--
--        if ( renewtill != null )
--        {
--            sb.append( "    renewtill: " ).append( renewtill ).append( '\n' );
--        }
--
--        if ( clientAddresses != null )
--        {
--            sb.append( "    clientAddresses: " ).append( clientAddresses ).append( '\n' );
--        }
--
--        if ( authorizationData != null )
--        {
--            sb.append( "    authzData: " ).append( authorizationData ).append( '\n' );
--        }
--
--        sb.append( "}\n" );
--
--        return sb.toString();
--    }
--
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java
index dfa64dab19,dfa64dab19..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncryptedData.java
+++ /dev/null
@@@ -1,396 -1,396 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--import java.security.MessageDigest;
--import java.util.Arrays;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * A structure storing an encrypted data element. The ASN.1 grammar is :
-- * <pre>
-- * EncryptedData   ::= SEQUENCE {
-- *        etype   [0] Int32 -- EncryptionType --,
-- *        kvno    [1] UInt32 OPTIONAL,
-- *        cipher  [2] OCTET STRING -- ciphertext
-- * }
-- *</pre>
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class EncryptedData implements Asn1Object
--{
--    /** The logger */
--    private static final Logger log = LoggerFactory.getLogger( EncryptedData.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = log.isDebugEnabled();
--
--    /** The used encryption algorithm */
--    private EncryptionType eType;
--
--    /** Version number of the key under which data is encrypted */
--    private int kvno;
--
--    /** A flag used to tell if a kvno has been added, as the kvno is optional. */
--    private boolean hasKvno;
--
--    /** The field containing the enciphered text */
--    private byte[] cipher;
--
--    /** A constant used when the key is not present */
--    public static final boolean HAS_KVNO = true;
--
--    // Storage for computed lengths
--    private int eTypeTagLength;
--    private int kvnoTagLength;
--    private int cipherTagLength;
--    private int encryptedDataSeqLength;
--
--
--    /**
--     * Creates a new instance of EncryptedData.
--     */
--    public EncryptedData()
--    {
--        hasKvno = !HAS_KVNO;
--    }
--
--
--    /**
--     * Creates a new instance of EncryptedData.
--     *
--     * @param eType The encription algorithm
--     * @param kvno The key version
--     * @param cipher the encrypted text
--     */
--    public EncryptedData( EncryptionType eType, int kvno, byte[] cipher )
--    {
--        this.eType = eType;
--        this.hasKvno = kvno > 0;
--        this.kvno = kvno;
--        this.cipher = cipher;
--    }
--
--
--    /**
--     * Creates a new instance of EncryptedData.
--     *
--     * @param eType The encription algorithm
--     * @param cipher the encrypted text
--     */
--    public EncryptedData( EncryptionType eType, byte[] cipher )
--    {
--        this.eType = eType;
--        this.hasKvno = !HAS_KVNO;
--        kvno = -1;
--        this.cipher = cipher;
--    }
--
--
--    /**
--     * Returns the {@link EncryptionType}.
--     *
--     * @return The {@link EncryptionType}.
--     */
--    public EncryptionType getEType()
--    {
--        return eType;
--    }
--
--
--    /**
--     * Set the EncryptionType
--     * @param eType the EncryptionType
--     */
--    public void setEType( EncryptionType eType )
--    {
--        this.eType = eType;
--    }
--
--
--    /**
--     * Returns the key version.
--     *
--     * @return The key version.
--     */
--    public int getKvno()
--    {
--        return hasKvno ? kvno : -1;
--    }
--
--
--    /**
--     * Set the key version
--     * @param kvno The key version
--     */
--    public void setKvno( int kvno )
--    {
--        this.kvno = kvno;
--        hasKvno = true;
--    }
--
--
--    /**
--     * Tells if there is a key version.
--     *
--     * @return <code>true</code> if there is a key version.
--     */
--    public boolean hasKvno()
--    {
--        return hasKvno;
--    }
--
--
--    /**
--     * Returns the raw cipher text.
--     *
--     * @return The raw cipher text.
--     */
--    public byte[] getCipher()
--    {
--        return cipher;
--    }
--
--
--    /**
--     * Set the cipher text
--     * @param cipher The cipher text
--     */
--    public void setCipher( byte[] cipher )
--    {
--        this.cipher = cipher;
--    }
--
--
--    /**
--     * Compute the EncryptedData length
--     * <pre>
--     * EncryptedData :
--     * 
--     * 0x30 L1 EncryptedData sequence
--     *  |
--     *  +--&gt; 0xA1 L2 etype tag
--     *  |     |
--     *  |     +--&gt; 0x02 L2-1 etype (int)
--     *  |
--     *  +--&gt; [0xA2 L3 kvno tag
--     *  |     |
--     *  |     +--&gt; 0x30 L3-1 kvno (int)] (optional)
--     *  |
--     *  +--&gt; 0xA2 L4 cipher tag
--     *        |
--     *        +--&gt; 0x04 L4-1 cipher (OCTET STRING)
--     * </pre>
--     */
--    public int computeLength()
--    {
--        encryptedDataSeqLength = 0;
--
--        // Compute the encryption Type length
--        int eTypeLength = BerValue.getNbBytes( eType.getValue() );
--        eTypeTagLength = 1 + TLV.getNbBytes( eTypeLength ) + eTypeLength;
--        encryptedDataSeqLength = 1 + TLV.getNbBytes( eTypeTagLength ) + eTypeTagLength;
--
--        // Compute the kvno length if any
--        if ( hasKvno )
--        {
--            int kvnoLength = BerValue.getNbBytes( kvno );
--            kvnoTagLength = 1 + TLV.getNbBytes( kvnoLength ) + kvnoLength;
--            encryptedDataSeqLength += 1 + TLV.getNbBytes( kvnoTagLength ) + kvnoTagLength;
--        }
--        else
--        {
--            kvnoTagLength = 0;
--        }
--
--        // Compute the cipher
--        if ( ( cipher == null ) || ( cipher.length == 0 ) )
--        {
--            cipherTagLength = 1 + 1;
--        }
--        else
--        {
--            cipherTagLength = 1 + TLV.getNbBytes( cipher.length ) + cipher.length;
--        }
--
--        encryptedDataSeqLength += 1 + TLV.getNbBytes( cipherTagLength ) + cipherTagLength;
--
--        // Compute the whole sequence length
--        return 1 + TLV.getNbBytes( encryptedDataSeqLength ) + encryptedDataSeqLength;
--    }
--
--
--    /**
--     * Encode the EncryptedData message to a PDU. 
--     * <pre>
--     * EncryptedData :
--     * 
--     * 0x30 LL
--     *   0xA0 LL 
--     *     0x02 0x01 etype (integer)
--     *   [0xA1 LL 
--     *     0x02 0x01 kvno (integer)] (optional)
--     *   0xA2 LL 
--     *     0x04 LL cipher (OCTET STRING)
--     * </pre>
--     * @param buffer The buffer where to put the PDU. It should have been allocated
--     * before, with the right size.
--     * @return The constructed PDU.
--     */
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // The EncryptedData SEQ Tag
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( encryptedDataSeqLength ) );
--
--            // The etype, first the tag, then the value
--            buffer.put( ( byte ) 0xA0 );
--            buffer.put( TLV.getBytes( eTypeTagLength ) );
--
--            BerValue.encode( buffer, eType.getValue() );
--
--            // The kvno, if any, first the tag, then the value
--            if ( hasKvno )
--            {
--                buffer.put( ( byte ) 0xA1 );
--                buffer.put( TLV.getBytes( kvnoTagLength ) );
--
--                BerValue.encode( buffer, kvno );
--            }
--
--            // The cipher tag
--            buffer.put( ( byte ) 0xA2 );
--            buffer.put( TLV.getBytes( cipherTagLength ) );
--            BerValue.encode( buffer, cipher );
--        }
--        catch ( BufferOverflowException boe )
--        {
--            log.error( I18n.err( I18n.ERR_141, 1 + TLV.getNbBytes( encryptedDataSeqLength )
--                + encryptedDataSeqLength, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            log.debug( "EncryptedData encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            log.debug( "EncryptedData initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        final int prime = 31;
--        int result = 1;
--        result = prime * result + Arrays.hashCode( cipher );
--        result = prime * result + ( ( eType == null ) ? 0 : eType.hashCode() );
--        result = prime * result + kvno;
--        return result;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof EncryptedData ) )
--        {
--            return false;
--        }
--
--        EncryptedData other = ( EncryptedData ) obj;
--
--        if ( !MessageDigest.isEqual( cipher, other.cipher ) )
--        {
--            return false;
--        }
--
--        if ( eType != other.eType )
--        {
--            return false;
--        }
--
--        return kvno == other.kvno;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        return toString( "" );
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString( String tabs )
--    {
--        StringBuilder sb = new StringBuilder();
--
--        sb.append( tabs ).append( "EncryptedData : {\n" );
--        sb.append( tabs ).append( "    etype: " ).append( eType ).append( '\n' );
--
--        if ( hasKvno )
--        {
--            sb.append( tabs ).append( "    kvno: " ).append( kvno ).append( '\n' );
--        }
--
--        sb.append( tabs ).append( "    cipher: " ).append( Strings.dumpBytes( cipher ) ).append( "\n}\n" );
--
--        return sb.toString();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
index 598f553e5c,598f553e5c..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
+++ /dev/null
@@@ -1,358 -1,358 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.net.Inet6Address;
--import java.net.InetAddress;
--import java.net.UnknownHostException;
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--import java.util.Arrays;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.apache.directory.shared.kerberos.codec.types.HostAddrType;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * Provides host address information.
-- * 
-- * The ASN.1 grammar for this structure is :
-- * <pre>
-- * HostAddress     ::= SEQUENCE  {
-- *        addr-type       [0] Int32,
-- *        address         [1] OCTET STRING
-- * }
-- * </pre>
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class HostAddress implements Asn1Object
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( HostAddress.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--    /** The host address type. One of :
--     *    Address Type                   Value
--     *
--     *    IPv4                             2
--     *    Directional                      3
--     *    ChaosNet                         5
--     *    XNS                              6
--     *    ISO                              7
--     *    DECNET Phase IV                 12
--     *    AppleTalk DDP                   16
--     *    NetBios                         20
--     *    IPv6                            24
--     */
--    private HostAddrType addrType;
--
--    /** The address */
--    private byte[] address;
--
--    // Storage for computed lengths
--    private int addrTypeLength;
--    private int addressLength;
--    private int hostAddressLength;
--    private int hostAddressSeqLength;
--
--
--    /**
--     * Creates an empty HostAdress instance
--     */
--    public HostAddress()
--    {
--    }
--
--
--    /**
--     * Creates a new instance of HostAddress.
--     *
--     * @param addrType The type of address
--     * @param address The address
--     */
--    public HostAddress( HostAddrType addrType, byte[] address )
--    {
--        this.addrType = addrType;
--        this.address = address;
--    }
--
--
--    /**
--     * Creates a new instance of HostAddress.
--     *
--     * @param internetAddress The Inet form address
--     */
--    public HostAddress( InetAddress internetAddress )
--    {
--        addrType = ( internetAddress instanceof Inet6Address ) ? HostAddrType.ADDRTYPE_INET6 : HostAddrType.ADDRTYPE_INET;
--        byte[] newAddress = internetAddress.getAddress();
--        address = new byte[newAddress.length];
--        System.arraycopy( newAddress, 0, address, 0, newAddress.length );
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        int hash = 37;
--        hash = hash * 17 + addrType.hashCode();
--
--        if ( address != null )
--        {
--            hash = hash * 17 + Arrays.hashCode( address );
--        }
--
--        return hash;
--    }
--
--
--    /**
--     * Returns whether one {@link HostAddress} is equal to another.
--     *
--     * @param that The {@link HostAddress} to compare with
--     * @return true if the {@link HostAddress}'s are equal.
--     */
--    @Override
--    public boolean equals( Object that )
--    {
--        if ( this == that )
--        {
--            return true;
--        }
--
--        if ( !( that instanceof HostAddress ) )
--        {
--            return false;
--        }
--
--        HostAddress hostAddress = ( HostAddress ) that;
--
--        if ( addrType != hostAddress.addrType || ( address != null && hostAddress.address == null )
--            || ( address == null && hostAddress.address != null ) )
--        {
--            return false;
--        }
--
--        if ( address != null && hostAddress.address != null )
--        {
--            if ( address.length != hostAddress.address.length )
--            {
--                return false;
--            }
--
--            for ( int ii = 0; ii < address.length; ii++ )
--            {
--                if ( address[ii] != hostAddress.address[ii] )
--                {
--                    return false;
--                }
--            }
--        }
--
--        return true;
--    }
--
--
--    /**
--     * Get the bytes for this address.
--     *
--     * @return The bytes of this address.
--     */
--    public byte[] getAddress()
--    {
--        return address;
--    }
--
--
--    /**
--     * Set the address 
--     *
--     * @param addresse The address
--     */
--    public void setAddress( byte[] addresse )
--    {
--        this.address = addresse;
--    }
--
--
--    /**
--     * Compute the host address length
--     * <pre>
--     * HostAddress :
--     * 
--     * 0x30 L1 hostAddress sequence
--     *  |
--     *  +--&gt; 0xA0 L2 addrType tag
--     *  |     |
--     *  |     +--&gt; 0x02 L2-1 addrType (int)
--     *  |
--     *  +--&gt; 0xA1 L3 address tag
--     *        |
--     *        +--&gt; 0x04 L3-1 address (OCTET STRING)
--     *        
--     *  where L1 = L2 + length(0xA0) + length(L2) +
--     *             L3 + length(0xA1) + length(L3) 
--     *  and
--     *  L2 = L2-1 + length(0x02) + length( L2-1) 
--     *  L3 = L3-1 + length(0x04) + length( L3-1) 
--     *  </pre>
--     */
--    public int computeLength()
--    {
--        // Compute the keyType. The Length will always be contained in 1 byte
--        addrTypeLength = 1 + 1 + BerValue.getNbBytes( addrType.getValue() );
--        hostAddressLength = 1 + TLV.getNbBytes( addrTypeLength ) + addrTypeLength;
--
--        // Compute the keyValue
--        if ( address == null )
--        {
--            addressLength = 1 + 1;
--        }
--        else
--        {
--            addressLength = 1 + TLV.getNbBytes( address.length ) + address.length;
--        }
--
--        hostAddressLength += 1 + TLV.getNbBytes( addressLength ) + addressLength;
--
--        // Compute the whole sequence length
--        hostAddressSeqLength = 1 + TLV.getNbBytes( hostAddressLength ) + hostAddressLength;
--
--        return hostAddressSeqLength;
--    }
--
--
--    /**
--     * Encode the HostAddress message to a PDU. 
--     * <pre>
--     * HostAddress :
--     * 
--     * 0x30 LL
--     *   0xA0 LL 
--     *     0x02 0x01 addr-type
--     *   0xA1 LL 
--     *     0x04 LL address
--     * </pre>
--     * @param buffer The buffer where to put the PDU. It should have been allocated
--     * before, with the right size.
--     * @return The constructed PDU.
--     */
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // The HostAddress SEQ Tag
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( hostAddressLength ) );
--
--            // The addr-type, first the tag, then the value
--            buffer.put( ( byte ) 0xA0 );
--            buffer.put( TLV.getBytes( addrTypeLength ) );
--            BerValue.encode( buffer, addrType.getValue() );
--
--            // The address, first the tag, then the value
--            buffer.put( ( byte ) 0xA1 );
--            buffer.put( TLV.getBytes( addressLength ) );
--            BerValue.encode( buffer, address );
--        }
--        catch ( BufferOverflowException boe )
--        {
--            LOG.error( I18n.err( I18n.ERR_143, 1 + TLV.getNbBytes( hostAddressLength )
--                + hostAddressLength, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            LOG.debug( "Checksum encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            LOG.debug( "Checksum initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * Returns the {@link HostAddrType} of this {@link HostAddress}.
--     *
--     * @return The {@link HostAddrType}.
--     */
--    public HostAddrType getAddrType()
--    {
--        return addrType;
--    }
--
--
--    /**
--     * Set the addr-type field
--     *
--     * @param addrType The address type
--     */
--    public void setAddrType( HostAddrType addrType )
--    {
--        this.addrType = addrType;
--    }
--
--
--    /**
--     * Set the addr-type field
--     *
--     * @param addrType The address type
--     */
--    public void setAddrType( int addrType )
--    {
--        this.addrType = HostAddrType.getTypeByOrdinal( addrType );
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    public String toString()
--    {
--        try
--        {
--            return InetAddress.getByAddress( address ).getHostAddress();
--        }
--        catch ( UnknownHostException uhe )
--        {
--            return "Unknow host : " + Strings.utf8ToString( address );
--        }
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java
index 483a8aab33,483a8aab33..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddresses.java
+++ /dev/null
@@@ -1,303 -1,303 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--import java.util.ArrayList;
--import java.util.Arrays;
--import java.util.List;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * Store a list of addresses.
-- * 
-- * The ASN.1 grammar is :
-- * <pre>
-- * -- NOTE: HostAddresses is always used as an OPTIONAL field and
-- * -- should not be empty.
-- * HostAddresses   -- NOTE: subtly different from rfc1510,
-- *                 -- but has a value mapping and encodes the same
-- *         ::= SEQUENCE OF HostAddress
-- *</pre>
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class HostAddresses implements Asn1Object
--{
--    /** The logger */
--    private static final Logger LOG = LoggerFactory.getLogger( HostAddresses.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
--
--    /** List of all HostAddress stored */
--    private List<HostAddress> addresses;
--
--    // Storage for computed lengths
--    private int addressesLength;
--
--
--    /**
--     * Creates a new instance of HostAddresses.
--     */
--    public HostAddresses()
--    {
--        this.addresses = new ArrayList<>();
--    }
--
--
--    /**
--     * Creates a new instance of HostAddresses.
--     *
--     * @param addresses The associated addresses
--     */
--    public HostAddresses( HostAddress[] addresses )
--    {
--        if ( addresses == null )
--        {
--            this.addresses = new ArrayList<>();
--        }
--        else
--        {
--            this.addresses = Arrays.asList( addresses );
--        }
--    }
--
--
--    /**
--     * Adds an {@link HostAddresses} to the list
--     * @param hostAddress The address to add
--     */
--    public void addHostAddress( HostAddress hostAddress )
--    {
--        addresses.add( hostAddress );
--    }
--
--
--    /**
--     * Returns true if this {@link HostAddresses} contains a specified {@link HostAddress}.
--     *
--     * @param address The address we are looking for in the existing list
--     * @return true if this {@link HostAddresses} contains a specified {@link HostAddress}.
--     */
--    public boolean contains( HostAddress address )
--    {
--        if ( addresses != null )
--        {
--            return addresses.contains( address );
--        }
--
--        return false;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        int hash = 37;
--
--        if ( addresses != null )
--        {
--            hash = hash * 17 + addresses.size();
--            hash = hash * 17 + addresses.hashCode();
--        }
--
--        return hash;
--    }
--
--
--    /**
--     * Returns true if two {@link HostAddresses} are equal.
--     *
--     * @param obj The {@link HostAddresses} we want to compare with the current one
--     * @return true if two {@link HostAddresses} are equal.
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof HostAddresses ) )
--        {
--            return false;
--        }
--
--        HostAddresses that = ( HostAddresses ) obj;
--
--        // Addresses can't be null after creation
--        if ( addresses.size() != that.addresses.size() )
--        {
--            return false;
--        }
--
--        for ( int i = 0; i < addresses.size(); i++ )
--        {
--            if ( !addresses.get( i ).equals( that.addresses.get( i ) ) )
--            {
--                return false;
--            }
--        }
--
--        return true;
--    }
--
--
--    /**
--     * Returns the contained {@link HostAddress}s as an array.
--     *
--     * @return An array of {@link HostAddress}s.
--     */
--    public HostAddress[] getAddresses()
--    {
--        return addresses.toArray( new HostAddress[0] );
--    }
--
--
--    /**
--     * Compute the hostAddresses length
--     * <pre>
--     * HostAddresses :
--     * 
--     * 0x30 L1 hostAddresses sequence of HostAddresses
--     *  |
--     *  +--&gt; 0x30 L2[1] Hostaddress[1]
--     *  |
--     *  +--&gt; 0x30 L2[2] Hostaddress[2]
--     *  |
--     *  ...
--     *  |
--     *  +--&gt; 0x30 L2[n] Hostaddress[n]
--     *        
--     *  where L1 = sum( L2[1], l2[2], ..., L2[n] )
--     * </pre>
--     */
--    public int computeLength()
--    {
--        // Compute the addresses length.
--        addressesLength = 0;
--
--        if ( ( addresses != null ) && !addresses.isEmpty() )
--        {
--            for ( HostAddress hostAddress : addresses )
--            {
--                int length = hostAddress.computeLength();
--                addressesLength += length;
--            }
--        }
--
--        return 1 + TLV.getNbBytes( addressesLength ) + addressesLength;
--    }
--
--
--    /**
--     * Encode the HostAddress message to a PDU. 
--     * <pre>
--     * HostAddress :
--     * 
--     * 0x30 LL
--     *   0x30 LL hostaddress[1] 
--     *   0x30 LL hostaddress[1]
--     *   ... 
--     *   0x30 LL hostaddress[1] 
--     * </pre>
--     * @param buffer The buffer where to put the PDU. It should have been allocated
--     * before, with the right size.
--     * @return The constructed PDU.
--     */
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // The HostAddresses SEQ Tag
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( addressesLength ) );
--
--            // The hostAddress list, if it's not empty
--            if ( ( addresses != null ) && !addresses.isEmpty() )
--            {
--                for ( HostAddress hostAddress : addresses )
--                {
--                    hostAddress.encode( buffer );
--                }
--            }
--        }
--        catch ( BufferOverflowException boe )
--        {
--            LOG.error( I18n.err( I18n.ERR_144, 1 + TLV.getNbBytes( addressesLength )
--                + addressesLength, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            LOG.debug( "HostAddresses encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            LOG.debug( "HostAddresses initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        StringBuilder sb = new StringBuilder();
--        boolean isFirst = true;
--
--        for ( HostAddress hostAddress : addresses )
--        {
--            if ( isFirst )
--            {
--                isFirst = false;
--            }
--            else
--            {
--                sb.append( ", " );
--            }
--
--            sb.append( hostAddress.toString() );
--        }
--
--        return sb.toString();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
index 10e3cf5dfd,10e3cf5dfd..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
+++ /dev/null
@@@ -1,285 -1,285 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.components;
--
--
--import java.nio.BufferOverflowException;
--import java.nio.ByteBuffer;
--import java.util.Arrays;
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.api.asn1.EncoderException;
--import org.apache.directory.api.asn1.ber.tlv.BerValue;
--import org.apache.directory.api.asn1.ber.tlv.TLV;
--import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.server.i18n.I18n;
--import org.apache.directory.shared.kerberos.KerberosConstants;
--import org.apache.directory.shared.kerberos.codec.types.TransitedEncodingType;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
--
--
--/**
-- * The TransitedEncoding structure.
-- * 
-- * The ASN.1 grammar is :
-- * <pre>
-- * -- encoded Transited field
-- * TransitedEncoding       ::= SEQUENCE {
-- *         tr-type         [0] Int32 -- must be registered --,
-- *         contents        [1] OCTET STRING
-- * }
-- * </pre>
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class TransitedEncoding implements Asn1Object
--{
--    /** The logger */
--    private static final Logger log = LoggerFactory.getLogger( TransitedEncoding.class );
--
--    /** Speedup for logs */
--    private static final boolean IS_DEBUG = log.isDebugEnabled();
--
--    /** 
--     * The transited type. One of :
--     * NULL
--     * DOMAIN_X500_COMPRESS
--     */
--    private TransitedEncodingType trType;
--
--    /** The transited data */
--    private byte[] contents;
--
--    // Storage for computed lengths
--    private int trTypeLength;
--    private int contentsLength;
--    private int transitedEncodingLength;
--
--
--    /**
--     * Creates a new instance of TransitedEncoding.
--     */
--    public TransitedEncoding()
--    {
--        trType = TransitedEncodingType.NULL;
--        contents = Strings.EMPTY_BYTES;
--    }
--
--
--    /**
--     * Returns the contents.
--     *
--     * @return The contents.
--     */
--    public byte[] getContents()
--    {
--        return contents;
--    }
--
--
--    /**
--     * Set the contents
--     * @param contents The contents
--     */
--    public void setContents( byte[] contents )
--    {
--        this.contents = contents;
--    }
--
--
--    /**
--     * Returns the {@link TransitedEncodingType}.
--     *
--     * @return The {@link TransitedEncodingType}.
--     */
--    public TransitedEncodingType getTrType()
--    {
--        return trType;
--    }
--
--
--    /**
--     * Set the transited encoding type
--     * @param trType The transited encoding type
--     */
--    public void setTrType( TransitedEncodingType trType )
--    {
--        this.trType = trType;
--    }
--
--
--    /**
--     * Compute the TransitedEncoding length
--     * 
--     * <pre>
--     * TransitedEncoding :
--     * 
--     * 0x30 L1 TransitedEncoding
--     *  |
--     *  +--&gt; 0xA0 L2 trType tag
--     *  |     |
--     *  |     +--&gt; 0x02 L2-1 trType (int)
--     *  |
--     *  +--&gt; 0xA1 L3 contents tag
--     *        |
--     *        +--&gt; 0x04 L3-1 contents (OCTET STRING)
--     *        
--     *  where L1 = L2 + lenght(0xA0) + length(L2) +
--     *             L3 + lenght(0xA1) + length(L3) 
--     *  and
--     *  L2 = L2-1 + length(0x02) + length( L2-1) 
--     *  L3 = L3-1 + length(0x04) + length( L3-1) 
--     *  </pre>
--     */
--    public int computeLength()
--    {
--        // Compute the trType. The Length will always be contained in 1 byte
--        trTypeLength = 1 + 1 + BerValue.getNbBytes( trType.getValue() );
--        transitedEncodingLength = 1 + TLV.getNbBytes( trTypeLength ) + trTypeLength;
--
--        // Compute the contents length
--        if ( contents == null )
--        {
--            contentsLength = 1 + 1;
--        }
--        else
--        {
--            contentsLength = 1 + TLV.getNbBytes( contents.length ) + contents.length;
--        }
--
--        transitedEncodingLength += 1 + TLV.getNbBytes( contentsLength ) + contentsLength;
--
--        // Compute the whole sequence length
--        return 1 + TLV.getNbBytes( transitedEncodingLength ) + transitedEncodingLength;
--    }
--
--
--    /**
--     * Encode the TransitedEncoding message to a PDU. 
--     * 
--     * TransitedEncoding :
--     * 
--     * 0x30 LL
--     *   0xA0 LL 
--     *     0x02 0x01 trType
--     *   0xA1 LL 
--     *     0x04 LL contents
--     * 
--     * @param buffer The buffer where to put the PDU. It should have been allocated
--     * before, with the right size.
--     * @return The constructed PDU.
--     */
--    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
--    {
--        if ( buffer == null )
--        {
--            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
--        }
--
--        try
--        {
--            // The AuthorizationDataEntry SEQ Tag
--            buffer.put( UniversalTag.SEQUENCE.getValue() );
--            buffer.put( TLV.getBytes( transitedEncodingLength ) );
--
--            // The tr-type, first the tag, then the value
--            buffer.put( ( byte ) KerberosConstants.TRANSITED_ENCODING_TR_TYPE_TAG );
--            buffer.put( TLV.getBytes( trTypeLength ) );
--            BerValue.encode( buffer, trType.getValue() );
--
--            // The contents, first the tag, then the value
--            buffer.put( ( byte ) KerberosConstants.TRANSITED_ENCODING_CONTENTS_TAG );
--            buffer.put( TLV.getBytes( contentsLength ) );
--            BerValue.encode( buffer, contents );
--        }
--        catch ( BufferOverflowException boe )
--        {
--            log.error( I18n.err( I18n.ERR_147, 1 + TLV.getNbBytes( transitedEncodingLength )
--                + transitedEncodingLength, buffer.capacity() ) );
--            throw new EncoderException( I18n.err( I18n.ERR_138 ), boe );
--        }
--
--        if ( IS_DEBUG )
--        {
--            log.debug( "TransitedEncoding encoding : {}", Strings.dumpBytes( buffer.array() ) );
--            log.debug( "TransitedEncoding initial value : {}", this );
--        }
--
--        return buffer;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public int hashCode()
--    {
--        final int prime = 31;
--        int result = 1;
--        result = prime * result + Arrays.hashCode( contents );
--        result = prime * result + ( ( trType == null ) ? 0 : trType.hashCode() );
--        return result;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof TransitedEncoding ) )
--        {
--            return false;
--        }
--
--        TransitedEncoding other = ( TransitedEncoding ) obj;
--
--        if ( !Arrays.equals( contents, other.contents ) )
--        {
--            return false;
--        }
--
--        return trType == other.trType;
--    }
--
--
--    /**
--     * @see Object#toString()
--     */
--    public String toString()
--    {
--        StringBuilder sb = new StringBuilder();
--
--        sb.append( "TransitedEncoding : {\n" );
--        sb.append( "    tr-type: " ).append( trType ).append( '\n' );
--
--        sb.append( "    contents: " ).append( Strings.dumpBytes( contents ) ).append( "\n}\n" );
--
--        return sb.toString();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/exceptions/InvalidTicketException.java
index 6d2f638cd6,6d2f638cd6..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/exceptions/InvalidTicketException.java
+++ /dev/null
@@@ -1,43 -1,43 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.exceptions;
--
--
--/**
-- * A exception used when there was an error while creating a Ticket
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class InvalidTicketException extends KerberosException
--{
--    static final long serialVersionUID = 1L;
--
--
--    public InvalidTicketException( ErrorType errorType )
--    {
--        super( errorType );
--    }
--
--
--    public InvalidTicketException( ErrorType errorType, String explanation )
--    {
--        super( errorType, explanation );
--    }
--
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/AbstractKerberosFlags.java
index dd8c98f5a5,dd8c98f5a5..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/AbstractKerberosFlags.java
+++ /dev/null
@@@ -1,236 -1,236 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.shared.kerberos.flags;
--
--
--import org.apache.directory.api.asn1.util.BitString;
--
--
--/**
-- * An implementation of a BitString for any KerberosFlags. The different values
-- * are stored in an int, as there can't be more than 32 flags (TicketFlag).
-- *
-- * Some basic operations are implemented in this abstract class, like those
-- * manipulating flags.
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class AbstractKerberosFlags extends BitString
--{
--    /**
--     * The maximum size of the BitString as specified for Kerberos flags.
--     */
--    public static final int MAX_SIZE = 32;
--
--    /** The associated value */
--    protected int value;
--
--
--    /**
--     * Standard constructor, which create a BitString containing 32 bits
--     */
--    public AbstractKerberosFlags()
--    {
--        super( MAX_SIZE );
--        value = 0;
--    }
--
--
--    /**
--     * Standard constructor, which create a BitString containing 32 bits
--     *
--     *
--     * @param value The flags to store
--     */
--    public AbstractKerberosFlags( int value )
--    {
--        super( MAX_SIZE );
--
--        setData( value );
--    }
--
--
--    /**
--     * Store the flags contained in the given integer value
--     * @param value The list of flags to set, as a int
--     */
--    public void setData( int value )
--    {
--        byte[] bytes = new byte[5];
--
--        // The first byte contains the number of unused bytes, 0 here as we store 32 bits
--        bytes[0] = 0;
--
--        bytes[1] = ( byte ) ( value >> 24 );
--        bytes[2] = ( byte ) ( ( value >> 16 ) & 0x00FF );
--        bytes[3] = ( byte ) ( ( value >> 8 ) & 0x00FF );
--        bytes[4] = ( byte ) ( value & 0x00FF );
--
--        super.setData( bytes );
--        this.value = value;
--    }
--
--
--    /**
--     * Standard constructor, taking a byte array, 32 bits
--     */
--    public AbstractKerberosFlags( byte[] flags )
--    {
--        super( flags );
--
--        if ( ( flags == null ) || ( flags.length != 5 ) )
--        {
--            throw new IllegalArgumentException( "The given flags is not correct" );
--        }
--
--        value = ( ( flags[1] & 0x00FF ) << 24 ) | ( ( flags[2] & 0x00FF ) << 16 ) | ( ( flags[3] & 0x00FF ) << 8 )
--            | ( 0x00FF & flags[4] );
--    }
--
--
--    /**
--     * Returns the int value associated with the flags
--     */
--    public int getIntValue()
--    {
--        return value;
--    }
--
--
--    /**
--     * Check if a flag is set
--     * @param flags The flags to test
--     * @param flag The flag to check
--     * @return True if the flag is set in the list of flags
--     */
--    public static boolean isFlagSet( int flags, int flag )
--    {
--        return ( flags & ( 1 << ( MAX_SIZE - 1 - flag ) ) ) != 0;
--    }
--
--
--    /**
--     * Check if a flag is set for the actual value
--     *
--     * @param flag The flag to check
--     * @return True if the flag is set in the list of flags
--     */
--    public boolean isFlagSet( KerberosFlag flag )
--    {
--        int mask = 1 << ( MAX_SIZE - 1 - flag.getValue() );
--
--        return ( value & mask ) != 0;
--    }
--
--
--    /**
--     * Check if a flag is set
--     * @param flag The flags to test
--     * @return True if the flag is set in the list of flags
--     */
--    public boolean isFlagSet( int flag )
--    {
--        return ( value & ( 1 << ( MAX_SIZE - 1 - flag ) ) ) != 0;
--    }
--
--
--    /**
--     * Set a flag in a list of flags
--     *
--     * @param flag The flag to set
--     */
--    public void setFlag( KerberosFlag flag )
--    {
--        int pos = MAX_SIZE - 1 - flag.getValue();
--        setBit( flag.getValue() );
--        value |= 1 << pos;
--    }
--
--
--    /**
--     * Set a flag in a list of flags
--     *
--     * @param flag The flag to set
--     */
--    public void setFlag( int flag )
--    {
--        int pos = MAX_SIZE - 1 - flag;
--        setBit( flag );
--        value |= 1 << pos;
--    }
--
--
--    /**
--     * clear a flag in a list of flags
--     *
--     * @param flag The flag to set
--     */
--    public void clearFlag( KerberosFlag flag )
--    {
--        int pos = MAX_SIZE - 1 - flag.getValue();
--        clearBit( flag.getValue() );
--        value &= ~( 1 << pos );
--    }
--
--
--    /**
--     * clear a flag in a list of flags
--     *
--     * @param flag The flag to set
--     */
--    public void clearFlag( int flag )
--    {
--        int pos = MAX_SIZE - 1 - flag;
--        clearBit( flag );
--        value &= ~( 1 << pos );
--    }
--
--
--    @Override
--    public int hashCode()
--    {
--        final int prime = 31;
--        int result = 1;
--        result = prime * result + value;
--        return result;
--    }
--
--
--    /**
--     * {@inheritDoc}
--     */
--    @Override
--    public boolean equals( Object obj )
--    {
--        if ( this == obj )
--        {
--            return true;
--        }
--
--        if ( !( obj instanceof AbstractKerberosFlags ) )
--        {
--            return false;
--        }
--
--        AbstractKerberosFlags other = ( AbstractKerberosFlags ) obj;
--
--        return value == other.value;
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/KerberosFlag.java
index 7ea6b357bd,7ea6b357bd..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/KerberosFlag.java
+++ /dev/null
@@@ -1,38 -1,38 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.flags;
--
--
--/**
-- * This interface must be implemented by all the inherited Flag classes :
-- * - TicketFlag
-- * - ApOption
-- * - KdcOption
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- *
-- */
--public interface KerberosFlag
--{
--    /**
--     * @return The ordinal value associated with this flag
--     */
--    int getValue();
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/KerberosFlags.java
index edaa2ca12b,edaa2ca12b..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/KerberosFlags.java
+++ /dev/null
@@@ -1,83 -1,83 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.flags;
--
--
--/**
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- *
-- */
--public interface KerberosFlags
--{
--    /**
--     * Returns the int value associated with the flags
--     */
--    int getIntValue();
--
--
--    /**
--     * Check if a flag is set for the actual value
--     * 
--     * @param flag The flag to check
--     * @return True if the flag is set in the list of flags
--     */
--    boolean isFlagSet( KerberosFlag flag );
--
--
--    /**
--     * Check if a flag is set
--     * @param flag The flags to test
--     * @return True if the flag is set in the list of flags
--     */
--    boolean isFlagSet( int flag );
--
--
--    /**
--     * Set a flag in a list of flags
--     * 
--     * @param flag The flag to set
--     */
--    void setFlag( KerberosFlag flag );
--
--
--    /**
--     * Set a flag in a list of flags
--     * 
--     * @param flag The flag to set
--     */
--    void setFlag( int flag );
--
--
--    /**
--     * clear a flag in a list of flags
--     * 
--     * @param flag The flag to set
--     */
--    void clearFlag( KerberosFlag flag );
--
--
--    /**
--     * clear a flag in a list of flags
--     * 
--     * @param flag The flag to set
--     */
--    void clearFlag( int flag );
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/TicketFlag.java
index 40adac4520,40adac4520..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/TicketFlag.java
+++ /dev/null
@@@ -1,141 -1,141 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.flags;
--
--
--/**
-- * An enum to describe all the TicketFlag possible values.
-- * 
-- *  TicketFlags     ::= KerberosFlags
-- *           -- reserved(0),
-- *           -- forwardable(1),
-- *           -- forwarded(2),
-- *           -- proxiable(3),
-- *           -- proxy(4),
-- *           -- may-postdate(5),
-- *           -- postdated(6),
-- *           -- invalid(7),
-- *           -- renewable(8),
-- *           -- initial(9),
-- *           -- pre-authent(10),
-- *           -- hw-authent(11),
-- *       -- the following are new since 1510
-- *           -- transited-policy-checked(12),
-- *           -- ok-as-delegate(13)
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public enum TicketFlag implements KerberosFlag
--{
--    /**
--     * Ticket flag - reserved
--     */
--    RESERVED(0),
--
--    /**
--     * Ticket flag - forwardable
--     */
--    FORWARDABLE(1),
--
--    /**
--     * Ticket flag - forwarded
--     */
--    FORWARDED(2),
--
--    /**
--     * Ticket flag - proxiable
--     */
--    PROXIABLE(3),
--
--    /**
--     * Ticket flag - proxy
--     */
--    PROXY(4),
--
--    /**
--     * Ticket flag - may be postdated
--     */
--    MAY_POSTDATE(5),
--
--    /**
--     * Ticket flag - postdated
--     */
--    POSTDATED(6),
--    /**
--     * Ticket flag - invalid
--     */
--    INVALID(7),
--
--    /**
--     * Ticket flag - renewable
--     */
--    RENEWABLE(8),
--
--    /**
--     * Ticket flag - initial
--     */
--    INITIAL(9),
--
--    /**
--     * Ticket flag - pre-authentication
--     */
--    PRE_AUTHENT(10),
--
--    /**
--     * Ticket flag - hardware authentication
--     */
--    HW_AUTHENT(11),
--
--    /**
--     * Ticket flag - transitedEncoding policy checked
--     */
--    TRANSITED_POLICY_CHECKED(12),
--
--    /**
--     * Ticket flag - OK as delegate
--     */
--    OK_AS_DELEGATE(13),
--
--    /**
--     * Ticket flag - maximum value
--     */
--    MAX_VALUE(32);
--
--    // The interned value.
--    private int value;
--
--
--    /**
--     * Class constructor
--     */
--    private TicketFlag( int value )
--    {
--        this.value = value;
--    }
--
--
--    /**
--     * @return The value associated with this flag
--     */
--    public int getValue()
--    {
--        return value;
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/TicketFlags.java
index 3b5ac8cc1b,3b5ac8cc1b..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/flags/TicketFlags.java
+++ /dev/null
@@@ -1,264 -1,264 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.flags;
--
--
--/**
-- * An implementation of a BitString for the TicketFlags. The different values
-- * are stored in an int, as there can't be more than 32 flags (TicketFlag).
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class TicketFlags extends AbstractKerberosFlags
--{
--    /**
--      * Basic constructor of a TicketFlags BitString
--      */
--    public TicketFlags()
--    {
--        super();
--    }
--
--
--    /**
--     * Constructor of a TicketFlags BitString with an int value
--     */
--    public TicketFlags( int flags )
--    {
--        super( flags );
--    }
--
--
--    /**
--     * Basic constructor of a TicketFlags BitString with a byte array
--     */
--    public TicketFlags( byte[] flags )
--    {
--        super( flags );
--    }
--
--
--    /**
--     * Ticket flag - reserved
--     */
--    public boolean isReserved()
--    {
--        return isFlagSet( TicketFlag.RESERVED );
--    }
--
--
--    /**
--     * Ticket flag - forwardable
--     */
--    public boolean isForwardable()
--    {
--        return isFlagSet( TicketFlag.FORWARDABLE );
--    }
--
--
--    /**
--     * Ticket flag - forwarded
--     */
--    public boolean isForwarded()
--    {
--        return isFlagSet( TicketFlag.FORWARDED );
--    }
--
--
--    /**
--     * Ticket flag - proxiable
--     */
--    public boolean isProxiable()
--    {
--        return isFlagSet( TicketFlag.PROXIABLE );
--    }
--
--
--    /**
--     * Ticket flag - proxy
--     */
--    public boolean isProxy()
--    {
--        return isFlagSet( TicketFlag.PROXY );
--    }
--
--
--    /**
--     * Ticket flag - may be postdated
--     */
--    public boolean isMayPosdate()
--    {
--        return isFlagSet( TicketFlag.MAY_POSTDATE );
--    }
--
--
--    /**
--     * Ticket flag - postdated
--     */
--    public boolean isPostdated()
--    {
--        return isFlagSet( TicketFlag.POSTDATED );
--    }
--
--
--    /**
--     * Ticket flag - invalid
--     */
--    public boolean isInvalid()
--    {
--        return isFlagSet( TicketFlag.INVALID );
--    }
--
--
--    /**
--     * Ticket flag - renewable
--     */
--    public boolean isRenewable()
--    {
--        return isFlagSet( TicketFlag.RENEWABLE );
--    }
--
--
--    /**
--     * Ticket flag - initial
--     */
--    public boolean isInitial()
--    {
--        return isFlagSet( TicketFlag.INITIAL );
--    }
--
--
--    /**
--     * Ticket flag - pre-authentication
--     */
--    public boolean isPreAuth()
--    {
--        return isFlagSet( TicketFlag.PRE_AUTHENT );
--    }
--
--
--    /**
--     * Ticket flag - hardware authentication
--     */
--    public boolean isHwAuthent()
--    {
--        return isFlagSet( TicketFlag.HW_AUTHENT );
--    }
--
--
--    /**
--     * Ticket flag - transitedEncoding policy checked
--     */
--    public boolean isTransitedPolicyChecked()
--    {
--        return isFlagSet( TicketFlag.TRANSITED_POLICY_CHECKED );
--    }
--
--
--    /**
--     * Ticket flag - OK as delegate
--     */
--    public boolean isOkAsDelegate()
--    {
--        return isFlagSet( TicketFlag.OK_AS_DELEGATE );
--    }
--
--
--    /**
--     * Converts the object to a printable string.
--     */
--    @Override
--    public String toString()
--    {
--        StringBuilder result = new StringBuilder();
--
--        if ( isFlagSet( TicketFlag.RESERVED ) )
--        {
--            result.append( "RESERVED(0) " );
--        }
--
--        if ( isFlagSet( TicketFlag.FORWARDABLE ) )
--        {
--            result.append( "FORWARDABLE(1) " );
--        }
--
--        if ( isFlagSet( TicketFlag.FORWARDED ) )
--        {
--            result.append( "FORWARDED(2) " );
--        }
--
--        if ( isFlagSet( TicketFlag.PROXIABLE ) )
--        {
--            result.append( "PROXIABLE(3) " );
--        }
--
--        if ( isFlagSet( TicketFlag.PROXY ) )
--        {
--            result.append( "PROXY(4) " );
--        }
--
--        if ( isFlagSet( TicketFlag.MAY_POSTDATE ) )
--        {
--            result.append( "MAY_POSTDATE(5) " );
--        }
--
--        if ( isFlagSet( TicketFlag.POSTDATED ) )
--        {
--            result.append( "POSTDATED(6) " );
--        }
--
--        if ( isFlagSet( TicketFlag.INVALID ) )
--        {
--            result.append( "INVALID(7) " );
--        }
--
--        if ( isFlagSet( TicketFlag.RENEWABLE ) )
--        {
--            result.append( "RENEWABLE(8) " );
--        }
--
--        if ( isFlagSet( TicketFlag.INITIAL ) )
--        {
--            result.append( "INITIAL(9) " );
--        }
--
--        if ( isFlagSet( TicketFlag.PRE_AUTHENT ) )
--        {
--            result.append( "PRE_AUTHENT(10) " );
--        }
--
--        if ( isFlagSet( TicketFlag.HW_AUTHENT ) )
--        {
--            result.append( "HW_AUTHENT(11) " );
--        }
--
--        if ( isFlagSet( TicketFlag.TRANSITED_POLICY_CHECKED ) )
--        {
--            result.append( "TRANSITED_POLICY_CHECKED(12) " );
--        }
--
--        if ( isFlagSet( TicketFlag.OK_AS_DELEGATE ) )
--        {
--            result.append( "OK_AS_DELEGATE(13) " );
--        }
--
--        return result.toString().trim();
--    }
--}
diff --cc kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KerberosMessage.java
index bc97503239,bc97503239..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KerberosMessage.java
+++ /dev/null
@@@ -1,106 -1,106 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.messages;
--
--
--import org.apache.directory.api.asn1.Asn1Object;
--import org.apache.directory.shared.kerberos.KerberosConstants;
--import org.apache.directory.shared.kerberos.KerberosMessageType;
--
--
--/**
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public abstract class KerberosMessage implements Asn1Object
--{
--    /** The protocol version (should be 5) */
--    private int protocolVersionNumber = KerberosConstants.KERBEROS_V5;
--
--    /** The message type */
--    private KerberosMessageType messageType;
--
--
--    /**
--     * Creates a new instance of KerberosMessage.
--     *
--     * @param type The message type
--     */
--    public KerberosMessage( KerberosMessageType type )
--    {
--        this( KerberosConstants.KERBEROS_V5, type );
--    }
--
--
--    /**
--     * Creates a new instance of KerberosMessage.
--     *
--     * @param versionNumber
--     * @param type
--     */
--    public KerberosMessage( int versionNumber, KerberosMessageType type )
--    {
--        protocolVersionNumber = versionNumber;
--        messageType = type;
--    }
--
--
--    /**
--     * Returns the {@link KerberosMessageType}.
--     *
--     * @return The {@link KerberosMessageType}.
--     */
--    public KerberosMessageType getMessageType()
--    {
--        return messageType;
--    }
--
--
--    /**
--     * Sets the {@link KerberosMessageType}.
--     *
--     * @param type
--     */
--    public void setMessageType( KerberosMessageType type )
--    {
--        messageType = type;
--    }
--
--
--    /**
--     * Returns the protocol version number.
--     *
--     * @return The protocol version number.
--     */
--    public int getProtocolVersionNumber()
--    {
--        return protocolVersionNumber;
--    }
--
--
--    /**
--     * Sets the protocol version number.
--     *
--     * @param versionNumber
--     */
--    public void setProtocolVersionNumber( int versionNumber )
--    {
--        protocolVersionNumber = versionNumber;
--    }
--}
diff --cc kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java
index d4565008d6,d4565008d6..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java
+++ /dev/null
@@@ -1,106 -1,106 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.server.kerberos.shared.messages.value;
--
--
--import static org.junit.jupiter.api.Assertions.assertTrue;
--
--import java.nio.ByteBuffer;
--import java.util.Arrays;
--
--import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
--import org.apache.directory.shared.kerberos.components.AuthorizationData;
--import org.apache.directory.shared.kerberos.components.AuthorizationDataEntry;
--import org.junit.jupiter.api.Test;
--
--
--/**
-- * Test the AuthorizationData encoding and decoding
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class AuthorizationDataTest
--{
--    @Test
--    public void testAuthorizationDataOneAD() throws Exception
--    {
--        AuthorizationData ad = new AuthorizationData();
--        ad.addEntry( new AuthorizationDataEntry( AuthorizationType.AD_KDC_ISSUED, new byte[]
--            { 0x01, 0x02, 0x03, 0x04 } ) );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ad.computeLength() );
--
--        ad.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x0F,
--                0x30, 0x0d,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x04,
--                ( byte ) 0xA1, 0x06,
--                0x04, 0x04, 0x01, 0x02, 0x03, 0x04
--        };
--
--        assertTrue( Arrays.equals( expectedResult, encoded.array() ) );
--    }
--
--
--    @Test
--    public void testAuthorizationDataThreeAD() throws Exception
--    {
--        AuthorizationData ad = new AuthorizationData();
--        ad.addEntry( new AuthorizationDataEntry( AuthorizationType.AD_KDC_ISSUED, new byte[]
--            { 0x01, 0x02, 0x03, 0x04 } ) );
--        ad.addEntry( new AuthorizationDataEntry( AuthorizationType.AD_IF_RELEVANT, new byte[]
--            { 0x05, 0x06, 0x07, 0x08 } ) );
--        ad.addEntry( new AuthorizationDataEntry( AuthorizationType.AD_MANDATORY_TICKET_EXTENSIONS, new byte[]
--            { 0x09, 0x0A, 0x0B, 0x0C } ) );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ad.computeLength() );
--
--        ad.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x2D,
--                0x30, 0x0d,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x04,
--                ( byte ) 0xA1, 0x06,
--                0x04, 0x04,
--                0x01, 0x02, 0x03, 0x04,
--                0x30, 0x0d,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x01,
--                ( byte ) 0xA1, 0x06,
--                0x04, 0x04,
--                0x05, 0x06, 0x07, 0x08,
--                0x30, 0x0d,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x06,
--                ( byte ) 0xA1, 0x06,
--                0x04, 0x04,
--                0x09, 0x0A, 0x0B, 0x0C
--        };
--
--        assertTrue( Arrays.equals( expectedResult, encoded.array() ) );
--    }
--}
diff --cc kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java
index f4dd358d25,f4dd358d25..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java
+++ /dev/null
@@@ -1,134 -1,134 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.server.kerberos.shared.messages.value;
--
--
--import static org.junit.jupiter.api.Assertions.assertEquals;
--import static org.junit.jupiter.api.Assertions.assertTrue;
--
--import java.nio.ByteBuffer;
--import java.util.Arrays;
--
--import org.apache.directory.api.util.Strings;
--import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
--import org.apache.directory.shared.kerberos.components.EncryptedData;
--import org.junit.jupiter.api.Test;
--
--
--/**
-- * Test the EncryptedData encoding and decoding
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class EncryptedDataTest
--{
--    @Test
--    public void testEncodingEncryptedData() throws Exception
--    {
--        EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, 1, new byte[]
--            { 0x01, 0x02, 0x03, 0x04 } );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ed.computeLength() );
--
--        ed.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x12,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x11,
--                ( byte ) 0xA1, 0x03,
--                0x02, 0x01, 0x01,
--                ( byte ) 0xA2, 0x06,
--                0x04, 0x04, 0x01, 0x02, 0x03, 0x04
--        };
--
--        assertEquals( Strings.dumpBytes( expectedResult ), Strings.dumpBytes( encoded.array() ) );
--    }
--
--
--    @Test
--    public void testEncodingEncryptedDataNullCipher() throws Exception
--    {
--        EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, 1, null );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ed.computeLength() );
--
--        ed.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x0E,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x11,
--                ( byte ) 0xA1, 0x03,
--                0x02, 0x01, 0x01,
--                ( byte ) 0xA2, 0x02,
--                0x04, 0x00
--        };
--
--        assertTrue( Arrays.equals( expectedResult, encoded.array() ) );
--    }
--
--
--    @Test
--    public void testEncodingEncryptedDataNoKvno() throws Exception
--    {
--        EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, new byte[]
--            { 0x01, 0x02, 0x03, 0x04 } );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ed.computeLength() );
--
--        ed.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x0D,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x11,
--                ( byte ) 0xA2, 0x06,
--                0x04, 0x04, 0x01, 0x02, 0x03, 0x04
--        };
--
--        assertTrue( Arrays.equals( expectedResult, encoded.array() ) );
--    }
--
--
--    @Test
--    public void testEncodingEncryptedDataNoKvnoNullCipher() throws Exception
--    {
--        EncryptedData ed = new EncryptedData( EncryptionType.AES128_CTS_HMAC_SHA1_96, null );
--
--        ByteBuffer encoded = ByteBuffer.allocate( ed.computeLength() );
--
--        ed.encode( encoded );
--
--        byte[] expectedResult = new byte[]
--            {
--                0x30, 0x09,
--                ( byte ) 0xA0, 0x03,
--                0x02, 0x01, 0x11,
--                ( byte ) 0xA2, 0x02,
--                0x04, 0x00
--        };
--
--        assertTrue( Arrays.equals( expectedResult, encoded.array() ) );
--    }
--}
diff --cc kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlagsTest.java
index 6573622810,6573622810..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlagsTest.java
+++ /dev/null
@@@ -1,160 -1,160 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License.
-- *
-- */
--package org.apache.directory.server.kerberos.shared.messages.value.flags;
--
--
--import static org.junit.jupiter.api.Assertions.assertEquals;
--import static org.junit.jupiter.api.Assertions.assertFalse;
--import static org.junit.jupiter.api.Assertions.assertTrue;
--
--import org.apache.directory.shared.kerberos.flags.AbstractKerberosFlags;
--import org.apache.directory.shared.kerberos.flags.TicketFlag;
--import org.junit.jupiter.api.Test;
--
--
--
--/**
-- * Test for AbstractKerberosFlags
-- *
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class AbstractKerberosFlagsTest
--{
--    @Test
--    public void testClearFlag() throws Exception
--    {
--        // Flags 1, 2, 4, 8 set
--        AbstractKerberosFlags akf = new AbstractKerberosFlags(
--            ( 1 << ( 31 - TicketFlag.FORWARDABLE.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.FORWARDED.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.PROXY.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.RENEWABLE.getValue() ) ) )
--        {
--        };
--
--        // unset flag 4
--        akf.clearFlag( TicketFlag.PROXY );
--        assertEquals(
--            (
--            ( 1 << ( 31 - TicketFlag.FORWARDABLE.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.FORWARDED.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.RENEWABLE.getValue() ) ) ),
--            akf.getIntValue(),
--            "clear(KerberosFlag)" );
--
--        // unset flag 2
--        akf.clearFlag( TicketFlag.FORWARDED.getValue() );
--        assertEquals(
--            ( ( 1 << ( 31 - TicketFlag.FORWARDABLE.getValue() ) )
--            + ( 1 << ( 31 - TicketFlag.RENEWABLE.getValue() ) ) ), akf.getIntValue(),
--            "clear(KerberosFlag)" );
--    }
--
--
--    @Test
--    public void testValue() throws Exception
--    {
--        // Flags 1, 2, 4, 8 set
--        AbstractKerberosFlags akfIntConstructor = new AbstractKerberosFlags(
--            ( ( 1 << ( 31 - TicketFlag.FORWARDABLE.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.FORWARDED.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.PROXY.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.RENEWABLE.getValue() ) ) ) )
--        {
--        };
--
--        // No flags set
--        AbstractKerberosFlags akfEmptyConstructor = new AbstractKerberosFlags()
--        {
--        };
--
--        assertEquals( 0, akfEmptyConstructor.getIntValue(), "intValue" );
--        assertEquals(
--            ( ( 1 << ( 31 - TicketFlag.FORWARDABLE.getValue() ) ) )
--                + ( 1 << ( 31 - TicketFlag.FORWARDED.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.PROXY.getValue() ) )
--                + ( 1 << ( 31 - TicketFlag.RENEWABLE.getValue() ) ), akfIntConstructor.getIntValue(),
--                "intValue" );
--    }
--
--
--    @Test
--    public void testFlagGetterSetter() throws Exception
--    {
--        AbstractKerberosFlags akf = new AbstractKerberosFlags()
--        {
--        };
--
--        // MAX_VALUE is not a real ticket flag and will cause an IndexOutOfBoundsException,
--        // so skip this
--        TicketFlag[] ticketFlags = new TicketFlag[TicketFlag.values().length - 1];
--        int i = 0;
--        int flagsValue = 0;
--
--        for ( TicketFlag tf : TicketFlag.values() )
--        {
--            if ( tf != TicketFlag.MAX_VALUE )
--            {
--                ticketFlags[i] = tf;
--            }
--
--            i++;
--        }
--
--        boolean setFlag = true;
--
--        for ( TicketFlag ticketFlag : ticketFlags )
--        {
--            // Only set every 2nd ticket flag
--            if ( setFlag )
--            {
--                akf.setFlag( ticketFlag.getValue() );
--                flagsValue += ( 1 << ( 31 - ticketFlag.getValue() ) );
--            }
--
--            setFlag = !setFlag;
--        }
--
--        setFlag = true;
--
--        for ( TicketFlag ticketFlag : ticketFlags )
--        {
--            // Only every 2nd ticket flag is set
--            if ( setFlag )
--            {
--                assertTrue( akf.isFlagSet( ticketFlag ), "isFlagSet(TicketFlag): " + ticketFlag.toString() );
--                assertTrue( akf.isFlagSet( ticketFlag.getValue() ), "isFlagSet(int): " + ticketFlag.toString() );
--                assertTrue( 
--                    AbstractKerberosFlags.isFlagSet( flagsValue, ticketFlag.getValue() ),
--                    "isFlagSet(int,int): " + ticketFlag.toString() );
--            }
--            else
--            {
--                assertFalse( akf.isFlagSet( ticketFlag ), "isFlagSet(TicketFlag): " + ticketFlag.toString() );
--                assertFalse( akf.isFlagSet( ticketFlag.getValue() ), "isFlagSet(int): " + ticketFlag.toString() );
--                assertFalse( 
--                    AbstractKerberosFlags.isFlagSet( flagsValue, ticketFlag.getValue() ),
--                    "isFlagSet(int,int): " + ticketFlag.toString() );
--            }
--
--            setFlag = !setFlag;
--        }
--    }
--}
diff --cc kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlagsTest.java
index 0408b34a1f,0408b34a1f..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlagsTest.java
+++ /dev/null
@@@ -1,206 -1,206 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.server.kerberos.shared.messages.value.flags;
--
--
--import static org.junit.jupiter.api.Assertions.assertEquals;
--import static org.junit.jupiter.api.Assertions.assertFalse;
--import static org.junit.jupiter.api.Assertions.assertTrue;
--
--import org.apache.directory.shared.kerberos.flags.TicketFlag;
--import org.apache.directory.shared.kerberos.flags.TicketFlags;
--import org.junit.jupiter.api.Test;
--
--
--/**
-- * Test for TicketFlags
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class TicketFlagsTest
--{
--
--    @Test
--    public void testEmptyConstructor() throws Exception
--    {
--        TicketFlags tf = new TicketFlags();
--        for ( TicketFlag t : TicketFlag.values() )
--        {
--            if ( !t.equals( TicketFlags.MAX_SIZE ) )
--            {
--                assertFalse( tf.isFlagSet( t ) );
--            }
--        }
--        assertFalse( tf.isForwardable() );
--        assertFalse( tf.isForwarded() );
--        assertFalse( tf.isHwAuthent() );
--        assertFalse( tf.isInitial() );
--        assertFalse( tf.isInvalid() );
--        assertFalse( tf.isMayPosdate() );
--        assertFalse( tf.isOkAsDelegate() );
--        assertFalse( tf.isPostdated() );
--        assertFalse( tf.isPreAuth() );
--        assertFalse( tf.isProxiable() );
--        assertFalse( tf.isProxy() );
--        assertFalse( tf.isRenewable() );
--        assertFalse( tf.isReserved() );
--        assertFalse( tf.isTransitedPolicyChecked() );
--    }
--
--
--    @Test
--    public void testGivenIntConstructor() throws Exception
--    {
--        // Flags 1, 2, 4, 8 set
--        TicketFlags tf = new TicketFlags( ( int ) ( Math.pow( 2, 31 - 1 ) + Math.pow( 2, 31 - 2 )
--            + Math.pow( 2, 31 - 4 ) + Math.pow(
--            2, 31 - 8 ) ) );
--        assertFalse( tf.isReserved() ); // 0
--        assertTrue( tf.isForwardable() ); // 1
--        assertTrue( tf.isForwarded() ); // 2
--        assertFalse( tf.isProxiable() ); // 3
--        assertTrue( tf.isProxy() ); // 4
--        assertFalse( tf.isMayPosdate() ); // 5
--        assertFalse( tf.isPostdated() ); // 6
--        assertFalse( tf.isInvalid() ); // 7
--        assertTrue( tf.isRenewable() ); // 8
--        assertFalse( tf.isInitial() ); // 9
--        assertFalse( tf.isPreAuth() ); // 10
--        assertFalse( tf.isHwAuthent() ); // 11
--        assertFalse( tf.isTransitedPolicyChecked() ); // 12
--        assertFalse( tf.isOkAsDelegate() ); // 13
--    }
--
--
--    @Test
--    public void testGivenByteArrayConstructor() throws Exception
--    {
--        // Flags 1, 2, 4, 8 set
--        TicketFlags tf = new TicketFlags(
--            getBytes( ( int ) ( ( 1 << ( 31 - 1 ) ) |
--                ( 1 << ( 31 - 2 ) ) |
--                ( 1 << ( 31 - 4 ) ) |
--            ( 1 << 31 - 8 ) ) ) );
--        assertFalse( tf.isReserved() ); // 0
--        assertTrue( tf.isForwardable() ); // 1
--        assertTrue( tf.isForwarded() ); // 2
--        assertFalse( tf.isProxiable() ); // 3
--        assertTrue( tf.isProxy() ); // 4
--        assertFalse( tf.isMayPosdate() ); // 5
--        assertFalse( tf.isPostdated() ); // 6
--        assertFalse( tf.isInvalid() ); // 7
--        assertTrue( tf.isRenewable() ); // 8
--        assertFalse( tf.isInitial() ); // 9
--        assertFalse( tf.isPreAuth() ); // 10
--        assertFalse( tf.isHwAuthent() ); // 11
--        assertFalse( tf.isTransitedPolicyChecked() ); // 12
--        assertFalse( tf.isOkAsDelegate() ); // 13
--
--    }
--
--
--    @Test
--    public void testSetFlag() throws Exception
--    {
--        TicketFlags tf = new TicketFlags();
--
--        for ( TicketFlag t : TicketFlag.values() )
--        {
--            if ( !t.equals( TicketFlag.MAX_VALUE ) )
--            {
--                tf.setFlag( t );
--            }
--        }
--
--        assertTrue( tf.isReserved() ); // 0
--        assertTrue( tf.isForwardable() ); // 1
--        assertTrue( tf.isForwarded() ); // 2
--        assertTrue( tf.isProxiable() ); // 3
--        assertTrue( tf.isProxy() ); // 4
--        assertTrue( tf.isMayPosdate() ); // 5
--        assertTrue( tf.isPostdated() ); // 6
--        assertTrue( tf.isInvalid() ); // 7
--        assertTrue( tf.isRenewable() ); // 8
--        assertTrue( tf.isInitial() ); // 9
--        assertTrue( tf.isPreAuth() ); // 10
--        assertTrue( tf.isHwAuthent() ); // 11
--        assertTrue( tf.isTransitedPolicyChecked() ); // 12
--        assertTrue( tf.isOkAsDelegate() ); // 13
--    }
--
--
--    /**
--     * Tests converting the ticket flags to a descriptive String.
--     */
--    @Test
--    public void testToString() throws Exception
--    {
--        TicketFlags tf = new TicketFlags();
--        assertEquals( "", tf.toString(), "toString()" );
--
--        int i = 0;
--        for ( TicketFlag t : TicketFlag.values() )
--        {
--            if ( t != TicketFlag.MAX_VALUE )
--            {
--                i |= 1 << ( 31 - t.getValue() );
--            }
--        }
--
--        tf = new TicketFlags( i );
--        assertEquals( "RESERVED(0) FORWARDABLE(1) FORWARDED(2) PROXIABLE(3) PROXY(4) "
--            + "MAY_POSTDATE(5) POSTDATED(6) INVALID(7) RENEWABLE(8) INITIAL(9) PRE_AUTHENT(10) "
--            + "HW_AUTHENT(11) TRANSITED_POLICY_CHECKED(12) OK_AS_DELEGATE(13)", tf.toString(), "toString()" );
--    }
--
--
--    /**
--     * Tests that setting flags is idempotent.
--     */
--    @Test
--    public void testDuplicateSetting()
--    {
--        TicketFlags flags = new TicketFlags();
--        flags.setFlag( TicketFlag.MAY_POSTDATE );
--        flags.setFlag( TicketFlag.FORWARDABLE );
--        flags.setFlag( TicketFlag.PROXIABLE );
--        flags.setFlag( TicketFlag.MAY_POSTDATE );
--        flags.setFlag( TicketFlag.RENEWABLE );
--        assertEquals( "FORWARDABLE(1) PROXIABLE(3) MAY_POSTDATE(5) RENEWABLE(8)", flags.toString() );
--    }
--
--
--    /**
--     * 
--     * Get the byte array representation of an int
--     *
--     * @param flags The flags as int
--     * @return The Flags as byte array
--     */
--    private byte[] getBytes( int flags )
--    {
--        return new byte[]
--            { 0x00,
--                ( byte ) ( flags >>> 24 ),
--                ( byte ) ( ( flags >> 16 ) & 0x00ff ),
--                ( byte ) ( ( flags >> 8 ) & 0x00ff ),
--                ( byte ) ( flags & 0x00ff ) };
--    }
--}
diff --cc kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/flags/TicketFlagsTest.java
index 0906361419,0906361419..0000000000
deleted file mode 100644,100644
--- a/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/flags/TicketFlagsTest.java
+++ /dev/null
@@@ -1,68 -1,68 +1,0 @@@
--/*
-- *  Licensed to the Apache Software Foundation (ASF) under one
-- *  or more contributor license agreements.  See the NOTICE file
-- *  distributed with this work for additional information
-- *  regarding copyright ownership.  The ASF licenses this file
-- *  to you under the Apache License, Version 2.0 (the
-- *  "License"); you may not use this file except in compliance
-- *  with the License.  You may obtain a copy of the License at
-- *  
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *  
-- *  Unless required by applicable law or agreed to in writing,
-- *  software distributed under the License is distributed on an
-- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- *  KIND, either express or implied.  See the License for the
-- *  specific language governing permissions and limitations
-- *  under the License. 
-- *  
-- */
--package org.apache.directory.shared.kerberos.codec.flags;
--
--
--import static org.junit.jupiter.api.Assertions.assertEquals;
--import static org.junit.jupiter.api.Assertions.assertFalse;
--import static org.junit.jupiter.api.Assertions.assertTrue;
--
--import java.util.Arrays;
--
--import org.apache.directory.shared.kerberos.flags.TicketFlag;
--import org.apache.directory.shared.kerberos.flags.TicketFlags;
--import org.junit.jupiter.api.Test;
--
--
--/**
-- * A clss used to test the TicketFlags class
-- * 
-- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-- */
--public class TicketFlagsTest
--{
--    @Test
--    public void testTicketFlags()
--    {
--        TicketFlags flags = new TicketFlags();
--
--        assertFalse( flags.isForwardable() );
--        flags.setFlag( TicketFlag.FORWARDABLE );
--
--        assertTrue( flags.isForwardable() );
--        assertTrue( flags.toString().startsWith( TicketFlag.FORWARDABLE.toString() ) );
--
--        assertFalse( flags.isRenewable() );
--        flags.setFlag( TicketFlag.RENEWABLE );
--        assertTrue( flags.isRenewable() );
--        assertTrue( flags.isForwardable() );
--
--        int flagValue = flags.getIntValue();
--        assertEquals( 0x40800000, flagValue );
--
--        flags.clearFlag( TicketFlag.FORWARDABLE );
--        assertTrue( flags.isRenewable() );
--        assertFalse( flags.isForwardable() );
--
--        byte[] bytes = flags.getData();
--        assertTrue( Arrays.equals( new byte[]
--            { 0x00, 0x00, ( byte ) 0x80, 0x00, 0x00 }, bytes ) );
--    }
--}