directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1041515 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages...
Date Thu, 02 Dec 2010 18:28:02 GMT
Author: elecharny
Date: Thu Dec  2 18:28:01 2010
New Revision: 1041515

URL: http://svn.apache.org/viewvc?rev=1041515&view=rev
Log:
Removed the LastRequest, LastRequestEntry and LastRequest type classes, using those from kerberos-codec
instead

Removed:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestEntry.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/types/LastRequestType.java
Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/LastRequestDecoder.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
Thu Dec  2 18:28:01 2010
@@ -96,7 +96,7 @@ public class EncKdcRepPartDecoder implem
                     break;
                 case 1:
                     DERSequence tag1 = ( DERSequence ) derObject;
-                    modifier.setLastRequest( LastRequestDecoder.decodeSequence( tag1 ) );
+                    modifier.setLastReq( LastRequestDecoder.decodeSequence( tag1 ) );
                     break;
                 case 2:
                     DERInteger tag2 = ( DERInteger ) derObject;

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/LastRequestDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/LastRequestDecoder.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/LastRequestDecoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/LastRequestDecoder.java
Thu Dec  2 18:28:01 2010
@@ -22,15 +22,15 @@ package org.apache.directory.server.kerb
 
 import java.util.Enumeration;
 
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequestEntry;
-import org.apache.directory.server.kerberos.shared.messages.value.types.LastRequestType;
 import org.apache.directory.shared.asn1.der.DEREncodable;
 import org.apache.directory.shared.asn1.der.DERGeneralizedTime;
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
 import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.codec.types.LastReqType;
+import org.apache.directory.shared.kerberos.components.LastReq;
+import org.apache.directory.shared.kerberos.components.LastReqEntry;
 
 
 /**
@@ -44,26 +44,23 @@ public class LastRequestDecoder
      * lr-value[1]              KerberosTime
      * }
      */
-    protected static LastRequest decodeSequence( DERSequence sequence )
+    protected static LastReq decodeSequence( DERSequence sequence )
     {
-        LastRequestEntry[] entries = new LastRequestEntry[sequence.size()];
+        LastReq lastReq = new LastReq();
 
-        int ii = 0;
         for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements();
)
         {
             DERSequence object = ( DERSequence ) e.nextElement();
-            LastRequestEntry entry = decode( object );
-            entries[ii] = entry;
-            ii++;
+            decode( lastReq, object );
         }
 
-        return new LastRequest( entries );
+        return lastReq;
     }
 
 
-    protected static LastRequestEntry decode( DERSequence sequence )
+    protected static void decode( LastReq lastReq, DERSequence sequence )
     {
-        LastRequestType type = LastRequestType.NONE;
+        LastReqType type = LastReqType.NONE;
         KerberosTime value = null;
 
         for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements();
)
@@ -76,7 +73,7 @@ public class LastRequestDecoder
             {
                 case 0:
                     DERInteger tag0 = ( DERInteger ) derObject;
-                    type = LastRequestType.getTypeByOrdinal( tag0.intValue() );
+                    type = LastReqType.getTypeByValue( tag0.intValue() );
                     break;
                 case 1:
                     DERGeneralizedTime tag1 = ( DERGeneralizedTime ) derObject;
@@ -85,6 +82,6 @@ public class LastRequestDecoder
             }
         }
 
-        return new LastRequestEntry( type, value );
+        lastReq.addEntry( new LastReqEntry( type, value ) );
     }
 }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
Thu Dec  2 18:28:01 2010
@@ -24,13 +24,13 @@ import javax.security.auth.kerberos.Kerb
 
 import org.apache.directory.server.kerberos.shared.messages.components.EncKdcRepPart;
 import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.shared.kerberos.KerberosMessageType;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.components.HostAddresses;
+import org.apache.directory.shared.kerberos.components.LastReq;
 import org.apache.directory.shared.kerberos.components.PaData;
 
 
@@ -257,13 +257,13 @@ public class KdcReply extends KerberosMe
 
 
     /**
-     * Returns the {@link LastRequest}.
+     * Returns the {@link LastReq}.
      *
-     * @return The {@link LastRequest}.
+     * @return The {@link LastReq}.
      */
-    public LastRequest getLastRequest()
+    public LastReq getLastReq()
     {
-        return encKDCRepPart.getLastRequest();
+        return encKDCRepPart.getLastReq();
     }
 
 
@@ -391,13 +391,13 @@ public class KdcReply extends KerberosMe
 
 
     /**
-     * Sets the {@link LastRequest}.
+     * Sets the {@link LastReq}.
      *
      * @param request
      */
-    public void setLastRequest( LastRequest request )
+    public void setLastReq( LastReq request )
     {
-        encKDCRepPart.setLastRequest( request );
+        encKDCRepPart.setLastReq( request );
     }
 
 

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
Thu Dec  2 18:28:01 2010
@@ -22,11 +22,11 @@ package org.apache.directory.server.kerb
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.shared.kerberos.components.HostAddresses;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
+import org.apache.directory.shared.kerberos.components.HostAddresses;
+import org.apache.directory.shared.kerberos.components.LastReq;
 
 
 /**
@@ -51,7 +51,7 @@ public class EncAsRepPart extends EncKdc
      * @param serverPrincipal
      * @param caddr
      */
-    public EncAsRepPart(EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime keyExpiration,
+    public EncAsRepPart(EncryptionKey key, LastReq lastReq, int nonce, KerberosTime keyExpiration,
         TicketFlags flags, KerberosTime authTime, KerberosTime startTime, KerberosTime endTime,
KerberosTime renewTill,
         KerberosPrincipal serverPrincipal, HostAddresses caddr)
     {

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
Thu Dec  2 18:28:01 2010
@@ -23,11 +23,11 @@ package org.apache.directory.server.kerb
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
-import org.apache.directory.shared.kerberos.components.HostAddresses;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
+import org.apache.directory.shared.kerberos.components.HostAddresses;
+import org.apache.directory.shared.kerberos.components.LastReq;
 
 
 /**
@@ -38,7 +38,7 @@ import org.apache.directory.shared.kerbe
 public class EncKdcRepPart implements Encodable
 {
     private EncryptionKey key;
-    private LastRequest lastRequest;
+    private LastReq lastReq;
     private int nonce;
     private KerberosTime keyExpiration; //optional
     private TicketFlags flags = new TicketFlags();
@@ -76,12 +76,12 @@ public class EncKdcRepPart implements En
      * @param caddr
      * @param componentType
      */
-    public EncKdcRepPart( EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime
keyExpiration,
+    public EncKdcRepPart( EncryptionKey key, LastReq lastReq, int nonce, KerberosTime keyExpiration,
         TicketFlags flags, KerberosTime authtime, KerberosTime starttime, KerberosTime endtime,
KerberosTime renewTill,
         KerberosPrincipal serverPrincipal, HostAddresses caddr, MessageComponentType componentType
)
     {
         this.key = key;
-        this.lastRequest = lastReq;
+        this.lastReq = lastReq;
         this.nonce = nonce;
         this.keyExpiration = keyExpiration;
         this.flags = flags;
@@ -162,13 +162,13 @@ public class EncKdcRepPart implements En
 
 
     /**
-     * Returns the {@link LastRequest}.
+     * Returns the {@link LastReq}.
      *
-     * @return The {@link LastRequest}.
+     * @return The {@link LastReq}.
      */
-    public LastRequest getLastRequest()
+    public LastReq getLastReq()
     {
-        return lastRequest;
+        return lastReq;
     }
 
 
@@ -305,13 +305,13 @@ public class EncKdcRepPart implements En
 
 
     /**
-     * Sets the {@link LastRequest}.
+     * Sets the {@link LastReq}.
      *
      * @param request
      */
-    public void setLastRequest( LastRequest request )
+    public void setLastReq( LastReq request )
     {
-        lastRequest = request;
+        lastReq = request;
     }
 
 

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
Thu Dec  2 18:28:01 2010
@@ -22,11 +22,11 @@ package org.apache.directory.server.kerb
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.shared.kerberos.components.HostAddresses;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
+import org.apache.directory.shared.kerberos.components.HostAddresses;
+import org.apache.directory.shared.kerberos.components.LastReq;
 
 
 /**
@@ -51,7 +51,7 @@ public class EncTgsRepPart extends EncKd
      * @param serverPrincipal
      * @param caddr
      */
-    public EncTgsRepPart(EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime
keyExpiration,
+    public EncTgsRepPart(EncryptionKey key, LastReq lastReq, int nonce, KerberosTime keyExpiration,
         TicketFlags flags, KerberosTime authtime, KerberosTime starttime, KerberosTime endtime,
KerberosTime renewTill,
         KerberosPrincipal serverPrincipal, HostAddresses caddr)
     {

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
Thu Dec  2 18:28:01 2010
@@ -46,7 +46,6 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptedTimeStamp;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionTypeInfoEntry;
-import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
@@ -60,6 +59,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.components.KdcReq;
+import org.apache.directory.shared.kerberos.components.LastReq;
 import org.apache.directory.shared.kerberos.components.PaData;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.components.TransitedEncoding;
@@ -578,7 +578,7 @@ public class AuthenticationService
         reply.setKey( ticket.getEncTicketPart().getSessionKey() );
 
         // TODO - fetch lastReq for this client; requires store
-        reply.setLastRequest( new LastRequest() );
+        reply.setLastReq( new LastReq() );
         // TODO - resp.key-expiration := client.expiration; requires store
 
         reply.setNonce( request.getKdcReqBody().getNonce() );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java?rev=1041515&r1=1041514&r2=1041515&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
Thu Dec  2 18:28:01 2010
@@ -389,7 +389,7 @@ public class TicketGrantingService
         reply.setKey( newTicket.getEncTicketPart().getSessionKey() );
         reply.setNonce( request.getKdcReqBody().getNonce() );
         // TODO - resp.last-req := fetch_last_request_info(client); requires store
-        reply.setLastRequest( new LastRequest() );
+        reply.setLastReq( new LastRequest() );
         reply.setFlags( newTicket.getEncTicketPart().getFlags() );
         reply.setClientAddresses( newTicket.getEncTicketPart().getClientAddresses() );
         reply.setAuthTime( newTicket.getEncTicketPart().getAuthTime() );



Mime
View raw message