directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1039406 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos: codec/krbCredInfo/KrbCredInfoGrammar.java codec/krbCredInfo/actions/StoreFlags.java components/KrbCredInfo.java
Date Fri, 26 Nov 2010 15:11:34 GMT
Author: kayyagari
Date: Fri Nov 26 15:11:34 2010
New Revision: 1039406

URL: http://svn.apache.org/viewvc?rev=1039406&view=rev
Log:
o fixed the way TicketFlags is encoded

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java?rev=1039406&r1=1039405&r2=1039406&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
Fri Nov 26 15:11:34 2010
@@ -99,8 +99,8 @@ public final class KrbCredInfoGrammar ex
             KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE
, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
             new CheckNotNullLength());
         
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE .ordinal()][UniversalTag.INTEGER.getValue()]
= new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
UniversalTag.INTEGER.getValue(),
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE .ordinal()][UniversalTag.BIT_STRING.getValue()]
= new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
UniversalTag.BIT_STRING.getValue(),
             new StoreFlags());
         
         super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG]
= new GrammarTransition(

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java?rev=1039406&r1=1039405&r2=1039406&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
Fri Nov 26 15:11:34 2010
@@ -21,7 +21,7 @@ package org.apache.directory.shared.kerb
 
 
 import org.apache.directory.shared.asn1.ber.Asn1Container;
-import org.apache.directory.shared.kerberos.codec.actions.AbstractReadInteger;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadByteArray;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 import org.apache.directory.shared.kerberos.flags.TicketFlags;
 
@@ -31,7 +31,7 @@ import org.apache.directory.shared.kerbe
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreFlags extends AbstractReadInteger
+public class StoreFlags extends AbstractReadByteArray
 {
 
     /**
@@ -47,11 +47,10 @@ public class StoreFlags extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setIntegerValue( int value, Asn1Container container )
+    protected void setByteArry( byte[] data, Asn1Container container )
     {
         KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
-        krbCredInfoContainer.getKrbCredInfo().setTicketFlags( new TicketFlags( value ) );
+        krbCredInfoContainer.getKrbCredInfo().setTicketFlags( new TicketFlags( data ) );
         container.setGrammarEndAllowed( true );
     }
-
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java?rev=1039406&r1=1039405&r2=1039406&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java
Fri Nov 26 15:11:34 2010
@@ -189,7 +189,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( ticketFlags != null )
         {
-            ticketFlagsLen = Value.getNbBytes( ticketFlags.getIntValue() );
+            ticketFlagsLen = ticketFlags.getData().length;
             ticketFlagsLen = 1 + TLV.getNbBytes( ticketFlagsLen ) + ticketFlagsLen;
             krbKredInfoSeqLen += 1 + TLV.getNbBytes( ticketFlagsLen ) + ticketFlagsLen;
         }
@@ -290,7 +290,7 @@ public class KrbCredInfo extends Abstrac
                 // flags tag and value
                 buffer.put( ( byte ) KerberosConstants.KRB_CRED_INFO_FLAGS_TAG );
                 buffer.put( TLV.getBytes( ticketFlagsLen ) );
-                Value.encode( buffer, ticketFlags.getIntValue() );
+                Value.encode( buffer, ticketFlags );
             }
 
             if ( authTime != null )



Mime
View raw message