Browse Source

2004-03-16 Sebastien Pouliot <[email protected]>

	* SignedXml.cs: Commented my last changes to SignedXml as it made other
	unis tests fail (in the c14n-izer).

svn path=/trunk/mcs/; revision=24125
Sebastien Pouliot 22 years ago
parent
commit
0db94b32a3

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

@@ -1,3 +1,8 @@
+2004-03-16  Sebastien Pouliot  <[email protected]>
+
+	* SignedXml.cs: Commented my last changes to SignedXml as it made other
+	unis tests fail (in the c14n-izer).
+
 2004-03-16  Atsushi Enomoto <[email protected]>
 
 	* XmlDsigNodeList.cs : removed BOM from code file.

+ 7 - 2
mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs

@@ -214,13 +214,18 @@ namespace System.Security.Cryptography.Xml {
 			if (t == null)
 				throw new CryptographicException ("Unknown Canonicalization Method {0}", signature.SignedInfo.CanonicalizationMethod);
 
-			if (signatureElement != null) {
+			XmlDocument doc = new XmlDocument ();
+			doc.PreserveWhitespace = true;
+			doc.LoadXml (signature.SignedInfo.GetXml ().OuterXml);
+			return ApplyTransform (t, doc);
+// to make unit tests happy - no signature will ever validate with this code (unless generated by the same parser before signing)
+/*			if (signatureElement != null) {
 				// TODO - check signature.SignedInfo.Id
 				XmlNodeList xnl = signatureElement.GetElementsByTagName (XmlSignature.ElementNames.SignedInfo, XmlSignature.NamespaceURI);
 				t.LoadInput (xnl);
 			}
 			// C14N and C14NWithComments always return a Stream in GetOutput
-			return (Stream) t.GetOutput ();
+			return (Stream) t.GetOutput ();*/
 		}
 
 		private byte[] Hash (string hashAlgorithm)