directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1041758 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/i...
Date Fri, 03 Dec 2010 10:12:39 GMT
Author: kayyagari
Date: Fri Dec  3 10:12:36 2010
New Revision: 1041758

URL: http://svn.apache.org/viewvc?rev=1041758&view=rev
Log:
o removed EncKrbPrivPart/Modifier

Removed:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPart.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPartModifier.java
Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKrbPrivPartDecoder.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.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/crypto/encryption/CipherTextHandler.java?rev=1041758&r1=1041757&r2=1041758&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
Fri Dec  3 10:12:36 2010
@@ -38,7 +38,7 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.io.decoder.EncTicketPartDecoder;
 import org.apache.directory.server.kerberos.shared.io.decoder.EncryptedTimestampDecoder;
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
-import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPart;
+import org.apache.directory.shared.kerberos.components.EncKrbPrivPart;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKrbPrivPartDecoder.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/EncKrbPrivPartDecoder.java?rev=1041758&r1=1041757&r2=1041758&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKrbPrivPartDecoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKrbPrivPartDecoder.java
Fri Dec  3 10:12:36 2010
@@ -24,8 +24,6 @@ import java.io.IOException;
 import java.util.Enumeration;
 
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
-import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPart;
-import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPartModifier;
 import org.apache.directory.shared.asn1.der.ASN1InputStream;
 import org.apache.directory.shared.asn1.der.DERApplicationSpecific;
 import org.apache.directory.shared.asn1.der.DEREncodable;
@@ -34,6 +32,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
 import org.apache.directory.shared.asn1.der.DERTaggedObject;
+import org.apache.directory.shared.kerberos.components.EncKrbPrivPart;
 
 
 /**
@@ -61,7 +60,7 @@ public class EncKrbPrivPartDecoder imple
 
     private EncKrbPrivPart decodePrivatePartSequence( DERSequence sequence )
     {
-        EncKrbPrivPartModifier modifier = new EncKrbPrivPartModifier();
+        EncKrbPrivPart encKrbPrivPart = new EncKrbPrivPart();
 
         for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
         {
@@ -73,30 +72,30 @@ public class EncKrbPrivPartDecoder imple
             {
                 case 0:
                     DEROctetString tag0 = ( DEROctetString ) derObject;
-                    modifier.setUserData( tag0.getOctets() );
+                    encKrbPrivPart.setUserData( tag0.getOctets() );
                     break;
                 case 1:
                     DERGeneralizedTime tag1 = ( DERGeneralizedTime ) derObject;
-                    modifier.setTimestamp( KerberosTimeDecoder.decode( tag1 ) );
+                    encKrbPrivPart.setTimestamp( KerberosTimeDecoder.decode( tag1 ) );
                     break;
                 case 2:
                     DERInteger tag2 = ( DERInteger ) derObject;
-                    modifier.setMicroSecond( Integer.valueOf( tag2.intValue() ) );
+                    encKrbPrivPart.setMicroSecond( Integer.valueOf( tag2.intValue() ) );
                     break;
                 case 3:
                     DERInteger tag3 = ( DERInteger ) derObject;
-                    modifier.setSequenceNumber( Integer.valueOf( tag3.intValue() ) );
+                    encKrbPrivPart.setSequenceNumber( Integer.valueOf( tag3.intValue() )
);
                     break;
                 case 4:
                     DERSequence tag4 = ( DERSequence ) derObject;
-                    modifier.setSenderAddress( HostAddressDecoder.decode( tag4 ) );
+                    encKrbPrivPart.setSenderAddress( HostAddressDecoder.decode( tag4 ) );
                     break;
                 case 5:
                     DERSequence tag5 = ( DERSequence ) derObject;
-                    modifier.setRecipientAddress( HostAddressDecoder.decode( tag5 ) );
+                    encKrbPrivPart.setRecipientAddress( HostAddressDecoder.decode( tag5 )
);
                     break;
             }
         }
-        return modifier.getEncKrbPrivPart();
+        return encKrbPrivPart.getEncKrbPrivPart();
     }
 }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java?rev=1041758&r1=1041757&r2=1041758&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
Fri Dec  3 10:12:36 2010
@@ -43,7 +43,7 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.messages.ApplicationRequest;
 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.EncKrbPrivPart;
+import org.apache.directory.shared.kerberos.components.EncKrbPrivPart;
 import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPartModifier;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=1041758&r1=1041757&r2=1041758&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
Fri Dec  3 10:12:36 2010
@@ -46,8 +46,6 @@ import org.apache.directory.server.kerbe
 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.application.PrivateMessage;
-import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPart;
-import org.apache.directory.server.kerberos.shared.messages.components.EncKrbPrivPartModifier;
 import org.apache.directory.server.kerberos.shared.messages.value.ApOptions;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
@@ -55,6 +53,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.KerberosTime;
 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.EncKrbPrivPart;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.components.HostAddress;
@@ -273,10 +272,9 @@ public class ChangepwProtocolHandlerTest
             throws UnsupportedEncodingException, KerberosException, UnknownHostException
     {
         // Make private message part.
-        EncKrbPrivPartModifier privPartModifier = new EncKrbPrivPartModifier();
-        privPartModifier.setUserData( newPassword.getBytes( "UTF-8" ) );
-        privPartModifier.setSenderAddress( new HostAddress( InetAddress.getLocalHost() )
);
-        EncKrbPrivPart encReqPrivPart = privPartModifier.getEncKrbPrivPart();
+        EncKrbPrivPart encReqPrivPart = new EncKrbPrivPart();
+        encReqPrivPart.setUserData( newPassword.getBytes( "UTF-8" ) );
+        encReqPrivPart.setSenderAddress( new HostAddress( InetAddress.getLocalHost() ) );
 
         // Seal private message part.
         EncryptedData encryptedPrivPart = cipherTextHandler.seal( subSessionKey, encReqPrivPart,
KeyUsage.NUMBER13 );
@@ -299,7 +297,7 @@ public class ChangepwProtocolHandlerTest
             UnknownHostException, IOException
     {
         // Make private message part.
-        EncKrbPrivPartModifier privPartModifier = new EncKrbPrivPartModifier();
+        EncKrbPrivPart encReqPrivPart = new EncKrbPrivPart();
 
         ChangePasswordDataModifier dataModifier = new ChangePasswordDataModifier();
         dataModifier.setNewPassword( newPassword.getBytes() );
@@ -310,10 +308,9 @@ public class ChangepwProtocolHandlerTest
         ChangePasswordDataEncoder encoder = new ChangePasswordDataEncoder();
         byte[] dataBytes = encoder.encode( data );
 
-        privPartModifier.setUserData( dataBytes );
+        encReqPrivPart.setUserData( dataBytes );
 
-        privPartModifier.setSenderAddress( new HostAddress( InetAddress.getLocalHost() )
);
-        EncKrbPrivPart encReqPrivPart = privPartModifier.getEncKrbPrivPart();
+        encReqPrivPart.setSenderAddress( new HostAddress( InetAddress.getLocalHost() ) );
 
         // Seal private message part.
         EncryptedData encryptedPrivPart = cipherTextHandler.seal( subSessionKey, encReqPrivPart,
KeyUsage.NUMBER13 );



Mime
View raw message