directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1039048 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart: ./ actions/
Date Thu, 25 Nov 2010 14:06:56 GMT
Author: elecharny
Date: Thu Nov 25 14:06:56 2010
New Revision: 1039048

URL: http://svn.apache.org/viewvc?rev=1039048&view=rev
Log:
Added the EncKdcRepPart grammar

Added:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartContainer.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartContainer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartContainer.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartContainer.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartContainer.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,67 @@
+/*
+ *  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.EncKdcRepPart;
+
+import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.kerberos.components.EncKdcRepPart;
+
+
+/**
+ * The EncKdcRepPart container stores the EncKdcRepPart decoded by the Asn1Decoder.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EncKdcRepPartContainer extends AbstractContainer
+{
+    /** An EncKdcRepPart container */
+    private EncKdcRepPart encKdcRepPart;
+    
+    /**
+     * Creates a new EncKdcRepPartContainer object.
+     */
+    public EncKdcRepPartContainer()
+    {
+        super();
+        this.stateStack = new int[1];
+        this.grammar = EncKdcRepPartGrammar.getInstance();
+        setTransition( EncKdcRepPartStatesEnum.START_STATE );
+    }
+
+
+    /**
+     * @return Returns the EncKdcRepPart.
+     */
+    public EncKdcRepPart getEncKdcRepPart()
+    {
+        return encKdcRepPart;
+    }
+
+    
+    /**
+     * Set a EncKdcRepPart Object into the container. It will be completed by the
+     * KerberosDecoder.
+     * 
+     * @param encKdcRepPart The EncKdcRepPart to set.
+     */
+    public void setEncKdcRepPart( EncKdcRepPart encKdcRepPart )
+    {
+        this.encKdcRepPart = encKdcRepPart;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,327 @@
+/*
+ *  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.EncKdcRepPart;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
+import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
+import org.apache.directory.shared.kerberos.KerberosConstants;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.EncKdcRepPartInit;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreAuthTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreCAddr;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreEndTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreFlags;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreKey;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreKeyExpiration;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreLastReq;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreNonce;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreRenewTill;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreSName;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreSRealm;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.actions.StoreStartTime;
+import org.apache.directory.shared.kerberos.codec.actions.CheckNotNullLength;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class implements the EncKdcRepPart structure. 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 EncKdcRepPartGrammar extends AbstractGrammar
+{
+    /** The logger */
+    static final Logger LOG = LoggerFactory.getLogger( EncKdcRepPartGrammar.class );
+
+    /** A speedup for logger */
+    static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+    /** The instance of grammar. EncKdcRepPartGrammar is a singleton */
+    private static Grammar instance = new EncKdcRepPartGrammar();
+
+
+    /**
+     * Creates a new EncKdcRepPartGrammar object.
+     */
+    private EncKdcRepPartGrammar()
+    {
+        setName( EncKdcRepPartGrammar.class.getName() );
+
+        // Create the transitions table
+        super.transitions = new GrammarTransition[EncKdcRepPartStatesEnum.LAST_ENC_KDC_REP_PART_STATE.ordinal()][256];
+
+        // ============================================================================================
+        // EncKdcRepPart 
+        // ============================================================================================
+        // --------------------------------------------------------------------------------------------
+        // Transition from EncKdcRepPart init to EncKdcRepPart tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        super.transitions[EncKdcRepPartStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.START_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
+            new EncKdcRepPartInit() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from EncKdcRepPart tag to key
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         key             [0] EncryptionKey,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_KEY_TAG,
+            new StoreKey() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from key to last-req
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         last-req        [1] LastReq,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG,
+            new StoreLastReq() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from last-req to nonce tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         nonce           [2]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from nonce tag to nonce value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         nonce           [2] UInt32,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, UniversalTag.INTEGER.getValue(),
+            new StoreNonce() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from nonce value to key-expiration tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         key-expiration  [3]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from nonce value to flags tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         flags           [4]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from key-expiration tag to key-expiration value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         key-expiration  [3] KerberosTime OPTIONAL,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreKeyExpiration() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from key-expiration value to flags tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         flags           [4]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from flags tag to flags value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         flags           [4] TicketFlags,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE.ordinal()][UniversalTag.BIT_STRING.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE, UniversalTag.BIT_STRING.getValue(),
+            new StoreFlags() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from flags value to authtime tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         authtime        [5]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from authtime tag to authtime value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         authtime        [5] KerberosTime,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreAuthTime() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from authtime value to starttime tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         starttime       [6]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from authtime value to endtime tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         endtime         [7] 
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from starttime tag to starttime value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         starttime       [6] KerberosTime OPTIONAL,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreStartTime() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from starttime value to endtime tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         endtime         [7] 
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from endtime tag to endtime value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         endtime         [7] KerberosTime,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreEndTime() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from endtime value to renew-till tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         renew-till      [8] 
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from endtime value to srealm tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         srealm          [9]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from renew-till tag to renew-till value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         renew-till      [8] KerberosTime OPTIONAL,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreRenewTill() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from renew-till value to srealm tag
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         srealm          [9]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from srealm tag to srealm value
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         srealm          [9] Realm,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE, UniversalTag.GENERAL_STRING.getValue(),
+            new StoreSRealm() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from srealm value to sname
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         sname           [10] PrincipalName,
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG,
+            new StoreSName() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from sname to caddr
+        // --------------------------------------------------------------------------------------------
+        // EncKDCRepPart   ::= SEQUENCE {
+        //         ...
+        //         caddr           [11] <HostAddresses> OPTIONAL
+        // }
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG] = new GrammarTransition(
+            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_CADDR_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG,
+            new StoreCAddr() );
+    }
+
+
+    /**
+     * Get the instance of this grammar
+     * 
+     * @return An instance on the EncKdcRepPart Grammar
+     */
+    public static Grammar getInstance()
+    {
+        return instance;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,138 @@
+/*
+ *  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.EncKdcRepPart;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.States;
+import org.apache.directory.shared.kerberos.codec.KerberosMessageGrammar;
+
+
+/**
+ * This class stores the EncKdcRepPart grammar's constants. It is also used for debugging
+ * purpose
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum EncKdcRepPartStatesEnum implements States
+{
+    // Start
+    START_STATE,                                // 0
+    
+    // ----- EncKdcRepPart component --------------------------------------
+    
+    ENC_KDC_REP_PART_SEQ_TAG_STATE,             // 1
+    
+    ENC_KDC_REP_PART_KEY_TAG_STATE,             // 2
+    
+    ENC_KDC_REP_PART_LAST_REQ_TAG_STATE,        // 3
+
+    ENC_KDC_REP_PART_NONCE_TAG_STATE,           // 4
+    ENC_KDC_REP_PART_NONCE_STATE,               // 5
+
+    ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE,  // 6
+    ENC_KDC_REP_PART_KEY_EXPIRATION_STATE,      // 7
+
+    ENC_KDC_REP_PART_FLAGS_TAG_STATE,           // 8
+    ENC_KDC_REP_PART_FLAGS_STATE,               // 9
+
+    ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE,       // 10
+    ENC_KDC_REP_PART_AUTH_TIME_STATE,           // 11
+
+    ENC_KDC_REP_PART_START_TIME_TAG_STATE,      // 12
+    ENC_KDC_REP_PART_START_TIME_STATE,          // 13
+
+    ENC_KDC_REP_PART_END_TIME_TAG_STATE,        // 14
+    ENC_KDC_REP_PART_END_TIME_STATE,            // 15
+
+    ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE,      // 16
+    ENC_KDC_REP_PART_RENEW_TILL_STATE,          // 17
+
+    ENC_KDC_REP_PART_SREALM_TAG_STATE,          // 18
+    ENC_KDC_REP_PART_SREALM_STATE,              // 19
+
+    ENC_KDC_REP_PART_SNAME_TAG_STATE,           // 20
+
+    ENC_KDC_REP_PART_CADDR_TAG_STATE,           // 21
+    
+    // End
+    LAST_ENC_KDC_REP_PART_STATE;                // 22
+
+    
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar code
+     * @return The grammar name
+     */
+    public String getGrammarName( int grammar )
+    {
+        return "ENC_KDC_REP_PART_GRAMMAR";
+    }
+
+
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar class
+     * @return The grammar name
+     */
+    public String getGrammarName( Grammar grammar )
+    {
+        if ( grammar instanceof KerberosMessageGrammar )
+        {
+            return "ENC_KDC_REP_PART_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_ENC_KDC_REP_PART_STATE.ordinal() ) ? "LAST_ENC_KDC_REP_PART_STATE" : name() );
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEndState()
+    {
+        return this == LAST_ENC_KDC_REP_PART_STATE;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public EncKdcRepPartStatesEnum getStartState()
+    {
+        return START_STATE;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,83 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.components.EncKdcRepPart;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the EncKdcRepPart object
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EncKdcRepPartInit extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( EncKdcRepPart.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new EncKdcRepPartInit action.
+     */
+    public EncKdcRepPartInit()
+    {
+        super( "Creates a EncKdcRepPart instance" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( Asn1Container container ) throws DecoderException
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+
+        TLV tlv = encKdcRepPartContainer.getCurrentTLV();
+
+        // The Length should not be null
+        if ( tlv.getLength() == 0 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+        
+        EncKdcRepPart encKdcRepPart = new EncKdcRepPart();
+        encKdcRepPartContainer.setEncKdcRepPart( encKdcRepPart );
+        
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "EncKdcRepPart created" );
+        }
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
+
+
+/**
+ * The action used to store the EncKdcRepPart auth time
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreAuthTime extends AbstractReadKerberosTime
+{
+
+    /**
+     * Instantiates a new StoreAuthTime action.
+     */
+    public StoreAuthTime()
+    {
+        super( "EncKdcRepPart auth time" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setAuthTime( krbtime );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,56 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddresses;
+import org.apache.directory.shared.kerberos.components.HostAddresses;
+
+
+/**
+ * The action used to store the caddr of EncKdcRepPart
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreCAddr extends AbstractReadHostAddresses
+{
+
+    /**
+     * Instantiates a new StoreAddresses action.
+     */
+    public StoreCAddr()
+    {
+        super( "EncKdcRepPart caddr" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setHostAddresses( HostAddresses hostAddresses, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setClientAddresses( hostAddresses );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
+
+
+/**
+ * The action used to store the EncKdcRepPart end time
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreEndTime extends AbstractReadKerberosTime
+{
+
+    /**
+     * Instantiates a new StoreEndTime action.
+     */
+    public StoreEndTime()
+    {
+        super( "EncKdcRepPart end time" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setEndTime( krbtime );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,86 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.components.EncKdcRepPart;
+import org.apache.directory.shared.kerberos.flags.TicketFlags;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the TicketFlags
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreFlags extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( StoreFlags.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new StoreFlagss action.
+     */
+    public StoreFlags()
+    {
+        super( "Stores the flags" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( Asn1Container container ) throws DecoderException
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+
+        TLV tlv = encKdcRepPartContainer.getCurrentTLV();
+
+        // The Length should not be null, and should be 5
+        if ( tlv.getLength() != 5 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+        
+        EncKdcRepPart encKdcRepPart = encKdcRepPartContainer.getEncKdcRepPart();
+        TicketFlags flags = new TicketFlags( tlv.getValue().getData() );
+        
+        encKdcRepPart.setFlags( flags );
+        
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "TicketFlags : {}", flags );
+        }
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadEncryptionKey;
+import org.apache.directory.shared.kerberos.components.EncryptionKey;
+
+
+/**
+ * The action used to set the EncKdcRepPart key
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreKey extends AbstractReadEncryptionKey
+{
+
+    /**
+     * Instantiates a new StoreKey action.
+     */
+    public StoreKey()
+    {
+        super( "EncKdcRepPart key" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setEncryptionKey( EncryptionKey encryptionKey, Asn1Container container )
+    {
+        EncKdcRepPartContainer EncKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        EncKdcRepPartContainer.getEncKdcRepPart().setKey( encryptionKey );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
+
+
+/**
+ * The action used to store the EncKdcRepPart key expiration
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreKeyExpiration extends AbstractReadKerberosTime
+{
+
+    /**
+     * Instantiates a new StoreKeyExpiration action.
+     */
+    public StoreKeyExpiration()
+    {
+        super( "EncKdcRepPart key expiration" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setKeyExpiration( krbtime );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,105 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.lastReq.LastReqContainer;
+import org.apache.directory.shared.kerberos.components.LastReq;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to set the LastReq
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreLastReq extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( StoreLastReq.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new StoreLastReq action.
+     */
+    public StoreLastReq()
+    {
+        super( "Store the EncKDCRepPart LastReq" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public final void action( Asn1Container container ) throws DecoderException
+    {
+        TLV tlv = container.getCurrentTLV();
+
+        // The Length should not be null
+        if ( tlv.getLength() == 0 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+
+        // Now, let's decode the LastReq
+        Asn1Decoder lastReqDecoder = new Asn1Decoder();
+
+        LastReqContainer lastReqContainer = new LastReqContainer();
+
+        // Decode the LastReq PDU
+        try
+        {
+            lastReqDecoder.decode( container.getStream(), lastReqContainer );
+        }
+        catch ( DecoderException de )
+        {
+            throw de;
+        }
+
+        LastReq lastReq = lastReqContainer.getLastReq();
+
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "LastReq : " + lastReq );
+        }
+
+        ((EncKdcRepPartContainer)container).getEncKdcRepPart().setLastReq( lastReq );
+        
+        // Update the expected length for the current TLV
+        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
+
+        // Update the parent
+        container.updateParent();
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,53 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadInteger;
+
+
+/**
+ * The action used to store the Nonce
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreNonce extends AbstractReadInteger
+{
+    /**
+     * Instantiates a new StoreNonce action.
+     */
+    public StoreNonce()
+    {
+        super( "EncKdcRepPart nonce" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setIntegerValue( int value, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+
+        encKdcRepPartContainer.getEncKdcRepPart().setNonce( value );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
+
+
+/**
+ * The action used to store the EncKdcRepPart renew till
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreRenewTill extends AbstractReadKerberosTime
+{
+
+    /**
+     * Instantiates a new StoreRenewTill action.
+     */
+    public StoreRenewTill()
+    {
+        super( "EncKdcRepPart renew till" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setRenewTill( krbtime );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,109 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.principalName.PrincipalNameContainer;
+import org.apache.directory.shared.kerberos.components.EncKdcRepPart;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the SName
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSName extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( StoreSName.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new StoreSName action.
+     */
+    public StoreSName()
+    {
+        super( "Stores the SName" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( Asn1Container container ) throws DecoderException
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+
+        TLV tlv = encKdcRepPartContainer.getCurrentTLV();
+
+        // The Length should not be null
+        if ( tlv.getLength() == 0 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+        
+        // Now, let's decode the PrincipalName
+        Asn1Decoder principalNameDecoder = new Asn1Decoder();
+        
+        PrincipalNameContainer principalNameContainer = new PrincipalNameContainer();
+
+        // Decode the PrincipalName PDU
+        try
+        {
+            principalNameDecoder.decode( container.getStream(), principalNameContainer );
+        }
+        catch ( DecoderException de )
+        {
+            throw de;
+        }
+
+        // Store the Principal name in the container
+        PrincipalName principalName = principalNameContainer.getPrincipalName();
+        EncKdcRepPart encKdcRepPart = encKdcRepPartContainer.getEncKdcRepPart();
+        encKdcRepPart.setSName( principalName );
+        
+        // Update the expected length for the current TLV
+        tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
+
+        // Update the parent
+        container.updateParent();
+
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "SName : {}", principalName );
+        }
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,54 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadRealm;
+
+
+/**
+ * The action used to set the srealm
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSRealm extends AbstractReadRealm
+{
+
+    /**
+     * Instantiates a new StoreSRealm action.
+     */
+    public StoreSRealm()
+    {
+        super( "EncKdcRepPart srealm value" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setRealm( String srealm, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setSRealm( srealm );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java?rev=1039048&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java Thu Nov 25 14:06:56 2010
@@ -0,0 +1,55 @@
+/*
+ *  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.EncKdcRepPart.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
+
+
+/**
+ * The action used to store the EncKdcRepPart start time
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreStartTime extends AbstractReadKerberosTime
+{
+
+    /**
+     * Instantiates a new StoreStartTime action.
+     */
+    public StoreStartTime()
+    {
+        super( "EncKdcRepPart start time" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
+        encKdcRepPartContainer.getEncKdcRepPart().setStartTime( krbtime );
+    }
+}



Mime
View raw message