directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r589783 - in /directory/clients/branches/bigbang/kerberos: client/src/main/java/org/apache/directory/client/kerberos/ password/src/main/java/org/apache/directory/client/password/
Date Mon, 29 Oct 2007 18:19:34 GMT
Author: elecharny
Date: Mon Oct 29 11:19:33 2007
New Revision: 589783

URL: http://svn.apache.org/viewvc?rev=589783&view=rev
Log:
Align this project with the modification made in Kerberos-shared

Modified:
    directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
    directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
    directory/clients/branches/bigbang/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java

Modified: directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java?rev=589783&r1=589782&r2=589783&view=diff
==============================================================================
--- directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
(original)
+++ directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
Mon Oct 29 11:19:33 2007
@@ -30,6 +30,8 @@
 import javax.security.auth.kerberos.KerberosTicket;
 
 import org.apache.directory.client.kerberos.protocol.KerberosClientHandler;
+import org.apache.directory.server.kerberos.shared.KerberosConstants;
+import org.apache.directory.server.kerberos.shared.KerberosMessageType;
 import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumHandler;
 import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
@@ -44,7 +46,6 @@
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
 import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
-import org.apache.directory.server.kerberos.shared.messages.MessageType;
 import org.apache.directory.server.kerberos.shared.messages.components.Authenticator;
 import org.apache.directory.server.kerberos.shared.messages.components.AuthenticatorModifier;
 import org.apache.directory.server.kerberos.shared.messages.components.EncKdcRepPart;
@@ -55,13 +56,12 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationData;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataType;
+import org.apache.directory.server.kerberos.shared.messages.value.PaData;
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
 import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoSession;
@@ -334,8 +334,8 @@
 
         RequestBody requestBody = modifier.getRequestBody();
 
-        int pvno = 5;
-        MessageType messageType = MessageType.KRB_TGS_REQ;
+        int pvno = KerberosConstants.KERBEROS_V5;
+        KerberosMessageType messageType = KerberosMessageType.TGS_REQ;
 
         KdcRequestEncoder bodyEncoder = new KdcRequestEncoder();
         byte[] bodyBytes = bodyEncoder.encodeRequestBody( requestBody );
@@ -343,10 +343,10 @@
         ChecksumHandler checksumHandler = new ChecksumHandler();
         Checksum checksum = checksumHandler.calculateChecksum( ChecksumType.RSA_MD5, bodyBytes,
null, KeyUsage.NUMBER8 );
 
-        PreAuthenticationData[] paData = new PreAuthenticationData[1];
+        PaData[] paData = new PaData[1];
 
-        PreAuthenticationDataModifier preAuth = new PreAuthenticationDataModifier();
-        preAuth.setDataType( PreAuthenticationDataType.PA_TGS_REQ );
+        PaData preAuth = new PaData();
+        preAuth.setPaDataType( PaDataType.PA_TGS_REQ );
 
         // Generate a new sequence number.
         sequenceNumber = random.nextInt();
@@ -358,7 +358,7 @@
 
         // Make new ap req, aka the "auth header."
         ApplicationRequest applicationRequest = new ApplicationRequest();
-        applicationRequest.setMessageType( MessageType.KRB_AP_REQ );
+        applicationRequest.setMessageType( KerberosMessageType.AP_REQ );
         applicationRequest.setProtocolVersionNumber( 5 );
         applicationRequest.setApOptions( new ApOptions() );
         applicationRequest.setTicket( convertedTicket );
@@ -367,9 +367,9 @@
         ApplicationRequestEncoder encoder = new ApplicationRequestEncoder();
         byte[] encodedApReq = encoder.encode( applicationRequest );
 
-        preAuth.setDataValue( encodedApReq );
+        preAuth.setPaDataValue( encodedApReq );
 
-        paData[0] = preAuth.getPreAuthenticationData();
+        paData[0] = preAuth;
 
         return new KdcRequest( pvno, messageType, paData, requestBody );
     }

Modified: directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java?rev=589783&r1=589782&r2=589783&view=diff
==============================================================================
--- directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
(original)
+++ directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
Mon Oct 29 11:19:33 2007
@@ -32,6 +32,8 @@
 import javax.security.auth.kerberos.KerberosTicket;
 
 import org.apache.directory.client.kerberos.protocol.KerberosClientHandler;
+import org.apache.directory.server.kerberos.shared.KerberosConstants;
+import org.apache.directory.server.kerberos.shared.KerberosMessageType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KeyUsage;
@@ -41,7 +43,6 @@
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
 import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.kerberos.shared.messages.KdcRequest;
-import org.apache.directory.server.kerberos.shared.messages.MessageType;
 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.EncryptedData;
@@ -49,13 +50,12 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationData;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.PreAuthenticationDataType;
+import org.apache.directory.server.kerberos.shared.messages.value.PaData;
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
 import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoSession;
@@ -242,7 +242,7 @@
         KerberosKey kerberosKey = new KerberosKey( clientPrincipal, password.toCharArray(),
"DES" );
         clientKey = new EncryptionKey( EncryptionType.DES_CBC_MD5, kerberosKey.getEncoded()
);
 
-        PreAuthenticationData[] paData = new PreAuthenticationData[1];
+        PaData[] paData = new PaData[1];
 
         if ( controls.isUsePaEncTimestamp() )
         {
@@ -264,11 +264,11 @@
 
             byte[] encodedEncryptedData = EncryptedDataEncoder.encode( encryptedData );
 
-            PreAuthenticationDataModifier preAuth = new PreAuthenticationDataModifier();
-            preAuth.setDataType( PreAuthenticationDataType.PA_ENC_TIMESTAMP );
-            preAuth.setDataValue( encodedEncryptedData );
+            PaData preAuth = new PaData();
+            preAuth.setPaDataType( PaDataType.PA_ENC_TIMESTAMP );
+            preAuth.setPaDataValue( encodedEncryptedData );
 
-            paData[0] = preAuth.getPreAuthenticationData();
+            paData[0] = preAuth;
         }
 
         PrincipalName clientName = new PrincipalName( clientPrincipal.getName(), clientPrincipal.getNameType()
);
@@ -338,8 +338,8 @@
 
         RequestBody requestBody = modifier.getRequestBody();
 
-        int pvno = 5;
-        MessageType messageType = MessageType.KRB_AS_REQ;
+        int pvno = KerberosConstants.KERBEROS_V5;
+        KerberosMessageType messageType = KerberosMessageType.AS_REQ;
 
         return new KdcRequest( pvno, messageType, paData, requestBody );
     }

Modified: directory/clients/branches/bigbang/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/clients/branches/bigbang/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java?rev=589783&r1=589782&r2=589783&view=diff
==============================================================================
--- directory/clients/branches/bigbang/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
(original)
+++ directory/clients/branches/bigbang/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
Mon Oct 29 11:19:33 2007
@@ -35,6 +35,8 @@
 import org.apache.directory.server.changepw.messages.ChangePasswordReply;
 import org.apache.directory.server.changepw.messages.ChangePasswordRequest;
 import org.apache.directory.server.changepw.messages.ChangePasswordRequestModifier;
+import org.apache.directory.server.kerberos.shared.KerberosConstants;
+import org.apache.directory.server.kerberos.shared.KerberosMessageType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KeyUsage;
@@ -43,7 +45,6 @@
 import org.apache.directory.server.kerberos.shared.io.decoder.TicketDecoder;
 import org.apache.directory.server.kerberos.shared.messages.ApplicationRequest;
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
-import org.apache.directory.server.kerberos.shared.messages.MessageType;
 import org.apache.directory.server.kerberos.shared.messages.application.ApplicationReply;
 import org.apache.directory.server.kerberos.shared.messages.application.PrivateMessage;
 import org.apache.directory.server.kerberos.shared.messages.components.Authenticator;
@@ -274,8 +275,8 @@
 
         // Make new ap req, aka the "auth header."
         ApplicationRequest applicationRequest = new ApplicationRequest();
-        applicationRequest.setMessageType( MessageType.KRB_AP_REQ );
-        applicationRequest.setProtocolVersionNumber( 5 );
+        applicationRequest.setMessageType( KerberosMessageType.AP_REQ );
+        applicationRequest.setProtocolVersionNumber( KerberosConstants.KERBEROS_V5 );
         applicationRequest.setApOptions( new ApOptions() );
         applicationRequest.setTicket( convertedTicket );
         applicationRequest.setEncPart( authenticator );
@@ -315,8 +316,8 @@
 
         // Make private message with private message part.
         PrivateMessage privateMessage = new PrivateMessage();
-        privateMessage.setProtocolVersionNumber( 5 );
-        privateMessage.setMessageType( MessageType.ENC_PRIV_PART );
+        privateMessage.setProtocolVersionNumber( KerberosConstants.KERBEROS_V5 );
+        privateMessage.setMessageType( KerberosMessageType.ENC_PRIV_PART );
         privateMessage.setEncryptedPart( encryptedPrivPart );
 
         return privateMessage;



Mime
View raw message