/// <summary> </summary>
 public RfcSaslCredentials(RfcLdapString mechanism, Asn1OctetString credentials)
     : base(2)
 {
     add(mechanism);
     if (credentials != null)
         add(credentials);
 }
Example #2
0
		/// <summary> Constructs an extended request.
		/// 
		/// </summary>
		/// <param name="requestName">The OID for this extended operation.
		/// </param>
		/// <param name="requestValue">An optional request value.
		/// </param>
		public RfcExtendedRequest(RfcLdapOID requestName, Asn1OctetString requestValue):base(2)
		{
			add(new Asn1Tagged(new Asn1Identifier(Asn1Identifier.CONTEXT, false, REQUEST_NAME), requestName, false));
			if (requestValue != null)
				add(new Asn1Tagged(new Asn1Identifier(Asn1Identifier.CONTEXT, false, REQUEST_VALUE), requestValue, false));
			return ;
		}
Example #3
0
		/// <summary>  Constructs an extended operation object for synchronizing the schema.
		/// 
		/// </summary>
		/// <param name="serverName">    The distinguished name of the server which will start
		/// the synchronization.
		/// 
		/// </param>
		/// <param name="delay">         The time, in seconds, to delay before the synchronization
		/// should start.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error message
		/// and an Ldap error code.
		/// </exception>
		public SchemaSyncRequest(System.String serverName, int delay):base(ReplicationConstants.SCHEMA_SYNC_REQ, null)
		{
			
			try
			{
				
				if ((System.Object) serverName == null)
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverName = new Asn1OctetString(serverName);
				Asn1Integer asn1_delay = new Asn1Integer(delay);
				
				asn1_serverName.encode(encoder, encodedData);
				asn1_delay.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
		/// <summary> Constructs an extended operation object for aborting a partition operation.
		/// 
		/// </summary>
		/// <param name="partitionDN">The distinguished name of the replica's
		/// partition root.
		/// 
		/// </param>
		/// <param name="flags">Determines whether all servers in the replica ring must
		/// be up before proceeding. When set to zero, the status of the
		/// servers is not checked. When set to Ldap_ENSURE_SERVERS_UP,
		/// all servers must be up for the operation to proceed.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error message
		/// and an Ldap error code.
		/// </exception>
		public AbortPartitionOperationRequest(System.String partitionDN, int flags):base(ReplicationConstants.ABORT_NAMING_CONTEXT_OP_REQ, null)
		{
			
			try
			{
				
				if ((System.Object) partitionDN == null)
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				
				Asn1Integer asn1_flags = new Asn1Integer(flags);
				Asn1OctetString asn1_partitionDN = new Asn1OctetString(partitionDN);
				
				asn1_flags.encode(encoder, encodedData);
				asn1_partitionDN.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
		/// <summary> 
		/// Constructs an extended operation object for creating an orphan partition.
		/// 
		/// 
		/// </summary>
		/// <param name="serverDN">   The distinguished name of the server on which
		/// the new orphan partition will reside.
		/// 
		/// </param>
		/// <param name="contextName">The distinguished name of the
		/// new orphan partition.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error message
		/// and an Ldap error code.
		/// </exception>
		public SplitOrphanPartitionRequest(System.String serverDN, System.String contextName):base(ReplicationConstants.CREATE_ORPHAN_NAMING_CONTEXT_REQ, null)
		{
			
			try
			{
				
				if (((System.Object) serverDN == null) || ((System.Object) contextName == null))
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverDN = new Asn1OctetString(serverDN);
				Asn1OctetString asn1_contextName = new Asn1OctetString(contextName);
				
				asn1_serverDN.encode(encoder, encodedData);
				asn1_contextName.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
Example #6
0
 /// <summary> 
 /// Note: criticality is only added if true, as per RFC 2251 sec 5.1 part
 /// (4): If a value of a type is its default value, it MUST be
 /// absent.
 /// </summary>
 public RfcControl(RfcLdapOID controlType, Asn1Boolean criticality, Asn1OctetString controlValue)
     : base(3)
 {
     add(controlType);
     if (criticality.booleanValue() == true)
         add(criticality);
     if (controlValue != null)
         add(controlValue);
 }
Example #7
0
		/// <summary> 
		/// Constructs an extended operation object for sending updates to a replica ring.
		/// 
		/// </summary>
		/// <param name="partitionRoot">The distinguished name of the replica
		/// that will be updated.
		/// 
		/// </param>
		/// <param name="origServerDN"> The distinguished name of the server that sends the
		/// updates to the replica ring.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error message
		/// and an Ldap error code.
		/// </exception>
		public SendAllUpdatesRequest(System.String partitionRoot, System.String origServerDN):base(ReplicationConstants.SEND_ALL_UPDATES_REQ, null)
		{
			
			try
			{
				
				if (((System.Object) partitionRoot == null) || ((System.Object) origServerDN == null))
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_partitionRoot = new Asn1OctetString(partitionRoot);
				Asn1OctetString asn1_origServerDN = new Asn1OctetString(origServerDN);
				
				asn1_partitionRoot.encode(encoder, encodedData);
				asn1_origServerDN.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
        /**
        *
        * Constructs an extended operations object for getting data about any Object.
        *
        * @param objectDN 		The DN of the object to be backed up
        * <br>
        * @param passwd 		The encrypted password required for the object to
        * be backed up
        * <br>
        * @param stateInfo     The state information of the object to backup.
        * This parameter is a String which contains combination of modification
        * timestamp and revision number of object being backed up. The format
        * of both modification time stamp and revision should pertain to eDirectoty
        * standard format of taking modification timestamp and revision.
        * Separator being used between these two is a '+' character.<br>
        *
        *
        * @exception LdapException A general exception which includes an error
        *                          message and an LDAP error code.
        */
        public LdapBackupRequest(String objectDN, byte[] passwd, String stateInfo)
            : base(BackupRestoreConstants.NLDAP_LDAP_BACKUP_REQUEST, null)
        {
            int mts;		// Modifaction time stamp of the Object
            int revision;   // Revision number of the Object
            String mtsStr, revisionStr;

            try
            {
                if (objectDN == null)
                    throw new ArgumentException("PARAM_ERROR");

                //If encrypted password has null reference make it null String
                if(passwd == null)
                    passwd = System.Text.Encoding.UTF8.GetBytes("");

                if (stateInfo == null)
                {
                    // If null reference is passed in stateInfo initialize both
                    // mts and revision
                    mts = 0;
                    revision = 0;
                }
                else
                {
                    // Parse the passed stateInfo to obtain mts and revision
                    stateInfo = stateInfo.Trim();
                    int index = stateInfo.IndexOf('+');
                    if(index == -1)
                        throw new ArgumentException("PARAM_ERROR");
                    mtsStr = stateInfo.Substring(0, index);
                    revisionStr = stateInfo.Substring(index + 1);
                    try
                    {
                        mts = int.Parse(mtsStr);
                    }
                    catch (FormatException e)
                    {
                        throw new LdapLocalException("Invalid Modification Timestamp send in the request", LdapException.ENCODING_ERROR);
                    }
                    try
                    {
                        revision = int.Parse(revisionStr);
                    }
                    catch (FormatException e)
                    {
                        throw new LdapLocalException(
                            "Invalid Revision send in the request",
                            LdapException.ENCODING_ERROR);
                    }
                }

                MemoryStream encodedData = new MemoryStream();
                LBEREncoder encoder = new LBEREncoder();

                // Encode data of objectDN, mts and revision
                Asn1OctetString asn1_objectDN = new Asn1OctetString(objectDN);
                Asn1Integer asn1_mts = new Asn1Integer(mts);
                Asn1Integer asn1_revision = new Asn1Integer(revision);
                Asn1OctetString asn1_passwd = new Asn1OctetString(SupportClass.ToSByteArray(passwd));

                asn1_objectDN.encode(encoder, encodedData);
                asn1_mts.encode(encoder, encodedData);
                asn1_revision.encode(encoder, encodedData);
                asn1_passwd.encode(encoder, encodedData);

                // set the value of operation specific data
                setValue(SupportClass.ToSByteArray(encodedData.ToArray()));

            }
            catch (IOException ioe)
            {
                throw new LdapException("ENCODING_ERROR", LdapException.ENCODING_ERROR, (String) null);
            }
        }
        /// <summary>  Constructs an extended operation object for listing replicas.
        /// 
        /// </summary>
        /// <param name="serverName">The server which contains replicas.
        /// 
        /// </param>
        /// <exception> LdapException A general exception which includes an error
        /// message and an Ldap error code.
        /// </exception>
        public ListReplicasRequest(System.String serverName)
            : base(ReplicationConstants.LIST_REPLICAS_REQ, null)
        {
            try
            {

                if ((System.Object) serverName == null)
                    throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);

                System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
                LBEREncoder encoder = new LBEREncoder();

                Asn1OctetString asn1_serverName = new Asn1OctetString(serverName);

                asn1_serverName.encode(encoder, encodedData);

                setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
            }
            catch (System.IO.IOException ioe)
            {
                throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
            }
        }
		/// <summary> 
		/// Constructs an extended operations object which contains the ber encoded
		/// replication filter.
		/// 
		/// </summary>
		/// <param name="serverDN">The server on which the replication filter needs to be set
		/// 
		/// </param>
		/// <param name="replicationFilter">An array of String Arrays. Each array starting with
		/// a class name followed by the attribute names for that class that should comprise
		/// the replication filter.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error
		/// message and an Ldap error code.
		/// </exception>
		public SetReplicationFilterRequest(System.String serverDN, System.String[][] replicationFilter):base(ReplicationConstants.SET_REPLICATION_FILTER_REQ, null)
		{
			
			try
			{
				
				if ((System.Object) serverDN == null)
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverDN = new Asn1OctetString(serverDN);
				
				// Add the serverDN to encoded data
				asn1_serverDN.encode(encoder, encodedData);
				
				// The toplevel sequenceOF
				Asn1SequenceOf asn1_replicationFilter = new Asn1SequenceOf();
				
				if (replicationFilter == null)
				{
					asn1_replicationFilter.encode(encoder, encodedData);
					setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
					return ;
				}
				
				int i = 0;
				// for every element in the array
				while ((i < replicationFilter.Length) && (replicationFilter[i] != null))
				{
					
					
					// The following additional Sequence is not needed
					// as defined by the Asn1. But the server and the
					// C client are encoding it. Remove this when server
					// and C client are fixed to conform to the published Asn1.
					Asn1Sequence buginAsn1Representation = new Asn1Sequence();
					
					// Add the classname to the sequence -
					buginAsn1Representation.add(new Asn1OctetString(replicationFilter[i][0]));
					
					// Start a sequenceOF for attributes
					Asn1SequenceOf asn1_attributeList = new Asn1SequenceOf();
					
					// For every attribute in the array - remember attributes start after
					// the first element
					int j = 1;
					while ((j < replicationFilter[i].Length) && ((System.Object) replicationFilter[i][j] != null))
					{
						
						// Add the attribute name to the inner SequenceOf
						asn1_attributeList.add(new Asn1OctetString(replicationFilter[i][j]));
						j++;
					}
					
					
					// Add the attributeList to the sequence - extra add due to bug
					buginAsn1Representation.add(asn1_attributeList);
					asn1_replicationFilter.add(buginAsn1Representation);
					i++;
				}
				
				asn1_replicationFilter.encode(encoder, encodedData);
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
		/// <summary>  Constructs an extended operation object for counting entries
		/// in a naming context.
		/// 
		/// </summary>
		/// <param name="dn"> The distinguished name of the partition.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an
		/// error message and an Ldap error code.
		/// </exception>
		
		public PartitionEntryCountRequest(System.String dn):base(ReplicationConstants.NAMING_CONTEXT_COUNT_REQ, null)
		{
			
			try
			{
				
				if (((System.Object) dn == null))
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_dn = new Asn1OctetString(dn);
				
				asn1_dn.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
Example #12
0
		/* Asn1 TYPE NOT YET SUPPORTED
		* Encode an Asn1BitString directly to a stream.
		public void encode(Asn1BitString bs, OutputStream out)
		throws IOException
		{
		throw new IOException("LBEREncoder: Encode to a stream not implemented");
		}
		*/
		
		/// <summary> Encode an Asn1OctetString directly into the specified outputstream.</summary>
		public void  encode(Asn1OctetString os, System.IO.Stream out_Renamed)
		{
			encode(os.getIdentifier(), out_Renamed);
			encodeLength(os.byteValue().Length, out_Renamed);
			sbyte[] temp_sbyteArray;
			temp_sbyteArray = os.byteValue();
			out_Renamed.Write(SupportClass.ToByteArray(temp_sbyteArray), 0, temp_sbyteArray.Length);;;
			return ;
		}
		/// <summary> Constructs an extended operation object for checking effective rights.
		/// 
		/// </summary>
		/// <param name="dn">       The distinguished name of the entry whose attribute is
		/// being checked.
		/// 
		/// </param>
		/// <param name="trusteeDN">The distinguished name of the entry whose trustee rights
		/// are being returned
		/// 
		/// </param>
		/// <param name="attrName"> The Ldap attribute name.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error
		/// message and an Ldap error code.
		/// </exception>
		
		public GetEffectivePrivilegesRequest(System.String dn, System.String trusteeDN, System.String attrName):base(ReplicationConstants.GET_EFFECTIVE_PRIVILEGES_REQ, null)
		{
			
			try
			{
				
				if (((System.Object) dn == null))
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_dn = new Asn1OctetString(dn);
				Asn1OctetString asn1_trusteeDN = new Asn1OctetString(trusteeDN);
				Asn1OctetString asn1_attrName = new Asn1OctetString(attrName);
				
				asn1_dn.encode(encoder, encodedData);
				asn1_trusteeDN.encode(encoder, encodedData);
				asn1_attrName.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
        /// <summary> 
        /// Constructs a new extended operation object for adding a replica to the
        /// specified server.
        /// 
        /// </summary>
        /// <param name="dn">The distinguished name of the replica's partition root.
        /// 
        /// </param>
        /// <param name="serverDN">The server on which the new replica will be added.
        /// 
        /// </param>
        /// <param name="replicaType">The type of replica to add. The replica
        /// types are defined in the ReplicationConstants class.
        /// 
        /// </param>
        /// <param name="flags">Specifies whether all servers in the replica ring must be up
        /// before proceeding. When set to zero, the status of the servers is not
        /// checked. When set to Ldap_ENSURE_SERVERS_UP, all servers must be up for the
        /// operation to proceed.
        /// 
        /// </param>
        /// <exception> LdapException A general exception which includes an error message
        /// and an Ldap error code.
        /// 
        /// </exception>
        /// <seealso cref="ReplicationConstants.Ldap_RT_MASTER">
        /// </seealso>
        /// <seealso cref="ReplicationConstants.Ldap_RT_SECONDARY">
        /// </seealso>
        /// <seealso cref="ReplicationConstants.Ldap_RT_READONLY">
        /// </seealso>
        /// <seealso cref="ReplicationConstants.Ldap_RT_SUBREF">
        /// </seealso>
        /// <seealso cref="ReplicationConstants.Ldap_RT_SPARSE_WRITE">
        /// </seealso>
        /// <seealso cref="ReplicationConstants.Ldap_RT_SPARSE_READ">
        /// </seealso>
        public AddReplicaRequest(System.String dn, System.String serverDN, int replicaType, int flags)
            : base(ReplicationConstants.ADD_REPLICA_REQ, null)
        {
            try
            {

                if (((System.Object) dn == null) || ((System.Object) serverDN == null))
                    throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);

                System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
                LBEREncoder encoder = new LBEREncoder();

                Asn1Integer asn1_flags = new Asn1Integer(flags);
                Asn1Integer asn1_replicaType = new Asn1Integer(replicaType);
                Asn1OctetString asn1_serverDN = new Asn1OctetString(serverDN);
                Asn1OctetString asn1_dn = new Asn1OctetString(dn);

                asn1_flags.encode(encoder, encodedData);
                asn1_replicaType.encode(encoder, encodedData);
                asn1_serverDN.encode(encoder, encodedData);
                asn1_dn.encode(encoder, encodedData);

                setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
            }
            catch (System.IO.IOException ioe)
            {
                throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
            }
        }
Example #15
0
		/// <summary> 
		/// Constructs an extended operations object for reading replica information.
		/// 
		/// </summary>
		/// <param name="serverDN">The server on which the replica resides.
		/// 
		/// </param>
		/// <param name="partitionDN">The distinguished name of the replica to be read.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error
		/// message and an Ldap error code.
		/// </exception>
		public GetReplicaInfoRequest(System.String serverDN, System.String partitionDN):base(ReplicationConstants.GET_REPLICA_INFO_REQ, null)
		{
			
			try
			{
				
				if (((System.Object) serverDN == null) || ((System.Object) partitionDN == null))
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverDN = new Asn1OctetString(serverDN);
				Asn1OctetString asn1_partitionDN = new Asn1OctetString(partitionDN);
				
				asn1_serverDN.encode(encoder, encodedData);
				asn1_partitionDN.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
		/// <summary> 
		/// Constructs an extended operations object which contains the ber encoded
		/// replication filter.
		/// 
		/// </summary>
		/// <param name="serverDN">The server whose replication filter needs to be read
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error
		/// message and an Ldap error code.
		/// </exception>
		public GetReplicationFilterRequest(System.String serverDN):base(ReplicationConstants.GET_REPLICATION_FILTER_REQ, null)
		{
			
			try
			{
				
				if ((System.Object) serverDN == null)
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverDN = new Asn1OctetString(serverDN);
				
				// Add the serverDN to encoded data
				asn1_serverDN.encode(encoder, encodedData);
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
        /**
        *
        * Constructs an extended operations object which contains the ber encoded
        * restore data.
        *
        * @param objectDN The object DN to restore
        * <br>
        * @param passwd 		The encrypted password required for the object to
        * be backed up
        * <br>
        * @param bufferLength The length of backed up data
        * <br>
        * @param chunkSizesString The String containing number of chunks and
        * each chunk elements representing chunk sizes
        * <br>
        * @param returnedBuffer The actual data in byte[]
        * <br><br>
        * @exception LdapException A general exception which includes an error
        *                          message and an LDAP error code.
        */
        public LdapRestoreRequest(String objectDN, byte[] passwd, 
            int bufferLength, String chunkSizesString, byte[] returnedBuffer)
            : base(BackupRestoreConstants.NLDAP_LDAP_RESTORE_REQUEST, null)
        {
            try
            {
                //Verify the validity of arguments
                if (objectDN == null || bufferLength == 0 ||
                    chunkSizesString == null || returnedBuffer == null)
                        throw new ArgumentException("PARAM_ERROR");

                //If encrypted password has null reference make it null String
                if(passwd == null)
                    passwd = System.Text.Encoding.UTF8.GetBytes("");

                /*
                 * From the input argument chunkSizesString get::
                 * chunkSize => Represents the number of chunks of data returned from server
                 * sizeOf each chunk => int represents the size of each chunk
                */
                int index;
                int chunkSize;
                int[] chunks = null;
                index = chunkSizesString.IndexOf(';');
                try
                {
                    chunkSize = int.Parse(chunkSizesString.Substring(0, index));
                }
                catch (FormatException e)
                {
                    throw new LdapLocalException(
                            "Invalid data buffer send in the request",
                            LdapException.ENCODING_ERROR);
                }
                //Return exception if chunkSize == 0
                if (chunkSize == 0)
                    throw new ArgumentException("PARAM_ERROR");

                chunkSizesString = chunkSizesString.Substring(index + 1);

                int chunkIndex;
                //Construct chunks array
                chunks = new int[chunkSize];
                /*
                * Iterate through each member in buffer and
                * assign to chunks array elements
                */
                for (int i = 0; i < chunkSize; i++)
                {
                    chunkIndex = chunkSizesString.IndexOf(';');
                    if(chunkIndex == -1)
                    {
                        chunks[i] = int.Parse(chunkSizesString);
                        break;
                    }
                    chunks[i] = int.Parse(chunkSizesString.Substring(0,
                                                            chunkIndex));
                    chunkSizesString = chunkSizesString.Substring(chunkIndex + 1);
                }

                MemoryStream encodedData = new MemoryStream();
                LBEREncoder encoder = new LBEREncoder();

                //Form objectDN, passwd, bufferLength, data byte[] as ASN1 Objects
                Asn1OctetString asn1_objectDN = new Asn1OctetString(objectDN);
                Asn1OctetString asn1_passwd = new Asn1OctetString(SupportClass.ToSByteArray(passwd));
                Asn1Integer asn1_bufferLength = new Asn1Integer(bufferLength);
                Asn1OctetString asn1_buffer = new Asn1OctetString(SupportClass.ToSByteArray(returnedBuffer));

                //Form the chunks sequence to be passed to Server
                Asn1Sequence asn1_chunksSeq = new Asn1Sequence();
                asn1_chunksSeq.add(new Asn1Integer(chunkSize));
                Asn1Set asn1_chunksSet = new Asn1Set();
                for (int i = 0; i < chunkSize; i++)
                {
                    Asn1Integer tmpChunk = new Asn1Integer(chunks[i]);
                    Asn1Sequence tmpSeq = new Asn1Sequence();
                    tmpSeq.add(tmpChunk);
                    asn1_chunksSet.add(tmpSeq);
                }
                asn1_chunksSeq.add(asn1_chunksSet);

                //Encode data to send to server
                asn1_objectDN.encode(encoder, encodedData);
                asn1_passwd.encode(encoder, encodedData);
                asn1_bufferLength.encode(encoder, encodedData);
                asn1_buffer.encode(encoder, encodedData);
                asn1_chunksSeq.encode(encoder, encodedData);

                // set the value of operation specific data
                setValue(SupportClass.ToSByteArray(encodedData.ToArray()));

            }
            catch (IOException ioe)
            {
                throw new LdapException("ENCODING_ERROR", LdapException.ENCODING_ERROR, (String) null);
            }
        }