<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all<br>
Attached is the better patch for the same problem (see my previous mail
below).<br>
- According to RFC 2251 newSuperior should be sent as context-specific
0 type rather than octet string.<br>
<br>
- Create an instance of RfcModifyDNRequest for LdapModifyDNRequest
using new type for newSuprerior parameter - RfcLdapSuperDN (encoded as
context-specific 0 type).<br>
<br>
If no one objects, I'm going to commit.<br>
<br>
Thanks,<br>
Boris<br>
<br>
<br>
<br>
Boris Kirzner wrote:
<blockquote cite="mid42480EB9.4090402@mainsoft.com" type="cite">Hello
all
  <br>
Attached is a patch for RfcModifyDNRequest class :
  <br>
- According to RFC 2251 newSuperior should be sent as context-specific
0 type rather than octet string.
  <br>
  <br>
If no one objects, I'm going to commit.
  <br>
Boris
  <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
Index: RfcModifyDNRequest.cs
===================================================================
--- RfcModifyDNRequest.cs        (revision 42306)
+++ RfcModifyDNRequest.cs        (working copy)
@@ -52,6 +52,16 @@
                 //*************************************************************************
                 // Constructors for ModifyDNRequest
                 //*************************************************************************
+
+                // according to RFC 2251 :
+                // ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
+                //   entry           LDAPDN,
+                //   newrdn          RelativeLDAPDN,
+                //   deleteoldrdn    BOOLEAN,
+                //   newSuperior     [0] LDAPDN OPTIONAL
+                // }
+                // i.e. newSuperior is a context-specific 0.
+                static readonly Asn1Identifier superiorId = new Asn1Identifier(Asn1Identifier.CONTEXT,false,0x0);
                 
                 /// &lt;summary&gt; &lt;/summary&gt;
                 public RfcModifyDNRequest(RfcLdapDN entry, RfcRelativeLdapDN newrdn, Asn1Boolean deleteoldrdn):this(entry, newrdn, deleteoldrdn, null)
@@ -64,8 +74,10 @@
                         add(entry);
                         add(newrdn);
                         add(deleteoldrdn);
-                        if (newSuperior != null)
+                        if (newSuperior != null) {
+                                newSuperior.setIdentifier(superiorId);
                                 add(newSuperior);
+                        }
                 }
                 
                 /// &lt;summary&gt; Constructs a new Delete Request copying from the ArrayList of
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="120">-- 
Boris Kirzner
Mainsoft Corporation
<a class="moz-txt-link-freetext" href="http://www.mainsoft.com">http://www.mainsoft.com</a></pre>
</body>
</html>