Author: borisk
Date: 2005-03-29 08:27:20 -0500 (Tue, 29 Mar 2005)
New Revision: 42336

Modified:
   
trunk/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Rfc2251/RfcModifyDNRequest.cs
Log:
According to RFC 2251 newSuperior should be sent as context-specific 0 type 
rather than octet string.

Modified: 
trunk/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Rfc2251/RfcModifyDNRequest.cs
===================================================================
--- 
trunk/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Rfc2251/RfcModifyDNRequest.cs
   2005-03-29 13:25:03 UTC (rev 42335)
+++ 
trunk/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Rfc2251/RfcModifyDNRequest.cs
   2005-03-29 13:27:20 UTC (rev 42336)
@@ -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);
                
                /// <summary> </summary>
                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);
+                       }
                }
                
                /// <summary> Constructs a new Delete Request copying from the 
ArrayList of

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to