directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1043152 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
Date Tue, 07 Dec 2010 18:03:08 GMT
Author: elecharny
Date: Tue Dec  7 18:03:08 2010
New Revision: 1043152

URL: http://svn.apache.org/viewvc?rev=1043152&view=rev
Log:
Fix a test : we were creating a wrong principalName

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.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/AbstractTicketGrantingServiceTest.java?rev=1043152&r1=1043151&r2=1043152&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
Tue Dec  7 18:03:08 2010
@@ -162,7 +162,7 @@ public abstract class AbstractTicketGran
         EncryptionKey sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.DES_CBC_MD5
);
 
         encTicketPart.setKey( sessionKey );
-        encTicketPart.setCName( new PrincipalName( clientPrincipal.getName(), PrincipalNameType.KRB_NT_PRINCIPAL
) );
+        encTicketPart.setCName( new PrincipalName( clientPrincipal ) );
         encTicketPart.setCRealm( clientPrincipal.getRealm() );
         encTicketPart.setTransited( new TransitedEncoding() );
         encTicketPart.setAuthTime( new KerberosTime() );
@@ -245,10 +245,11 @@ public abstract class AbstractTicketGran
     {
         Authenticator authenticator = new Authenticator();
 
-        clientMicroSeconds = random.nextInt();
+        clientMicroSeconds = random.nextInt(999999);
 
         authenticator.setVersionNumber( 5 );
         authenticator.setCName( new PrincipalName( clientPrincipal.getName(), clientPrincipal.getNameType()
) );
+        authenticator.setCRealm( clientPrincipal.getRealm() );
         authenticator.setCTime( now );
         authenticator.setCusec( clientMicroSeconds );
         authenticator.setSubKey( subSessionKey );



Mime
View raw message