directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r552685 - in /directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos: GetServiceTicket.java GetTicketGrantingTicket.java
Date Tue, 03 Jul 2007 06:22:27 GMT
Author: erodriguez
Date: Mon Jul  2 23:22:26 2007
New Revision: 552685

URL: http://svn.apache.org/viewvc?view=rev&rev=552685
Log:
Wired-in more date and flag processing to the Kerberos client component.

Modified:
    directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
    directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java

Modified: directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java?view=diff&rev=552685&r1=552684&r2=552685
==============================================================================
--- directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
(original)
+++ directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
Mon Jul  2 23:22:26 2007
@@ -61,6 +61,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
+import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoSession;
@@ -215,13 +216,21 @@
 
         byte[] sessionKey = repPart.getKey().getKeyValue();
         int keyType = repPart.getKey().getKeyType().getOrdinal();
+
+        Date authTime = repPart.getAuthTime().toDate();
+        Date startTime = ( repPart.getStartTime() != null ) ? repPart.getStartTime().toDate()
: null; // optional
         Date endTime = repPart.getEndTime().toDate();
+        Date renewTill = ( repPart.getRenewTill() != null ) ? repPart.getRenewTill().toDate()
: null; // optional
+
+        TicketFlags ticketFlags = repPart.getFlags();
+
+        boolean[] flags = new boolean[TicketFlags.MAX_VALUE];
+
+        for ( int i = 0; i < TicketFlags.MAX_VALUE; i++ )
+        {
+            flags[i] = ticketFlags.get( i );
+        }
 
-        // might be null
-        boolean[] flags = null;
-        Date authTime = null;
-        Date startTime = null;
-        Date renewTill = null;
         InetAddress[] clientAddresses = null;
 
         return new KerberosTicket( ticketBytes, client, server, sessionKey, keyType, flags,
authTime, startTime,

Modified: directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java?view=diff&rev=552685&r1=552684&r2=552685
==============================================================================
--- directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
(original)
+++ directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
Mon Jul  2 23:22:26 2007
@@ -54,6 +54,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
+import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoSession;
@@ -204,13 +205,21 @@
 
         byte[] sessionKey = repPart.getKey().getKeyValue();
         int keyType = repPart.getKey().getKeyType().getOrdinal();
+
+        Date authTime = repPart.getAuthTime().toDate();
+        Date startTime = ( repPart.getStartTime() != null ) ? repPart.getStartTime().toDate()
: null; // optional
         Date endTime = repPart.getEndTime().toDate();
+        Date renewTill = ( repPart.getRenewTill() != null ) ? repPart.getRenewTill().toDate()
: null; // optional
+
+        TicketFlags ticketFlags = repPart.getFlags();
+
+        boolean[] flags = new boolean[TicketFlags.MAX_VALUE];
+
+        for ( int i = 0; i < TicketFlags.MAX_VALUE; i++ )
+        {
+            flags[i] = ticketFlags.get( i );
+        }
 
-        // might be null
-        boolean[] flags = null;
-        Date authTime = null;
-        Date startTime = null;
-        Date renewTill = null;
         InetAddress[] clientAddresses = null;
 
         return new KerberosTicket( ticketBytes, client, server, sessionKey, keyType, flags,
authTime, startTime,



Mime
View raw message