directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r591019 [2/2] - in /directory: apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/ apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decod...
Date Thu, 01 Nov 2007 14:16:50 GMT
Modified: directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
(original)
+++ directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
Thu Nov  1 07:16:34 2007
@@ -25,6 +25,8 @@
 import java.net.InetSocketAddress;
 import java.security.SecureRandom;
 import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 import javax.security.auth.kerberos.KerberosTicket;
@@ -60,7 +62,8 @@
 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.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
@@ -224,11 +227,11 @@
 
         TicketFlags ticketFlags = repPart.getFlags();
 
-        boolean[] flags = new boolean[TicketFlags.MAX_VALUE];
+        boolean[] flags = new boolean[TicketFlag.MAX_VALUE.getOrdinal()];
 
-        for ( int i = 0; i < TicketFlags.MAX_VALUE; i++ )
+        for ( int i = 0; i < TicketFlag.MAX_VALUE.getOrdinal(); i++ )
         {
-            flags[i] = ticketFlags.get( i );
+            flags[i] = ticketFlags.isFlagSet( i );
         }
 
         InetAddress[] clientAddresses = null;
@@ -311,8 +314,8 @@
 
         modifier.setNonce( random.nextInt() );
 
-        EncryptionType[] encryptionTypes = new EncryptionType[1];
-        encryptionTypes[0] = EncryptionType.DES_CBC_MD5;
+        Set<EncryptionType> encryptionTypes = new HashSet<EncryptionType>();
+        encryptionTypes.add( EncryptionType.DES_CBC_MD5 );
 
         modifier.setEType( encryptionTypes );
 

Modified: directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
(original)
+++ directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
Thu Nov  1 07:16:34 2007
@@ -26,6 +26,8 @@
 import java.security.SecureRandom;
 import java.text.ParseException;
 import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
@@ -54,7 +56,8 @@
 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.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
@@ -214,11 +217,11 @@
 
         TicketFlags ticketFlags = repPart.getFlags();
 
-        boolean[] flags = new boolean[TicketFlags.MAX_VALUE];
+        boolean[] flags = new boolean[TicketFlag.MAX_VALUE.getOrdinal()];
 
-        for ( int i = 0; i < TicketFlags.MAX_VALUE; i++ )
+        for ( int i = 0; i < TicketFlag.MAX_VALUE.getOrdinal(); i++ )
         {
-            flags[i] = ticketFlags.get( i );
+            flags[i] = ticketFlags.isFlagSet( i );
         }
 
         InetAddress[] clientAddresses = null;
@@ -320,8 +323,8 @@
 
         modifier.setNonce( random.nextInt() );
 
-        EncryptionType[] encryptionTypes = new EncryptionType[1];
-        encryptionTypes[0] = EncryptionType.DES_CBC_MD5;
+        Set<EncryptionType> encryptionTypes = new HashSet<EncryptionType>();
+        encryptionTypes.add( EncryptionType.DES_CBC_MD5 );
 
         modifier.setEType( encryptionTypes );
 



Mime
View raw message