Author: spouliot
Date: 2005-05-02 09:00:05 -0400 (Mon, 02 May 2005)
New Revision: 43879
Modified:
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs
Log:
2005-05-02 Sebastien Pouliot <[EMAIL PROTECTED]>
* SignedXml.cs: Throw ArgumentNullException in AddObject and
AddReference methods in 2.0.
* XmlDsigC14NTransform.cs: Throw ArgumentException when loading from
an unknown type in 2.0 (it was simply ignored in 1.x).
Modified:
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
2005-05-02 12:53:53 UTC (rev 43878)
+++ trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog
2005-05-02 13:00:05 UTC (rev 43879)
@@ -1,3 +1,10 @@
+2005-05-02 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * SignedXml.cs: Throw ArgumentNullException in AddObject and
+ AddReference methods in 2.0.
+ * XmlDsigC14NTransform.cs: Throw ArgumentException when loading from
+ an unknown type in 2.0 (it was simply ignored in 1.x).
+
2005-04-26 Sebastien Pouliot <[EMAIL PROTECTED]>
* KeyInfoX509Data.cs: Fixed to work biwht unit tests on both NET_1_1
Modified:
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
===================================================================
---
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
2005-05-02 12:53:53 UTC (rev 43878)
+++
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
2005-05-02 13:00:05 UTC (rev 43879)
@@ -156,11 +156,19 @@
public void AddObject (DataObject dataObject)
{
+#if NET_2_0
+ if (dataObject == null)
+ throw new ArgumentNullException ("dataObject");
+#endif
m_signature.AddObject (dataObject);
}
public void AddReference (Reference reference)
{
+#if NET_2_0
+ if (reference == null)
+ throw new ArgumentNullException ("reference");
+#endif
m_signature.SignedInfo.AddReference (reference);
}
Modified:
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs
===================================================================
---
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs
2005-05-02 12:53:53 UTC (rev 43878)
+++
trunk/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs
2005-05-02 13:00:05 UTC (rev 43879)
@@ -134,7 +134,12 @@
s = canonicalizer.Canonicalize ((obj as
XmlDocument));
else if (obj is XmlNodeList)
s = canonicalizer.Canonicalize ((obj as
XmlNodeList));
+#if NET_2_0
+ else
+ throw new ArgumentException ("obj");
+#else
// note: there is no default are other types won't
throw an exception
+#endif
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches