diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 17:35:05 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2007-01-12 17:35:05 +0300 |
commit | 255664a33f9bfc111a55c15aa0c06dd951f0ca56 (patch) | |
tree | 1283cd705e120fd12b045645e56e3cafa962118a /mcs/class/System.Security/Test | |
parent | 0ec3654ef8b110938e2ff50e71c7e7428849c231 (diff) |
2007-01-12 Atsushi Enomoto <atsushi@ximian.com>
* SignedXml.cs : when there is an envelope document and no referenced
DataObject was found, then look for the target element from the
envelope.
* SignedXmlTest.cs : added DataReferenceToNonDataObject().
* xmldsig.cs : signature-big.xml also depends on the input document.
svn path=/trunk/mcs/; revision=70919
Diffstat (limited to 'mcs/class/System.Security/Test')
4 files changed, 29 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 ba124e8a45f..ac635a97a96 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ChangeLog @@ -1,5 +1,9 @@ 2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + * SignedXmlTest.cs : added DataReferenceToNonDataObject(). + +2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + * DataObjectTest.cs : test to make sure to not clear attributes or children unnecessarily. 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 89e5fb53e3c..f5b88362012 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 @@ -519,6 +519,25 @@ namespace MonoTests.System.Security.Cryptography.Xml { signedXml.ComputeSignature (); } + [Test] + public void DataReferenceToNonDataObject () + { + XmlDocument doc = new XmlDocument (); + doc.LoadXml ("<foo Id='id:1'/>"); + SignedXml signedXml = new SignedXml (doc); + DSA key = DSA.Create (); + signedXml.SigningKey = key; + + Reference reference = new Reference (); + reference.Uri = "#id:1"; + + XmlDsigC14NTransform t = new XmlDsigC14NTransform (); + reference.AddTransform (t); + signedXml.AddReference (reference); + + signedXml.ComputeSignature (); + } + #if NET_2_0 [Test] [Category ("NotWorking")] // bug #79483 diff --git a/mcs/class/System.Security/Test/standalone_tests/ChangeLog b/mcs/class/System.Security/Test/standalone_tests/ChangeLog index bd4fa3abaf3..e7f47423b00 100644 --- a/mcs/class/System.Security/Test/standalone_tests/ChangeLog +++ b/mcs/class/System.Security/Test/standalone_tests/ChangeLog @@ -1,3 +1,7 @@ +2007-01-12 Atsushi Enomoto <atsushi@ximian.com> + + * xmldsig.cs : signature-big.xml also depends on the input document. + 2005-04-04 Atsushi Enomoto <atsushi@ximian.com> * Makefile : Fixed reference to Mono.Security.dll. Added decent-reader diff --git a/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs b/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs index 74baed01bfa..4c96f2a08d8 100644 --- a/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs +++ b/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs @@ -146,6 +146,8 @@ public class MyClass { SignedXml s = null; if (filename.IndexOf ("enveloped") >= 0) s = new SignedXml (doc); + else if (filename.IndexOf ("signature-big") >= 0) + s = new SignedXml (doc); else s = new SignedXml (); |