diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 13:24:09 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 13:24:09 +0300 |
commit | 7dba740284fc23c05fec2630e36935a229662c3c (patch) | |
tree | 04dcc16552f44474d6d5b8b5138f95dc45968d99 /mcs/class/System.Security/Test | |
parent | 7bbb0e58ccec5d8e88ae7fe7eb162cefda6524e9 (diff) |
2007-01-12 Atsushi Enomoto <atsushi@ximian.com>
* SignedXml.cs : ComputeSignature() should check empty key.
* SignedXmlTest.cs : added ComputeSignatureNoSigningKey().
svn path=/trunk/mcs/; revision=70909
Diffstat (limited to 'mcs/class/System.Security/Test')
-rw-r--r-- | mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog index 3988d531472..8ae0798ad5a 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog @@ -1,3 +1,7 @@ +2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + + * SignedXmlTest.cs : added ComputeSignatureNoSigningKey(). + 2006-11-01 Atsushi Enomoto <atsushi@ximian.com> * SignedXmlTest.cs : added Ignore for failing wrong test by design. diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs index 58b057bc23d..e476bea353e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs @@ -481,6 +481,26 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert (!sx.CheckSignature ()); } + [Test] +#if NET_2_0 + [ExpectedException (typeof (CryptographicException))] // correct +#else + [ExpectedException (typeof (ArgumentNullException))] // silly +#endif + public void ComputeSignatureNoSigningKey () + { + SignedXml signedXml = new SignedXml (new XmlDocument ()); + + Reference reference = new Reference (); + reference.Uri = ""; + + XmlDsigEnvelopedSignatureTransform env = new XmlDsigEnvelopedSignatureTransform (); + reference.AddTransform (env); + signedXml.AddReference (reference); + + signedXml.ComputeSignature (); + } + #if NET_2_0 [Test] [Category ("NotWorking")] // bug #79483 |