directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1043228 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0: kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/ protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/ pro...
Date Tue, 07 Dec 2010 23:08:50 GMT
Author: elecharny
Date: Tue Dec  7 23:08:50 2010
New Revision: 1043228

URL: http://svn.apache.org/viewvc?rev=1043228&view=rev
Log:
o Added the setters/getters for the encKdcRepPart for the AsRep message
o Fixed some issues in a test

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/AsRep.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/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/AsRep.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/messages/AsRep.java?rev=1043228&r1=1043227&r2=1043228&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/AsRep.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/AsRep.java
Tue Dec  7 23:08:50 2010
@@ -44,7 +44,7 @@ import org.apache.directory.shared.kerbe
 public class AsRep extends KdcRep
 {
     /** The decoded KDC-REP part */
-    private EncKdcRepPart encPart;
+    private EncKdcRepPart encKdcRepPart;
     
     // Storage for computed lengths
     private transient int kdcRepLength;
@@ -66,7 +66,7 @@ public class AsRep extends KdcRep
      */
     public KerberosTime getEndTime()
     {
-        return encPart.getEndTime();
+        return encKdcRepPart.getEndTime();
     }
 
     
@@ -77,7 +77,7 @@ public class AsRep extends KdcRep
      */
     public TicketFlags getFlags()
     {
-        return encPart.getFlags();
+        return encKdcRepPart.getFlags();
     }
 
 
@@ -88,7 +88,7 @@ public class AsRep extends KdcRep
      */
     public int getNonce()
     {
-        return encPart.getNonce();
+        return encKdcRepPart.getNonce();
     }
 
 
@@ -99,7 +99,7 @@ public class AsRep extends KdcRep
      */
     public KerberosTime getRenewTill()
     {
-        return encPart.getRenewTill();
+        return encKdcRepPart.getRenewTill();
     }
 
 
@@ -110,7 +110,7 @@ public class AsRep extends KdcRep
      */
     public KerberosTime getStartTime()
     {
-        return encPart.getStartTime();
+        return encKdcRepPart.getStartTime();
     }
     
     
@@ -121,7 +121,25 @@ public class AsRep extends KdcRep
      */
     public PrincipalName getSName()
     {
-        return encPart.getSName();
+        return encKdcRepPart.getSName();
+    }
+
+
+    /**
+     * @return the encKdcRepPart
+     */
+    public EncKdcRepPart getEncKdcRepPart()
+    {
+        return encKdcRepPart;
+    }
+
+
+    /**
+     * @param encKdcRepPart the encKdcRepPart to set
+     */
+    public void setEncKdcRepPart( EncKdcRepPart encKdcRepPart )
+    {
+        this.encKdcRepPart = encKdcRepPart;
     }
 
 

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=1043228&r1=1043227&r2=1043228&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
Tue Dec  7 23:08:50 2010
@@ -594,6 +594,7 @@ public class AuthenticationService
         EncryptionKey clientKey = authContext.getClientKey();
         EncryptedData encryptedData = cipherTextHandler.seal( clientKey, encAsRepPart, KeyUsage.NUMBER3
);
         reply.setEncPart( encryptedData );
+        reply.setEncKdcRepPart( encKdcRepPart );
         
         authContext.setReply( reply );
     }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java?rev=1043228&r1=1043227&r2=1043228&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
Tue Dec  7 23:08:50 2010
@@ -39,6 +39,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.KdcReq;
 import org.apache.directory.shared.kerberos.components.KdcReqBody;
 import org.apache.directory.shared.kerberos.components.PaData;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
 import org.apache.directory.shared.kerberos.messages.AsRep;
 import org.apache.directory.shared.kerberos.messages.AsReq;
@@ -361,7 +362,7 @@ public class AuthenticationServiceTest e
     {
         KdcReqBody kdcReqBody = new KdcReqBody();
         kdcReqBody.setCName( getPrincipalName( "hnelson" ) );
-        kdcReqBody.setSName( getPrincipalName( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" ) );
+        kdcReqBody.setSName( new PrincipalName( new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM"
) ) );
         kdcReqBody.setRealm( "EXAMPLE.COM" );
         kdcReqBody.setEType( config.getEncryptionTypes() );
 



Mime
View raw message