directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1043377 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos: KerberosTime.java components/EncTicketPart.java
Date Wed, 08 Dec 2010 12:13:45 GMT
Author: elecharny
Date: Wed Dec  8 12:13:45 2010
New Revision: 1043377

URL: http://svn.apache.org/viewvc?rev=1043377&view=rev
Log:
o Initialized the TicketFlags in EncTicketPart
o The Kerberostime creation will now remove the milliseconds
o The KerberosTime.lessThan() will return true if the current time and the given one are equal.

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java?rev=1043377&r1=1043376&r2=1043377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
Wed Dec  8 12:13:45 2010
@@ -73,7 +73,7 @@ public class KerberosTime implements Com
      */
     public KerberosTime()
     {
-        kerberosTime = System.currentTimeMillis();
+        kerberosTime = (System.currentTimeMillis()/1000L)*1000L; // drop the ms
         convertInternal( kerberosTime );
     }
 
@@ -112,7 +112,7 @@ public class KerberosTime implements Com
      */
     public KerberosTime( Date time )
     {
-        kerberosTime = time.getTime();
+        kerberosTime = (time.getTime()/1000L)*1000L; // drop the ms
         convertInternal( kerberosTime );
     }
 
@@ -288,13 +288,13 @@ public class KerberosTime implements Com
     
     
     /**
-     * checks if the current kerberos time is less than the given kerberos time
-     * @param ktime the kerberos time against which the currnet kerberos time needs to be
compared
-     * @return true if current kerberos time is less than the given kerberos time, false
otherwise
+     * checks if the current kerberos time is less or equal than the given kerberos time
+     * @param ktime the kerberos time against which the current kerberos time needs to be
compared
+     * @return true if current kerberos time is less or equal than the given kerberos time,
false otherwise
      */
     public boolean lessThan( KerberosTime ktime )
     {
-        return kerberosTime < ktime.kerberosTime;
+        return kerberosTime <= ktime.kerberosTime;
     }
     
     

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java?rev=1043377&r1=1043376&r2=1043377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
Wed Dec  8 12:13:45 2010
@@ -65,7 +65,7 @@ public class EncTicketPart extends Abstr
     private static final boolean IS_DEBUG = log.isDebugEnabled();
 
     /** the ticket's flags */
-    private TicketFlags flags;
+    private TicketFlags flags = new TicketFlags();
 
     /** the encryption key */
     private EncryptionKey key;



Mime
View raw message