directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1039165 - /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java
Date Thu, 25 Nov 2010 20:43:29 GMT
Author: kayyagari
Date: Thu Nov 25 20:43:29 2010
New Revision: 1039165

URL: http://svn.apache.org/viewvc?rev=1039165&view=rev
Log:
o fixed the computelength() and encode methods

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java?rev=1039165&r1=1039164&r2=1039165&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncKrbCredPart.java
Thu Nov 25 20:43:29 2010
@@ -111,7 +111,7 @@ public class EncKrbCredPart extends Abst
      *         |
      *         +--> 0xA2 11 timestamp tag
      *         |     |
-     *         |     +--> 0x18 0x1F timestamp (KerberosTime)
+     *         |     +--> 0x18 0x0F timestamp (KerberosTime)
      *         |
      *         +--> 0xA3 L4 usec tag
      *         |     |
@@ -135,8 +135,6 @@ public class EncKrbCredPart extends Abst
             ticketInfoSeqLen += kci.computeLength();
         }
 
-        ticketInfoSeqLen = 1 + TLV.getNbBytes( ticketInfoSeqLen ) + ticketInfoSeqLen;
-
         ticketInfoLen = 1 + TLV.getNbBytes( ticketInfoSeqLen ) + ticketInfoSeqLen;
 
         encKrbCredPartSeqLen = 1 + TLV.getNbBytes( ticketInfoLen ) + ticketInfoLen;
@@ -227,7 +225,9 @@ public class EncKrbCredPart extends Abst
                 // timestamp tag and value
                 buffer.put( ( byte ) KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG );
                 buffer.put( TLV.getBytes( timestampLen ) );
-                buffer.put( ( byte ) 0x1F );
+                
+                buffer.put( UniversalTag.GENERALIZED_TIME.getValue() );
+                buffer.put( ( byte ) 0x0F );
                 buffer.put( timestampBytes );
             }
 



Mime
View raw message