directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r578743 [12/12] - in /directory/apacheds/branches/apacheds-kerberos: kerberos-shared/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypt...
Date Mon, 24 Sep 2007 10:18:45 GMT
Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpEncoder.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpEncoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpEncoder.java
Mon Sep 24 03:18:05 2007
@@ -24,7 +24,7 @@
 
 import org.apache.directory.server.kerberos.shared.io.encoder.ErrorMessageEncoder;
 import org.apache.directory.server.kerberos.shared.io.encoder.KdcReplyEncoder;
-import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
+import org.apache.directory.server.kerberos.shared.messages.KerberosError;
 import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.mina.common.ByteBuffer;
 import org.apache.mina.common.IoSession;
@@ -55,9 +55,9 @@
         }
         else
         {
-            if ( message instanceof ErrorMessage )
+            if ( message instanceof KerberosError )
             {
-                errorEncoder.encode( ( ErrorMessage ) message, buf.buf() );
+                errorEncoder.encode( ( KerberosError ) message, buf.buf() );
             }
         }
 

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosUdpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosUdpEncoder.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosUdpEncoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosUdpEncoder.java
Mon Sep 24 03:18:05 2007
@@ -24,7 +24,7 @@
 
 import org.apache.directory.server.kerberos.shared.io.encoder.ErrorMessageEncoder;
 import org.apache.directory.server.kerberos.shared.io.encoder.KdcReplyEncoder;
-import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
+import org.apache.directory.server.kerberos.shared.messages.KerberosError;
 import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.mina.common.ByteBuffer;
 import org.apache.mina.common.IoSession;
@@ -52,9 +52,9 @@
         }
         else
         {
-            if ( message instanceof ErrorMessage )
+            if ( message instanceof KerberosError )
             {
-                errorEncoder.encode( ( ErrorMessage ) message, buf.buf() );
+                errorEncoder.encode( ( KerberosError ) message, buf.buf() );
             }
         }
 

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamException.java
Mon Sep 24 03:18:05 2007
@@ -20,7 +20,7 @@
 package org.apache.directory.server.kerberos.sam;
 
 
-import org.apache.directory.server.kerberos.shared.messages.value.SamType;
+import org.apache.directory.server.kerberos.shared.messages.value.types.SamType;
 
 
 /**

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
Mon Sep 24 03:18:05 2007
@@ -28,7 +28,7 @@
 import javax.naming.directory.DirContext;
 import javax.security.auth.kerberos.KerberosKey;
 
-import org.apache.directory.server.kerberos.shared.messages.value.SamType;
+import org.apache.directory.server.kerberos.shared.messages.value.types.SamType;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 
 

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamVerifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamVerifier.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamVerifier.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamVerifier.java
Mon Sep 24 03:18:05 2007
@@ -24,7 +24,7 @@
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.server.kerberos.shared.messages.value.SamType;
+import org.apache.directory.server.kerberos.shared.messages.value.types.SamType;
 
 
 /**

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/TimestampChecker.java
Mon Sep 24 03:18:05 2007
@@ -30,7 +30,7 @@
 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
 import org.apache.directory.server.kerberos.shared.io.decoder.EncryptedDataDecoder;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
-import org.apache.directory.server.kerberos.shared.messages.value.EncryptedTimeStamp;
+import org.apache.directory.server.kerberos.shared.messages.value.PreAuthEncryptedTimestamp;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 
@@ -52,23 +52,17 @@
 
         try
         {
-            /*
-             * Since the pre-auth value is of type PA-ENC-TIMESTAMP, it should be a valid
-             * ASN.1 PA-ENC-TS-ENC structure, so we can decode it into EncryptedData.
-             */
+            // Since the pre-auth value is of type PA-ENC-TIMESTAMP, it should be a valid
+            // ASN.1 PA-ENC-TS-ENC structure, so we can decode it into EncryptedData.
             EncryptedData sadValue = EncryptedDataDecoder.decode( encryptedData );
 
-            /*
-             * Decrypt the EncryptedData structure to get the PA-ENC-TS-ENC.  Decode the
-             * decrypted timestamp into our timestamp object.
-             */
-            EncryptedTimeStamp timestamp = ( EncryptedTimeStamp ) cipherTextHandler.unseal(
EncryptedTimeStamp.class,
-                key, sadValue, KeyUsage.NUMBER1 );
-
-            /*
-             * Since we got here we must have a valid timestamp structure that we can
-             * validate to be within a five minute skew.
-             */
+            // Decrypt the EncryptedData structure to get the PA-ENC-TS-ENC
+            // Decode the decrypted timestamp into our timestamp object.
+            PreAuthEncryptedTimestamp timestamp = ( PreAuthEncryptedTimestamp ) cipherTextHandler.unseal(
PreAuthEncryptedTimestamp.class, key,
+                sadValue, KeyUsage.NUMBER1 );
+
+            // Since we got here we must have a valid timestamp structure that we can
+            // validate to be within a five minute skew.
             KerberosTime time = timestamp.getTimeStamp();
 
             if ( time.isInClockSkew( FIVE_MINUTES ) )

Modified: directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java?rev=578743&r1=578742&r2=578743&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
Mon Sep 24 03:18:05 2007
@@ -24,8 +24,9 @@
 
 import junit.framework.TestCase;
 
-import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.KdcOptions;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**
@@ -44,11 +45,11 @@
     public void testToString()
     {
         TicketFlags flags = new TicketFlags();
-        flags.set( TicketFlags.FORWARDABLE );
-        flags.set( TicketFlags.PROXIABLE );
-        flags.set( TicketFlags.RENEWABLE );
-        flags.set( TicketFlags.INITIAL );
-        assertEquals( flags.toString(), "FORWARDABLE PROXIABLE RENEWABLE INITIAL" );
+        flags.setFlag( TicketFlag.FORWARDABLE );
+        flags.setFlag( TicketFlag.PROXIABLE );
+        flags.setFlag( TicketFlag.RENEWABLE );
+        flags.setFlag( TicketFlag.INITIAL );
+        assertEquals( "FORWARDABLE PROXIABLE RENEWABLE INITIAL", flags.toString() );
     }
 
 
@@ -58,12 +59,12 @@
     public void testDuplicateSetting()
     {
         TicketFlags flags = new TicketFlags();
-        flags.set( TicketFlags.MAY_POSTDATE );
-        flags.set( TicketFlags.FORWARDABLE );
-        flags.set( TicketFlags.PROXIABLE );
-        flags.set( TicketFlags.MAY_POSTDATE );
-        flags.set( TicketFlags.RENEWABLE );
-        assertEquals( flags.toString(), "FORWARDABLE PROXIABLE MAY_POSTDATE RENEWABLE" );
+        flags.setFlag( TicketFlag.MAY_POSTDATE );
+        flags.setFlag( TicketFlag.FORWARDABLE );
+        flags.setFlag( TicketFlag.PROXIABLE );
+        flags.setFlag( TicketFlag.MAY_POSTDATE );
+        flags.setFlag( TicketFlag.RENEWABLE );
+        assertEquals( "FORWARDABLE PROXIABLE MAY_POSTDATE RENEWABLE", flags.toString() );
     }
 
 



Mime
View raw message