directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1037329 - /directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
Date Sat, 20 Nov 2010 21:15:39 GMT
Author: felixk
Date: Sat Nov 20 21:15:36 2010
New Revision: 1037329

URL: http://svn.apache.org/viewvc?rev=1037329&view=rev
Log:
Respect the first flag containing the number of unused bytes

Modified:
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java?rev=1037329&r1=1037328&r2=1037329&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
Sat Nov 20 21:15:36 2010
@@ -34,15 +34,18 @@ public abstract class AbstractKerberosFl
 {
     /**
      * The maximum size of the BitString as specified for Kerberos flags.
+     * 1 byte contains the number of unused bits
+     * 4 bytes containing the data
+     * => 5 x 8 bits = 40 
      */
-    public static final int MAX_SIZE = 32;
+    public static final int MAX_SIZE = 40;
 
     /** The associated value */
     protected int value;
     
     
     /**
-     * Standard constructor, which create a BitString containing 32 bits
+     * Standard constructor, which create a BitString containing 8 + 32 bits
      */
     public AbstractKerberosFlags()
     {
@@ -51,7 +54,7 @@ public abstract class AbstractKerberosFl
 
     
     /**
-     * Standard constructor, taking a byte array
+     * Standard constructor, taking a byte array, 8 + x (x <= 32) bits
      */
     public AbstractKerberosFlags( byte[] flags )
     {
@@ -73,7 +76,7 @@ public abstract class AbstractKerberosFl
             (byte)( ( flags >> 16 ) & 0x00ff ), 
             (byte)( ( flags >> 8 ) & 0x00ff ), 
             (byte)( flags & 0x00ff ) };
-}
+    }
     
     
     /**



Mime
View raw message