diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2005-05-02 17:00:05 +0400 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2005-05-02 17:00:05 +0400 |
commit | 3ea926b789559c1a6025c128ed4aa170efc4b291 (patch) | |
tree | 5674c4d3a8a5b623855e60caa1c878ba8a3f8629 /mcs/class/System.Security | |
parent | 916f45692e061ee978c69dd0b66b97497913ab3e (diff) |
2005-05-02 Sebastien Pouliot <sebastien@ximian.com>
* 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).
svn path=/trunk/mcs/; revision=43879
Diffstat (limited to 'mcs/class/System.Security')
3 files changed, 20 insertions, 0 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog index 223485ad6ad..cf1c80f2eb6 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog @@ -1,3 +1,10 @@ +2005-05-02 Sebastien Pouliot <sebastien@ximian.com> + + * 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 <sebastien@ximian.com> * KeyInfoX509Data.cs: Fixed to work biwht unit tests on both NET_1_1 diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs index 1fa9e0244bc..997136ee2c6 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs @@ -156,11 +156,19 @@ namespace System.Security.Cryptography.Xml { 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); } diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs index 853c53aba7c..49e4727d749 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/XmlDsigC14NTransform.cs @@ -134,7 +134,12 @@ namespace System.Security.Cryptography.Xml { 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 } } } |