Browse Source

2007-02-01 Atsushi Enomoto <[email protected]>

	* SignedXml.cs : for internal URI (#blah) resolution, use
	  GetIdElement() so that any derived class which overrides this
	  method could resolve the reference correctly.


svn path=/trunk/mcs/; revision=72119
Atsushi Eno 19 years ago
parent
commit
dcf1584c86

+ 6 - 0
mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog

@@ -1,3 +1,9 @@
+2007-02-01  Atsushi Enomoto  <[email protected]>
+
+	* SignedXml.cs : for internal URI (#blah) resolution, use
+	  GetIdElement() so that any derived class which overrides this
+	  method could resolve the reference correctly.
+
 2007-01-25  Atsushi Enomoto  <[email protected]>
 
 	* SignedXml.cs : for DataObject, copy namespaces in Data into Object

+ 3 - 6
mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs

@@ -328,12 +328,9 @@ namespace System.Security.Cryptography.Xml {
 						}
 					}
 					if (found == null && envdoc != null) {
-						foreach (XmlElement el in envdoc.SelectNodes ("//*[@Id]"))
-							if (el.GetAttribute ("Id") == objectName) {
-								found = el;
-								doc.LoadXml (found.OuterXml);
-								break;
-							}
+						found = GetIdElement (envdoc, objectName);
+						if (found != null)
+							doc.LoadXml (found.OuterXml);
 					}
 					if (found == null)
 						throw new CryptographicException (String.Format ("Malformed reference object: {0}", objectName));