directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1586717 - in /directory: apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/ share...
Date Fri, 11 Apr 2014 17:01:06 GMT
Author: elecharny
Date: Fri Apr 11 17:01:06 2014
New Revision: 1586717

URL: http://svn.apache.org/r1586717
Log:
Fixed for DIRAPI-188. The TLV.getNbBytes is now used when it shoul.

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/Checksum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseDecorator.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/Checksum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/Checksum.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/Checksum.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/Checksum.java
Fri Apr 11 17:01:06 2014
@@ -211,7 +211,7 @@ public class Checksum implements Asn1Obj
         checksumLength += 1 + TLV.getNbBytes( checksumBytesLength ) + checksumBytesLength;
 
         // Compute the whole sequence length
-        int checksumSeqLength = 1 + BerValue.getNbBytes( checksumLength ) + checksumLength;
+        int checksumSeqLength = 1 + TLV.getNbBytes( checksumLength ) + checksumLength;
 
         return checksumSeqLength;
 

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
Fri Apr 11 17:01:06 2014
@@ -246,7 +246,7 @@ public class HostAddress implements Asn1
         hostAddressLength += 1 + TLV.getNbBytes( addressLength ) + addressLength;
 
         // Compute the whole sequence length
-        hostAddressSeqLength = 1 + BerValue.getNbBytes( hostAddressLength ) + hostAddressLength;
+        hostAddressSeqLength = 1 + TLV.getNbBytes( hostAddressLength ) + hostAddressLength;
 
         return hostAddressSeqLength;
     }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/TransitedEncoding.java
Fri Apr 11 17:01:06 2014
@@ -168,7 +168,7 @@ public class TransitedEncoding implement
         transitedEncodingLength += 1 + TLV.getNbBytes( contentsLength ) + contentsLength;
 
         // Compute the whole sequence length
-        int transitedEncodingSeqLength = 1 + BerValue.getNbBytes( transitedEncodingLength
) + transitedEncodingLength;
+        int transitedEncodingSeqLength = 1 + TLV.getNbBytes( transitedEncodingLength ) +
transitedEncodingLength;
 
         return transitedEncodingSeqLength;
     }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java
Fri Apr 11 17:01:06 2014
@@ -25,6 +25,7 @@ import java.nio.ByteBuffer;
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.EncoderException;
 import org.apache.directory.api.asn1.ber.tlv.BerValue;
+import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.ExtendedRequestDecorator;
@@ -221,18 +222,18 @@ public class CertGenerationRequestDecora
     /* no qualifier */ int computeLengthInternal()
     {
         int len = Strings.getBytesUtf8( certGenerationRequest.getTargetDN() ).length;
-        requestLength = 1 + BerValue.getNbBytes( len ) + len;
+        requestLength = 1 + TLV.getNbBytes( len ) + len;
 
         len = Strings.getBytesUtf8( certGenerationRequest.getIssuerDN() ).length;
-        requestLength += 1 + BerValue.getNbBytes( len ) + len;
+        requestLength += 1 + TLV.getNbBytes( len ) + len;
 
         len = Strings.getBytesUtf8( certGenerationRequest.getSubjectDN() ).length;
-        requestLength += 1 + BerValue.getNbBytes( len ) + len;
+        requestLength += 1 + TLV.getNbBytes( len ) + len;
 
         len = Strings.getBytesUtf8( certGenerationRequest.getKeyAlgorithm() ).length;
-        requestLength += 1 + BerValue.getNbBytes( len ) + len;
+        requestLength += 1 + TLV.getNbBytes( len ) + len;
 
-        return 1 + BerValue.getNbBytes( requestLength ) + requestLength;
+        return 1 + TLV.getNbBytes( requestLength ) + requestLength;
     }
 
 
@@ -248,7 +249,7 @@ public class CertGenerationRequestDecora
         ByteBuffer bb = ByteBuffer.allocate( computeLengthInternal() );
 
         bb.put( UniversalTag.SEQUENCE.getValue() );
-        bb.put( BerValue.getBytes( requestLength ) );
+        bb.put( TLV.getBytes( requestLength ) );
 
         BerValue.encode( bb, certGenerationRequest.getTargetDN() );
         BerValue.encode( bb, certGenerationRequest.getIssuerDN() );

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
Fri Apr 11 17:01:06 2014
@@ -24,7 +24,6 @@ import java.nio.ByteBuffer;
 
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.asn1.ber.tlv.BerValue;
 import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.api.i18n.I18n;
@@ -199,22 +198,22 @@ public class PasswordModifyRequestDecora
         if ( passwordModifyRequest.getUserIdentity() != null )
         {
             int len = passwordModifyRequest.getUserIdentity().length;
-            requestLength = 1 + BerValue.getNbBytes( len ) + len;
+            requestLength = 1 + TLV.getNbBytes( len ) + len;
         }
 
         if ( passwordModifyRequest.getOldPassword() != null )
         {
             int len = passwordModifyRequest.getOldPassword().length;
-            requestLength += 1 + BerValue.getNbBytes( len ) + len;
+            requestLength += 1 + TLV.getNbBytes( len ) + len;
         }
 
         if ( passwordModifyRequest.getNewPassword() != null )
         {
             int len = passwordModifyRequest.getNewPassword().length;
-            requestLength += 1 + BerValue.getNbBytes( len ) + len;
+            requestLength += 1 + TLV.getNbBytes( len ) + len;
         }
 
-        return 1 + BerValue.getNbBytes( requestLength ) + requestLength;
+        return 1 + TLV.getNbBytes( requestLength ) + requestLength;
     }
 
 
@@ -229,7 +228,7 @@ public class PasswordModifyRequestDecora
         ByteBuffer bb = ByteBuffer.allocate( computeLengthInternal() );
 
         bb.put( UniversalTag.SEQUENCE.getValue() );
-        bb.put( BerValue.getBytes( requestLength ) );
+        bb.put( TLV.getBytes( requestLength ) );
 
         if ( passwordModifyRequest.getUserIdentity() != null )
         {

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
Fri Apr 11 17:01:06 2014
@@ -24,7 +24,6 @@ import java.nio.ByteBuffer;
 
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.asn1.ber.tlv.BerValue;
 import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.api.i18n.I18n;
@@ -160,10 +159,10 @@ public class PasswordModifyResponseDecor
         if ( passwordModifyResponse.getGenPassword() != null )
         {
             int len = passwordModifyResponse.getGenPassword().length;
-            requestLength = 1 + BerValue.getNbBytes( len ) + len;
+            requestLength = 1 + TLV.getNbBytes( len ) + len;
         }
 
-        return 1 + BerValue.getNbBytes( requestLength ) + requestLength;
+        return 1 + TLV.getNbBytes( requestLength ) + requestLength;
     }
 
 
@@ -179,7 +178,7 @@ public class PasswordModifyResponseDecor
         ByteBuffer bb = ByteBuffer.allocate( computeLengthInternal() );
         
         bb.put( UniversalTag.SEQUENCE.getValue() );
-        bb.put( BerValue.getBytes( requestLength ) );
+        bb.put( TLV.getBytes( requestLength ) );
 
         if ( passwordModifyResponse.getGenPassword() != null )
         {

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseDecorator.java?rev=1586717&r1=1586716&r2=1586717&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseDecorator.java
Fri Apr 11 17:01:06 2014
@@ -25,6 +25,7 @@ import java.nio.ByteBuffer;
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.EncoderException;
 import org.apache.directory.api.asn1.ber.tlv.BerValue;
+import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.ExtendedResponseDecorator;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
@@ -213,7 +214,7 @@ public class WhoAmIResponseDecorator ext
     {
         if ( whoAmIResponse.getAuthzId() != null )
         {
-            return 1 + BerValue.getNbBytes( whoAmIResponse.getAuthzId().length ) + 
+            return 1 + TLV.getNbBytes( whoAmIResponse.getAuthzId().length ) + 
                 whoAmIResponse.getAuthzId().length;
         }
         else



Mime
View raw message