directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1042952 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
Date Tue, 07 Dec 2010 09:57:12 GMT
Author: kayyagari
Date: Tue Dec  7 09:57:12 2010
New Revision: 1042952

URL: http://svn.apache.org/viewvc?rev=1042952&view=rev
Log:
o removed an unused method

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java?rev=1042952&r1=1042951&r2=1042952&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
Tue Dec  7 09:57:12 2010
@@ -20,21 +20,16 @@
 package org.apache.directory.server.kerberos.shared.store;
 
 
-import java.io.IOException;
-import java.net.InetAddress;
 import java.text.ParseException;
-import java.util.Date;
 
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
-import javax.security.auth.kerberos.KerberosTicket;
 
 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KeyUsage;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
 import org.apache.directory.shared.kerberos.KerberosConstants;
 import org.apache.directory.shared.kerberos.KerberosTime;
-import org.apache.directory.shared.kerberos.KerberosUtils;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.codec.types.PrincipalNameType;
 import org.apache.directory.shared.kerberos.components.EncTicketPart;
@@ -126,46 +121,4 @@ public class TicketFactory
 
         return ticket;
     }
-
-
-    /**
-     * Convert an Apache Directory Kerberos {@link Ticket} into a {@link KerberosTicket}.
-     *
-     * @param ticket
-     * @return The {@link KerberosTicket}.
-     * @throws IOException 
-     */
-    public KerberosTicket getKerberosTicket( Ticket ticket ) throws IOException
-    {
-        byte[] asn1Encoding = ticket.encode( null ).array();
-        
-        KerberosPrincipal client = KerberosUtils.getKerberosPrincipal( ticket.getEncTicketPart().getCName(),
ticket.getEncTicketPart().getCRealm() );
-        KerberosPrincipal server = KerberosUtils.getKerberosPrincipal( ticket.getSName(),
ticket.getRealm() );
-        byte[] sessionKey = ticket.getEncTicketPart().getKey().getKeyValue();
-        int keyType = ticket.getEncTicketPart().getKey().getKeyType().getValue();
-
-        boolean[] flags = new boolean[32];
-
-        for ( int ii = 0; ii < flags.length; ii++ )
-        {
-            flags[ii] = ticket.getEncTicketPart().getFlags().isFlagSet( ii );
-        }
-
-        Date authTime = ticket.getEncTicketPart().getAuthTime().toDate();
-        Date endTime = ticket.getEncTicketPart().getEndTime().toDate();
-
-        Date startTime = ( ticket.getEncTicketPart().getStartTime() != null ? ticket.getEncTicketPart().getStartTime().toDate()
: null );
-
-        Date renewTill = null;
-
-        if ( ticket.getEncTicketPart().getFlags().isRenewable() )
-        {
-            renewTill = ( ticket.getEncTicketPart().getRenewTill() != null ? ticket.getEncTicketPart().getRenewTill().toDate()
: null );
-        }
-
-        InetAddress[] clientAddresses = new InetAddress[0];
-
-        return new KerberosTicket( asn1Encoding, client, server, sessionKey, keyType, flags,
authTime, startTime,
-            endTime, renewTill, clientAddresses );
-    }
 }



Mime
View raw message